aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-10-06 12:50:22 +0100
committerRon Yorston <rmy@pobox.com>2014-10-06 12:50:22 +0100
commitb04d11dcbadda2620743a1dd923938f2f3043a38 (patch)
tree971afe425a81304b79e44122e220c7a69efe2616 /testsuite
parent124bbf02948b7ac0babb4ead04acd1559db182d3 (diff)
parent760d035699c4a878f9109544c1d35ea0d5f6b76c (diff)
downloadbusybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.tar.gz
busybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.tar.bz2
busybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/grep.tests20
-rwxr-xr-xtestsuite/sed.tests4
-rwxr-xr-xtestsuite/test.tests20
3 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests
index 323b3849d..f6d9f2105 100755
--- a/testsuite/grep.tests
+++ b/testsuite/grep.tests
@@ -171,6 +171,26 @@ testing "grep -w word match second word" \
171 "bword,word\n""wordb,word\n""bwordb,word\n" \ 171 "bword,word\n""wordb,word\n""bwordb,word\n" \
172 "" 172 ""
173 173
174# -r on symlink to dir should recurse into dir
175mkdir -p grep.testdir/foo
176echo bar > grep.testdir/foo/file
177ln -s foo grep.testdir/symfoo
178testing "grep -r on symlink to dir" \
179 "grep -r . grep.testdir/symfoo" \
180 "grep.testdir/symfoo/file:bar\n" \
181 "" ""
182rm -Rf grep.testdir
183
184# But -r on dir/symlink_to_dir should not recurse into symlink_to_dir
185mkdir -p grep.testdir/foo
186echo bar > grep.testdir/foo/file
187ln -s foo grep.testdir/symfoo
188testing "grep -r on dir/symlink to dir" \
189 "grep -r . grep.testdir" \
190 "grep.testdir/foo/file:bar\n" \
191 "" ""
192rm -Rf grep.testdir
193
174# testing "test name" "commands" "expected result" "file input" "stdin" 194# testing "test name" "commands" "expected result" "file input" "stdin"
175# file input will be file called "input" 195# file input will be file called "input"
176# test can create a file "actual" instead of writing to stdout 196# test can create a file "actual" instead of writing to stdout
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 9494ac2de..19f2915ce 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -329,6 +329,10 @@ line with \\
329continuation 329continuation
330" 330"
331 331
332testing "sed s///NUM test" \
333 "sed -e 's/a/b/2; s/a/c/g'" \
334 "cb\n" "" "aa\n"
335
332# testing "description" "commands" "result" "infile" "stdin" 336# testing "description" "commands" "result" "infile" "stdin"
333 337
334exit $FAILCOUNT 338exit $FAILCOUNT
diff --git a/testsuite/test.tests b/testsuite/test.tests
index 2c92e34ba..1c2edaf62 100755
--- a/testsuite/test.tests
+++ b/testsuite/test.tests
@@ -76,4 +76,24 @@ testing "test ! a = b -a ! c = d: should be true (0)" \
76 "0\n" \ 76 "0\n" \
77 "" "" 77 "" ""
78 78
79testing "test '!' = '!': should be true (0)" \
80 "busybox test '!' = '!'; echo \$?" \
81 "0\n" \
82 "" ""
83
84testing "test '(' = '(': should be true (0)" \
85 "busybox test '(' = '('; echo \$?" \
86 "0\n" \
87 "" ""
88
89testing "test '!' '!' = '!': should be false (1)" \
90 "busybox test '!' '!' = '!'; echo \$?" \
91 "1\n" \
92 "" ""
93
94testing "test '!' '(' = '(': should be false (1)" \
95 "busybox test '!' '(' = '('; echo \$?" \
96 "1\n" \
97 "" ""
98
79exit $FAILCOUNT 99exit $FAILCOUNT