diff options
author | Ron Yorston <rmy@pobox.com> | 2014-10-06 12:50:22 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-10-06 12:50:22 +0100 |
commit | b04d11dcbadda2620743a1dd923938f2f3043a38 (patch) | |
tree | 971afe425a81304b79e44122e220c7a69efe2616 /testsuite | |
parent | 124bbf02948b7ac0babb4ead04acd1559db182d3 (diff) | |
parent | 760d035699c4a878f9109544c1d35ea0d5f6b76c (diff) | |
download | busybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.tar.gz busybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.tar.bz2 busybox-w32-b04d11dcbadda2620743a1dd923938f2f3043a38.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/grep.tests | 20 | ||||
-rwxr-xr-x | testsuite/sed.tests | 4 | ||||
-rwxr-xr-x | testsuite/test.tests | 20 |
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 | ||
175 | mkdir -p grep.testdir/foo | ||
176 | echo bar > grep.testdir/foo/file | ||
177 | ln -s foo grep.testdir/symfoo | ||
178 | testing "grep -r on symlink to dir" \ | ||
179 | "grep -r . grep.testdir/symfoo" \ | ||
180 | "grep.testdir/symfoo/file:bar\n" \ | ||
181 | "" "" | ||
182 | rm -Rf grep.testdir | ||
183 | |||
184 | # But -r on dir/symlink_to_dir should not recurse into symlink_to_dir | ||
185 | mkdir -p grep.testdir/foo | ||
186 | echo bar > grep.testdir/foo/file | ||
187 | ln -s foo grep.testdir/symfoo | ||
188 | testing "grep -r on dir/symlink to dir" \ | ||
189 | "grep -r . grep.testdir" \ | ||
190 | "grep.testdir/foo/file:bar\n" \ | ||
191 | "" "" | ||
192 | rm -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 \\ | |||
329 | continuation | 329 | continuation |
330 | " | 330 | " |
331 | 331 | ||
332 | testing "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 | ||
334 | exit $FAILCOUNT | 338 | exit $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 | ||
79 | testing "test '!' = '!': should be true (0)" \ | ||
80 | "busybox test '!' = '!'; echo \$?" \ | ||
81 | "0\n" \ | ||
82 | "" "" | ||
83 | |||
84 | testing "test '(' = '(': should be true (0)" \ | ||
85 | "busybox test '(' = '('; echo \$?" \ | ||
86 | "0\n" \ | ||
87 | "" "" | ||
88 | |||
89 | testing "test '!' '!' = '!': should be false (1)" \ | ||
90 | "busybox test '!' '!' = '!'; echo \$?" \ | ||
91 | "1\n" \ | ||
92 | "" "" | ||
93 | |||
94 | testing "test '!' '(' = '(': should be false (1)" \ | ||
95 | "busybox test '!' '(' = '('; echo \$?" \ | ||
96 | "1\n" \ | ||
97 | "" "" | ||
98 | |||
79 | exit $FAILCOUNT | 99 | exit $FAILCOUNT |