aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-30 22:07:58 -0600
committerRob Landley <rob@landley.net>2016-01-30 22:07:58 -0600
commit36aed25f3f54f7871d5810adfe99d96944e0afb4 (patch)
tree1d5a073c5bbb799128aadb086adef06deafb34e8 /tests
parentb97d8211fa5c382f32e9a9f606a8566bd2ec09fb (diff)
downloadtoybox-36aed25f3f54f7871d5810adfe99d96944e0afb4.tar.gz
Add grep -B -C
Diffstat (limited to 'tests')
-rwxr-xr-xtests/grep.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test
index be8bc85c..aa11c704 100755
--- a/tests/grep.test
+++ b/tests/grep.test
@@ -100,3 +100,8 @@ testing "grep backref" 'grep -e "a\(b\)" -e "b\(c\)\1"' "bcc\nab\n" \
testing "grep -A" "grep -A 2 yes" "yes\nno\nno\n--\nyes\nno\nno\nyes\nno\n" \
"" "yes\nno\nno\nno\nyes\nno\nno\nyes\nno"
+testing "grep -B" "grep -B 1 yes" "no\nyes\n--\nno\nyes\nno\nyes\n" \
+ "" "no\nno\nno\nyes\nno\nno\nyes\nno\nyes"
+testing "grep -C" "grep -C 1 yes" \
+ "yes\nno\n--\nno\nyes\nno\nno\nyes\nno\nyes\nno\n" \
+ "" "yes\nno\nno\nno\nyes\nno\nno\nyes\nno\nyes\nno\nno"