aboutsummaryrefslogtreecommitdiff
path: root/tests/grep.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-30 18:28:39 -0600
committerRob Landley <rob@landley.net>2016-01-30 18:28:39 -0600
commitb97d8211fa5c382f32e9a9f606a8566bd2ec09fb (patch)
treee0b0dc702efd704f60649a8b83b9f8b09455fb74 /tests/grep.test
parentca311f1a41a579a57076adfeb2cc08b20dbca21a (diff)
downloadtoybox-b97d8211fa5c382f32e9a9f606a8566bd2ec09fb.tar.gz
Add grep -A
Diffstat (limited to 'tests/grep.test')
-rwxr-xr-xtests/grep.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test
index f3bc9a3b..be8bc85c 100755
--- a/tests/grep.test
+++ b/tests/grep.test
@@ -97,3 +97,6 @@ testing "grep -w \\1" "grep -wo '\\(x\\)\\1'" "xx\n" "" "xx"
testing "grep -o ''" "grep -o '' input" "" "one one one\n" ""
testing "grep backref" 'grep -e "a\(b\)" -e "b\(c\)\1"' "bcc\nab\n" \
"" "bcc\nbcb\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"