- 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.
This commit is contained in:
20
testsuite/egrep.tests
Executable file
20
testsuite/egrep.tests
Executable file
@@ -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
|
Reference in New Issue
Block a user