diff options
author | Ron Yorston <rmy@pobox.com> | 2020-05-29 10:49:00 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-05-29 11:03:33 +0100 |
commit | 53c09d0e1720bd927a2995f87df324a9854f1771 (patch) | |
tree | 982b357d9d188cfb6a1d488ebaba6c42d818209f /testsuite | |
parent | d4247a9f03290a96433e18dba538404005a21311 (diff) | |
parent | 45fa3f18adf57ef9d743038743d9c90573aeeb91 (diff) | |
download | busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.gz busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.bz2 busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.zip |
Merge branch 'busybox' into mergeFRP-3466-g53c09d0e1
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/grep.tests | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests index 26f8e69cf..e38278810 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests | |||
@@ -129,6 +129,12 @@ testing "grep -v -f EMPTY_FILE" \ | |||
129 | "" \ | 129 | "" \ |
130 | "test\n" | 130 | "test\n" |
131 | 131 | ||
132 | testing "grep -vxf EMPTY_FILE" \ | ||
133 | "grep -vxf input" \ | ||
134 | "test\n" \ | ||
135 | "" \ | ||
136 | "test\n" | ||
137 | |||
132 | testing "grep -Fw matches only words" \ | 138 | testing "grep -Fw matches only words" \ |
133 | "grep -Fw foo input" \ | 139 | "grep -Fw foo input" \ |
134 | "" \ | 140 | "" \ |
@@ -184,6 +190,18 @@ testing "grep -x -v -e EXP1 -e EXP2 finds nothing if either EXP matches" \ | |||
184 | "" \ | 190 | "" \ |
185 | " aa bb cc\n" | 191 | " aa bb cc\n" |
186 | 192 | ||
193 | testing "grep PATTERN can be a newline-delimited list" \ | ||
194 | 'grep -Fv "$(printf "foo\nbar\n")"' \ | ||
195 | "baz\n" \ | ||
196 | "" \ | ||
197 | "foo\nbar\nbaz\n" | ||
198 | |||
199 | testing "grep -e PATTERN can be a newline-delimited list" \ | ||
200 | 'grep -Fv -e "$(printf "foo\nbar\n")"' \ | ||
201 | "baz\n" \ | ||
202 | "" \ | ||
203 | "foo\nbar\nbaz\n" | ||
204 | |||
187 | # -r on symlink to dir should recurse into dir | 205 | # -r on symlink to dir should recurse into dir |
188 | mkdir -p grep.testdir/foo | 206 | mkdir -p grep.testdir/foo |
189 | echo bar > grep.testdir/foo/file | 207 | echo bar > grep.testdir/foo/file |