• Home
  • Raw
  • Download

Lines Matching refs:testing

3 [ -f testing.sh ] && . testing.sh
10 testing "grep -c" "grep -c 123 input" "3\n" "123\ncount 123\n123\nfasdfasdf" ""
15 testing "grep -l" "grep -l test foo foo2 foo3" "foo\nfoo2\n" "" ""
18 testing "grep -q" "grep -q test input && echo yes" "yes\n" "this is a test\n" ""
19 testing "grep -E" "grep -E '[0-9]' input" "1234123asdfas123123\n1\n" \
21 testing "grep -e" "grep -e '[0-9]' input" "1234123asdfas123123\n1\n" \
23 testing "grep -e -e" "grep -e one -e two -e three input" \
25 testing "grep -F" "grep -F is input" "this is test\nthis is test2\n" \
31 testing "grep -H" "grep -H is foo foo2 foo3" "foo:this is test\nfoo:this is test2\nfoo2:hello this …
34 testing "grep -b" "grep -b is input" "0:this is test\n13:this is test2\n" \
36 testing "grep -i" "grep -i is input" "thisIs test\nthis is test2\n" \
38 testing "grep -n" "grep -n is input" "1:this is test\n2:this is test2\n" \
40 testing "grep -o" "grep -o is input" "is\nis\nis\nis\n" \
42 testing "grep -s" "grep -hs hello asdf input 2>&1" "hello\n" "hello\n" ""
43 testing "grep -v" "grep -v abc input" "1234123asdfas123123\n1ABa\n" \
45 testing "grep -w" "grep -w abc input" "abc\n123 abc\nabc 123\n123 abc 456\n" \
47 testing "grep -x" "grep -x abc input" "abc\n" \
50 testing "grep -H (standard input)" "grep -H abc" "(standard input):abc\n" \
52 testing "grep -l (standard input)" "grep -l abc" "(standard input)\n" \
54 testing "grep -n two inputs" "grep -hn def - input" "2:def\n2:def\n" \
57 testing "grep pattern with newline" "grep 'abc
61 testing "grep -lH" "grep -lH abc input" "input\n" "abc\n" ""
62 testing "grep -cn" "grep -cn abc input" "1\n" "abc\n" ""
63 testing "grep -cH" "grep -cH abc input" "input:1\n" "abc\n" ""
64 testing "grep -qs" "grep -qs abc none input && echo yes" "yes\n" "abc\n" ""
65 testing "grep -hl" "grep -hl abc input" "input\n" "abc\n" ""
66 testing "grep -b stdin" "grep -b one" "0:one\n4:one\n8:one\n" "" "one\none\none\n"
67 testing "grep -o overlap" "grep -bo aaa" "1:aaa\n" "" "baaaa\n"
69 testing "grep -co" "grep -co one input" "1\n" "one one one\n" ""
70 testing "grep -nom" "grep -nom 2 one" "1:one\n1:one\n1:one\n2:one\n2:one\n" \
72 testing "grep -vo" "grep -vo one input" "two\nthree\n" "onetwoonethreeone\n" ""
73 testing "grep no newline" "grep -h one input -" \
76 testing "grep -e multi" "grep -e one -ethree input" \
82 testing "grep -hr" "grep -hr one sub" "one\none\n" "" ""
83 testing "grep -r file" "grep -r three sub/two" "three\n" "" ""
84 testing "grep -r dir" "grep -r one sub | sort" "sub/one:one\nsub/two:one\n" \
89 testing "grep -Fx ''" "grep -Fx '' input" "" "one one one\n" ""
90 testing "grep -F ''" "grep -F '' input" "one one one\n" "one one one\n" ""
91 testing "grep -F -e blah -e ''" "grep -F -e blah -e '' input" "one one one\n" \
93 testing "grep -e blah -e ''" "grep -e blah -e '' input" "one one one\n" \
95 testing "grep -w ''" "grep -w '' input" "" "one one one\n" ""
96 testing "grep -w '' 2" "grep -w '' input" "one two\n" "one two\n" ""
97 testing "grep -w \\1" "grep -wo '\\(x\\)\\1'" "xx\n" "" "xx"
98 testing "grep -o ''" "grep -o '' input" "" "one one one\n" ""
99 testing "grep backref" 'grep -e "a\(b\)" -e "b\(c\)\1"' "bcc\nab\n" \
102 testing "grep -A" "grep -A 2 yes" "yes\nno\nno\n--\nyes\nno\nno\nyes\nno\n" \
104 testing "grep -B" "grep -B 1 yes" "no\nyes\n--\nno\nyes\nno\nyes\n" \
106 testing "grep -C" "grep -C 1 yes" \
109 testing "grep -HnC" "grep -HnC1 two" \