diff options
author | Rob Landley | 2005-11-07 08:50:53 +0000 |
---|---|---|
committer | Rob Landley | 2005-11-07 08:50:53 +0000 |
commit | 48c6157eb9c10bdca89af2792177afc0380ef9c5 (patch) | |
tree | cdc8aa6b83e2370c00f38dca9b93722736bcff32 /testsuite/grep.tests | |
parent | 7ad4b30ed4ba2542bebcfc5fda9e9af24fb67969 (diff) | |
download | busybox-48c6157eb9c10bdca89af2792177afc0380ef9c5.zip busybox-48c6157eb9c10bdca89af2792177afc0380ef9c5.tar.gz |
Fix the test suite so that individual *.tests files can be run ala
COMMAND=sort ./sort.tests
So we can compare against non-busybox versions, and possibly our testsuite
will be useful to somebody like the Linux Test Project someday.
Redid testing.sh to add new command, "optional", to skip tests that require
certain features. (use: `optional FEATURE_SORT_BIG`, or `optional ""` to
stop skipping.) Note that optional is a NOP if the environment variable
"OPTIONFLAGS" is blank, so although we're marking up the tests with busybox
specific knowledge, it doesn't interfere with running the tests without
busybox.
Moved setting the "OPTIONFLAGS" environment variable to runtest. Philosophy:
busybox-specific stuff belongs in runtest; both testing.sh and the tests
themselves should be as busybox-agnostic as possible.
Moved detecting that a command isn't in busybox at all (hence skipping the
entire command.tests file) to runtests. Rationale: optional can't currently
test for more than one feature at a time, so if we clear anything with
optional "" we might perform tests we don't want to.
Marked up busybox.tests to know which tests need CAT enabled. Fixed up other
tests to be happy with new notation.
I suspect egrep should be appended to grep. It's a sub-feature, really...
Diffstat (limited to 'testsuite/grep.tests')
-rwxr-xr-x | testsuite/grep.tests | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests index c4f534d..2a7a7b9 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests @@ -9,9 +9,6 @@ [ ${#COMMAND} -eq 0 ] && COMMAND=grep . testing.sh -# Depends on grep -_BB_CONFIG_DEP=grep - # testing "test name" "options" "expected result" "file input" "stdin" # file input will be file called "input" # test can create a file "actual" instead of writing to stdout @@ -75,8 +72,7 @@ testing "grep matches NUL" ". input > /dev/null 2>&1 ; echo \$?" "0\n" "\0\n" "" testing "grep handles multiple regexps" "-e one -e two input ; echo \$?" \ "one\ntwo\n0\n" "one\ntwo\n" "" -# Depends on FEATURE_GREP_EGREP_ALIAS -_BB_CONFIG_DEP=FEATURE_GREP_EGREP_ALIAS +optional FEATURE_GREP_EGREP_ALIAS testing "grep -E supports extended regexps" "-E fo+" "foo\n" "" "b\ar\nfoo\nbaz" exit $FAILCOUNT |