Home | History | Annotate | Download | only in tests

Lines Matching refs:testing

3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "head, stdin" "head -n 1 && echo yes" "one\nyes\n" "" "one\ntwo"
8 testing "head, stdin via -" "head -n 1 - && echo yes" "one\nyes\n" "" "one\ntwo"
9 testing "head, file" "head input -n 1 && echo yes" "one\nyes\n" "one\ntwo" ""
10 testing "-number" "head -2 input && echo yes" "one\ntwo\nyes\n" \
12 testing "head, default lines" "head" "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" "" "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12"
15 testing "-v file" "head -v -n 1 input" "==> input <==\none\n" "one\ntwo\n" ""
16 testing "-v stdin" "head -v -n 1 | sed 's/==> standard input <==/==> - <==/'" \
19 testing "file and stdin" "head -n 1 input - | sed 's/==> standard input <==/==> - <==/'" \
25 testing "head, multiple files" "head -n 2 input file1" "==> input <==\none\ntwo\n\n==> file1 <==\nfoo\nbar\n" "one\ntwo\nthree\n" ""
26 testing "-q, multiple files" "head -q -n 2 input file1" "one\ntwo\nfoo\nbar\n" \
30 testing "-c 3" "head -c 3" "one" "" "one\ntwo"
31 testing "-c bigger than input" "head -c 3" "a" "" "a"
32 testing "-c 3 -n 1" "head -c 3 -n 1" "one\n" "" "one\ntwo"
33 testing "-n 1 -c 3" "head -n 1 -c 3" "one" "" "one\ntwo"