summaryrefslogtreecommitdiff
path: root/testsuite/egrep.tests
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2005-09-23 15:44:46 +0000
committerBernhard Reutner-Fischer2005-09-23 15:44:46 +0000
commitb47a74f4e773dee93c60116dd34c002c7c118d0b (patch)
tree7adcb31fbbb5e204ab577cbe31c2f72cb3b5387f /testsuite/egrep.tests
parent0a44c1777134281be6b00c69b8d6b8668ea1dbf9 (diff)
downloadbusybox-b47a74f4e773dee93c60116dd34c002c7c118d0b.zip
busybox-b47a74f4e773dee93c60116dd34c002c7c118d0b.tar.gz
- introduce variable _BB_CONFIG_DEP to the new test harness.
This is used to see if given tests should be run (are available) or not. Print "UNTESTED: descr" if the applet or feature is not available. - add _BB_CONFIG_DEP to existing new.tests - move old grep test to new test infrastructure and add a few more test for grep.
Diffstat (limited to 'testsuite/egrep.tests')
-rwxr-xr-xtestsuite/egrep.tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/egrep.tests b/testsuite/egrep.tests
new file mode 100755
index 0000000..b634649
--- /dev/null
+++ b/testsuite/egrep.tests
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# egrep tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT:
+
+[ ${#COMMAND} -eq 0 ] && COMMAND=egrep
+. testing.sh
+
+# Depends on FEATURE_GREP_EGREP_ALIAS
+_BB_CONFIG_DEP=FEATURE_GREP_EGREP_ALIAS
+
+testing "grep is also egrep" "foo" "foo\n" "" "foo\nbar\n"
+testing "egrep is not case insensitive" "foo ; [ \$? -ne 0 ] && echo yes" \
+ "yes\n" "" "FOO\n"
+
+
+exit $FAILCOUNT