Lines Matching full:testing
3 #testing "name" "command" "result" "infile" "stdin"
5 testing 'as cat' 'sed ""' "one\ntwo\nthree" "" "one\ntwo\nthree"
7 testing 'sed - - twice' 'sed "" - -' "hello\n" "" "hello\n"
8 testing '-n' 'sed -n ""' "" "" "one\ntwo\nthree"
9 testing '-n p' 'sed -n p' "one\ntwo\nthree" "" "one\ntwo\nthree"
10 testing 'explicit pattern' 'sed -e p -n' "one\ntwo\nthree" "" \
14 testing '' 'sed -n 1p' "one\n" "" "one\ntwo\nthree"
15 testing '' 'sed 2p' "one\ntwo\ntwo\nthree" "" "one\ntwo\nthree"
16 testing '' 'sed -n 2p' "two\n" "" "one\ntwo\nthree"
17 testing '-n $p' 'sed -n \$p' "three" "" "one\ntwo\nthree"
18 testing 'as cat #2' "sed -n '1,\$p'" "one\ntwo\nthree" "" "one\ntwo\nthree"
19 testing 'no input means no last line' "sed '\$a boing'" "" "" ""
20 testing '-n $,$p' 'sed -n \$,\$p' 'three' '' 'one\ntwo\nthree'
21 testing '' 'sed -n 1,2p' "one\ntwo\n" "" "one\ntwo\nthree"
22 testing '' 'sed -n 2,3p' "two\nthree" "" "one\ntwo\nthree"
23 testing '' 'sed -n 2,1p' "two\n" "" "one\ntwo\nthree"
24 testing '$ with 2 inputs' 'sed -n \$p - input' "four\n" "four\n" \
26 testing '' 'sed -n /two/p' "two\n" "" "one\ntwo\nthree"
27 testing '' 'sed -n 1,/two/p' 'one\ntwo\n' '' 'one\ntwo\nthree'
28 testing '' 'sed -n /one/,2p' 'one\ntwo\n' '' 'one\ntwo\nthree'
29 testing '' 'sed -n 1,/one/p' 'one\ntwo\nthree' '' 'one\ntwo\nthree'
30 testing '' 'sed -n /one/,1p' 'one\n' '' 'one\ntwo\nthree'
31 testing 'sed -n /two/,$p' 'sed -n /two/,\$p' 'two\nthree' '' 'one\ntwo\nthree'
35 testing '' 'sed -n 3p' "three" "" "one\ntwo\nthree"
36 testing 'prodigal newline' "sed -n '1,\$p' - input" \
38 testing 'Newline only added if further output' "sed -n 3p - input" "three" \
42 testing 'match \t tab' "sed -n '/\t/p'" "\tx\n" "" "\tx\n"
43 testing 'match t delim disables \t tab' "sed -n '\t\txtp'" "" "" "\tx\n"
44 testing 'match t delim makes \t literal t' \
46 testing 'match n delim' "sed -n '\n\txnp'" "\tx\n" "" "\tx\n"
47 testing 'match n delim disables \n newline' "sed -n '\n\nxnp'" "" "" "\nx\n"
48 toyonly testing 'match \n literal n' "sed -n '\n\nxnp'" "nx\n" "" "nx\n"
49 testing 'end match does not check starting match line' \
51 testing 'end match/start match mixing number/letter' \
53 testing 'num then regex' 'sed -n 2,/d/p' 'b\nc\nd\n' '' 'a\nb\nc\nd\ne\nf\n'
54 testing 'regex then num' 'sed -n /b/,4p' 'b\nc\nd\n' '' 'a\nb\nc\nd\ne\nf\n'
55 testing 'multiple regex address match' 'sed -n /on/,/off/p' \
58 testing 'regex address overlap' 'sed -n /on/,/off/p' "on\nzap\noffon\n" "" \
60 testing 'getdelim with nested [:blah:]' 'sed -n "sa\a[a[:space:]bc]*aXXagp"' \
62 testing '[ in [[]' "sed 's@[[]@X@g'" "X" "" "["
63 testing '[[] with ] as delimiter' "sed 's][[]]X]g'" "X" "" "["
64 testing '[[] with [ as delimiter' "sed 's[\[\[][X['" "X" "" "["
70 testing 'prodigaler newline' 'sed -e a\\ -e woo' 'one\nwoo\n' '' 'one'
71 testing "aci" \
75 testing "b loop" "sed ':woo;=;b woo' | head -n 5" '1\n1\n1\n1\n1\n' "" "X"
76 testing "b skip" "sed -n '2b zap;d;:zap;p'" "two\n" "" "one\ntwo\nthree"
77 testing "b end" "sed -n '2b;p'" "one\nthree" "" "one\ntwo\nthree"
78 testing "c range" "sed '2,4c blah'" "one\nblah\nfive\nsix" "" \
80 testing "c {range}" "sed -e '2,4{c blah' -e '}'" \
83 testing "c multiple continuation" \
85 toyonly testing "c empty continuation" "sed -e 'c\\'" "\n" "" "hello"
86 testing "D further processing depends on whether line is blank" \
89 testing 'newline staying away' 'sed s/o/x/' 'xne\ntwx' '' 'one\ntwo'
92 #testing 'sed what, _really_?' 'sed -e a\\ && echo yes really' \
97 testing "match empty line" "sed -e 's/^\$/@/'" "@\n" "" "\n"
99 testing '\1' "sed 's/t\\(w\\)o/za\\1py/'" "one\nzawpy\nthree" "" \
101 testing '\1 p' "sed 's/t\\(w\\)o/za\\1py/p'" "one\nzawpy\nzawpy\nthree" \
103 testing '\1 no newline' "sed 's/t\\(w\\)o/za\\1py/'" "one\nzawpy" "" \
105 testing '\1 p no newline' "sed 's/t\\(w\\)o/za\\1py/p'" \
107 testing '-n s//\1/p' "sed -n 's/t\\(w\\)o/za\\1py/p'" "zawpy" "" "one\ntwo"
108 testing '-n s//\1/p no newline' "sed -n 's/t\\(w\\)o/za\\1py/p'" "zawpy" \
110 testing 'backref error' \
113 testing 'empty match after nonempty match' "sed -e 's/a*/c/g'" 'cbcncgc' \
115 testing 'empty match' "sed -e 's/[^ac]*/A/g'" 'AaAcA' '' 'abcde'
116 testing 's///#comment' "sed -e 's/TWO/four/i#comment'" "one\nfour\nthree" \
118 testing 's///num off end' 'sed -e s/e//2' 'e\n' '' 'e\n'
120 testing 'N flushes pending a and advances match counter' \
122 testing "delimiter in regex [char range] doesn't count" "sed -e 's/[/]//'" \
124 testing "delete regex range start line after trigger" \
127 testing "blank pattern repeats last pattern" \
134 testing "" "sed -e '1a\' -e 'huh'" "meep\nhuh\n" "" "meep"
135 testing "" "sed -f input" "blah\nboom\n" '1a\\\nboom' 'blah'
136 testing "" "sed -f - input" "blah\nboom\n" 'blah' '1a\\\nboom'
137 testing "" "sed '1a\
140 testing "" "sed -e '/x/c\' -e 'y'" 'y\n' '' 'x\n'
141 testing "" "sed -e 's/a[([]*b/X/'" 'X' '' 'a[(b'
142 toyonly testing "" "sed 'y/a\\bc/de\f/'" "db\f" "" "abc"
143 testing "[a-a] (for perl)" "sed '"'s/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g'"'" \
150 testing "trailing a\ (for debian)" "sed 'a\\'" "hello\n" "" "hello"
154 toyonly testing "skip start of range" "sed -e n -e '1,2s/b/c/'" "a\nb\n" "" "a\nb\n"
155 testing "range +1" "sed -ne '/blah/,+1p'" "blah\n6\n" "" \
157 testing "range +0" "sed -ne '/blah/,+0p'" "blah\n" "" \
159 testing "range +3" "sed -ne '2,+3p'" "2\n3\n4\n5\n" "" \
162 testing "not -s" "sed -n 1p input -" "one" "one" "two"
163 testing "-s" "sed -sn 1p input -" "one\ntwo" "one\n" "two"
170 testing "bonus backslashes" \
175 testing "end b with }" "sed -n '/START/{:a;n;/END/q;p;ba}'" "b\nc\n" \
178 testing '-z' 'sed -z "s/\n/-/g"' "a-b-c" "" "a\nb\nc"
182 testing '\n with empty capture' \
186 testing '\n too high' \
189 toyonly testing 's///x' 'sed "s/(hello )?(world)/\2/x"' "world" "" "hello world"
193 testing 'megabyte s/x/y/g (20 sec timeout)' \
198 testing 's i and I' 'sed s/o/0/ig' "f00l F00L" "" "fool FOOL"