Home
last modified time | relevance | path

Searched refs:testing (Results 1 – 25 of 3697) sorted by relevance

12345678910>>...148

/third_party/toybox/tests/
Dsed.test5 testing 'as cat' 'sed ""' "one\ntwo\nthree" "" "one\ntwo\nthree"
7 SKIP_HOST=1 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"
[all …]
Dgrep.test3 [ -f testing.sh ] && . testing.sh
10 testing "-c" "grep -c 123 input" "3\n" "123\ncount 123\n123\nfasdfasdf" ""
15 testing "-l" "grep -l test foo foo2 foo3" "foo\nfoo2\n" "" ""
18 testing "-q" "grep -q test input && echo yes" "yes\n" "this is a test\n" ""
19 testing "-E" "grep -E '[0-9]' input" "1234123asdfas123123\n1\n" \
21 testing "-e" "grep -e '[0-9]' input" "1234123asdfas123123\n1\n" \
23 testing "-e -e" "grep -e one -e two -e three input" \
25 testing "-F" "grep -F is input" "this is test\nthis is test2\n" \
31 testing "-H" "grep -H is foo foo2 foo3" "foo:this is test\nfoo:this is test2\nfoo2:hello this is te…
34 testing "-b" "grep -b is input" "0:this is test\n13:this is test2\n" \
[all …]
Dexpr.test3 [ -f testing.sh ] && . testing.sh
5 testing "integer" "expr 5" "5\n" "" ""
6 testing "integer negative" "expr -5" "-5\n" "" ""
7 testing "string" "expr astring" "astring\n" "" ""
8 testing "addition" "expr 1 + 3" "4\n" "" ""
9 testing "5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" ""
10 testing "( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" ""
11 testing ">" "expr 3 \> 2" "1\n" "" ""
12 testing "* / same priority" "expr 4 \* 3 / 2" "6\n" "" ""
13 testing "/ * same priority" "expr 3 / 2 \* 4" "4\n" "" ""
[all …]
Dfind.test3 [ -f testing.sh ] && . testing.sh
23 testing "-type l -a -type d -o -type p" \
25 testing "-type l -type d -o -type p" "find dir -type l -type d -o -type p" \
27 testing "-type l -o -type d -a -type p" \
29 testing "-type l -o -type d -type p" "find dir -type l -o -type d -type p" \
31 testing "-type l ( -type d -o -type l )" \
33 testing "extra parentheses" \
36 testing "( -type p -o -type d ) -type p" \
38 testing "-type l -o -type d -type p -o -type f" \
44 testing "-type f -a -print" \
[all …]
Ddd.test6 [ -f testing.sh ] && . testing.sh
14 testing "count=2" "dd if=input count=2 ibs=1 $opt" "hi" "high\n" ""
15 testing "count= 2" "dd if=input 'count= 2' ibs=1 $opt" "hi" "high\n" ""
16 toyonly testing "count=0x2" "dd if=input 'count=0x2' ibs=1 $opt" "hi" \
18 testing "count=-2" "dd if=input 'count=-2' ibs=1 2>/dev/null || echo errored" "errored\n" "" ""
20 testing "if=(file)" "dd if=input $opt" "I WANT\n" "I WANT\n" ""
21 testing "of=(file)" "dd of=file $opt && cat file" "I WANT\n" "" "I WANT\n"
22 testing "if=file of=file" "dd if=input of=foo $opt && cat foo && rm -f foo" \
24 testing "if=file | dd of=file" "dd if=input $opt | dd of=foo $opt &&
26 testing "(stdout)" "dd $opt" "I WANT\n" "" "I WANT\n"
[all …]
Dseq.test3 [ -f testing.sh ] && . testing.sh
7 testing "(exit with error)" "seq 2> /dev/null || echo yes" "yes\n" "" ""
8 testing "(exit with error)" "seq 1 2 3 4 2> /dev/null || echo yes" \
10 testing "one argument" "seq 3" "1\n2\n3\n" "" ""
11 testing "two arguments" "seq 5 7" "5\n6\n7\n" "" ""
12 testing "two arguments reversed" "seq 7 5" "" "" ""
13 testing "two arguments equal" "seq 3 3" "3\n" "" ""
14 testing "two arguments equal, arbitrary negative step" "seq 1 -15 1" \
16 testing "two arguments equal, arbitrary positive step" "seq 1 +15 1" \
18 testing "count up by 2" "seq 4 2 8" "4\n6\n8\n" "" ""
[all …]
Dxargs.test3 [ -f testing.sh ] && . testing.sh
7 testing "xargs" "xargs && echo yes" "hello\nyes\n" "" "hello"
8 testing "spaces" "xargs" \
11 testing "-n 0" "xargs -n 0 2>/dev/null || echo ok" "ok\n" \
13 testing "-n 1" "xargs -n 1" "one\n" "" "one\n"
14 testing "-n 2" "xargs -n 2" "one two\nthree\n" "" "one \ntwo\n three"
15 testing "-n exact match" "xargs -n 3" "one two three\n" "" "one two three"
16 testing "xargs2" "xargs -n2" "one two\nthree four\nfive\n" "" \
18 testing "-s too long" "xargs -s 9 echo 2>/dev/null; echo \$?" \
20 testing "-s 13" "xargs -s 13 echo" "one two\nthree\n" "" "one \ntwo\n three"
[all …]
Dsort.test6 [ -f testing.sh ] && . testing.sh
10 testing "unknown argument" 'sort --oops 2>/dev/null ; echo $?' "2\n" "" ""
11 testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" ""
12 testing "#2" "sort input" "010\n1\n3\n" "3\n1\n010\n" ""
13 testing "stdin" "sort" "a\nb\nc\n" "" "b\na\nc\n"
14 testing "numeric" "sort -n input" "1\n3\n010\n" "3\n1\n010\n" ""
15 testing "reverse" "sort -r input" "wook\nwalrus\npoint\npabst\naargh\n" \
17 testing "sort -o" "sort input -o output && cat output" "a\nb\nc\n" "c\na\nb\n" ""
18 testing "sort -o same" "sort input -o input && cat input" "a\nb\nc\n" "c\na\nb\n" ""
32 testing "one key" "sort -k4,4 input" \
[all …]
Dreadlink.test3 [ -f testing.sh ] && . testing.sh
9 testing "missing" "readlink notfound || echo yes" "yes\n" "" ""
14 testing "file" "readlink file || echo yes" "yes\n" "" ""
15 testing "-f dir" "readlink -f ." "$APWD\n" "" ""
16 testing "-f missing" "readlink -f notfound" "$APWD/notfound\n" "" ""
19 testing "link" "readlink link" "notfound\n" "" ""
20 testing "links" "readlink link link" "notfound\nnotfound\n" "" ""
21 testing "link->missing" "readlink -f link" "$APWD/notfound\n" "" ""
23 testing "stays relative" "readlink link" "../../\n" "" ""
26 testing "-f link->file" "readlink -f link" "$APWD/file\n" "" ""
[all …]
Dtail.test3 [ -f testing.sh ] && . testing.sh
9 testing "tail" "tail && echo yes" "oneyes\n" "" "one"
10 testing "file" "tail file1" \
12 testing "-n in bounds" "tail -n 3 file1" "nine\nten\neleven\n" "" ""
13 testing "-n out of bounds" "tail -n 999 file1" "$BIGTEST" "" ""
14 testing "-n+ in bounds" "tail -n +3 file1" \
16 testing "-n+ outof bounds" "tail -n +999 file1" "" "" ""
17 testing "-c in bounds" "tail -c 27 file1" \
19 testing "-c out of bounds" "tail -c 999 file1" "$BIGTEST" "" ""
20 testing "-c+ in bounds" "tail -c +27 file1" \
[all …]
Ddate.test3 [ -f testing.sh ] && . testing.sh
12 testing "-d @0" "TZ=$tz date -d @0" "Thu Jan 1 01:00:00 CET 1970\n" "" ""
13 testing "-d @0x123 invalid" "TZ=$tz date -d @0x123 2>/dev/null || echo expected error" "expected er…
18 toyonly testing "-d MMDDhhmm" \
20 toyonly testing "-d MMDDhhmmYY.SS" \
23 toyonly testing "-d MMDDhhmmCCYY" \
25 toyonly testing "-d MMDDhhmmCCYY.SS" \
29 testing "-d 1980-01-02" "TZ=$tz date -d 1980-01-02" "Wed Jan 2 00:00:00 CET 1980\n" "" ""
30 testing "-d 1980-01-02 12:34" "TZ=$tz date -d '1980-01-02 12:34'" "Wed Jan 2 12:34:00 CET 1980\n" …
31 testing "-d 1980-01-02 12:34:56" "TZ=$tz date -d '1980-01-02 12:34:56'" "Wed Jan 2 12:34:56 CET 19…
[all …]
Dtouch.test3 [ -f testing.sh ] && . testing.sh
7 testing "touch" "touch walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
8 testing "1 2 3" "touch one two three && rm one two three && echo yes" "yes\n" \
10 testing "-c" "touch -c walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
11 testing "-c missing" "touch -c warrus && [ ! -e warrus ] && echo yes" \
14 testing "-t" \
19 testing "-t MMDDhhmm" \
23 testing "-t YYMMDDhhmm" \
27 testing "-t CCYYMMDDhhmm" \
31 testing "-t seconds" \
[all …]
Dcut.test7 [ -f testing.sh ] && . testing.sh
16 testing "-b a,a,a" "cut -b 3,3,3 abc.txt" "e\np\ne\n" "" ""
17 testing "-b overlaps" "cut -b 1-3,2-5,7-9,9-10 abc.txt" \
19 testing "-b encapsulated" "cut -b 3-8,4-6 abc.txt" "e:two:\npha:be\ne quic\n" \
21 testing "-bO overlaps" \
24 testing "high-low error" "cut -b 8-3 abc.txt 2>/dev/null || echo err" "err\n" \
27 testing "-c a-b" "cut -c 4-10 abc.txt" ":two:th\nha:beta\n quick \n" "" ""
28 testing "-c a-" "cut -c 41- abc.txt" "\ntheta:iota:kappa:lambda:mu\ndog\n" "" ""
29 testing "-c -b" "cut -c -39 abc.txt" \
32 testing "-c a" "cut -c 40 abc.txt" "\n:\n \n" "" ""
[all …]
Dprintf.test6 [ -f testing.sh ] && . testing.sh
13 testing "text" "$PRINTF TEXT" "TEXT" "" ""
14 testing "escapes" "$PRINTF 'one\ntwo\n\v\t\r\f\e\b\athree'" \
16 testing "%b escapes" "$PRINTF %b 'one\ntwo\n\v\t\r\f\e\b\athree'" \
18 testing "null" "$PRINTF 'x\0y' | od -An -tx1" ' 78 00 79\n' "" ""
19 testing "trailing slash" "$PRINTF 'abc\'" 'abc\' "" ""
37 testing "extra args" "$PRINTF 'abc%s!%ddef\n' X 42 ARG 36" \
40 testing "'%3c'" "$PRINTF '%3c' x" " x" "" ""
41 testing "'%-3c'" "$PRINTF '%-3c' x" "x " "" ""
42 testing "'%+d'" "$PRINTF '%+d' 5" "+5" "" ""
[all …]
Difconfig.test22 [ -f testing.sh ] && . testing.sh
44 testing "dummy0 down and if config /-only" \
50 testing "dummy0 up" \
57 testing "dummy0 10.240.240.240" \
64 testing "dummy0 netmask 255.255.240.0" \
71 testing "dummy0 broadcast 10.240.240.255" \
78 testing "dummy0 default" \
85 testing "dummy0 mtu 1269" \
92 testing "dummy0 add ::2 -- too small mtu" \
99 testing "dummy0 mtu 2000" \
[all …]
Dfile.test3 [ -f testing.sh ] && . testing.sh
18 testing "directory" "file ." ".: directory\n" "" ""
19 testing "empty" "file empty" "empty: empty\n" "" ""
20 testing "bash.script" "file bash.script" "bash.script: /bin/bash script\n" "" ""
21 testing "bash.script with spaces" "file bash.script2" "bash.script2: /bin/bash script\n" "" ""
22 testing "env python script" "file env.python.script" "env.python.script: python script\n" "" ""
23 testing "ascii" "file ascii" "ascii: ASCII text\n" "" ""
24 testing "utf-8" "file $FILES/utf8/japan.txt | sed 's|$FILES/||'" \
26 testing "java class" "file $FILES/java.class | sed 's|$FILES/||'" \
28 testing "tar file" "file $FILES/tar/tar.tar | sed 's|$FILES/||'" \
[all …]
Dtar.test3 [ -f testing.sh ] && . testing.sh
45 testing "create file" "$TAR file | SUM 3" \
48 testing "pass file" "$TAR file | LST" \
54 testing "pass user" "tar -c --owner nobody --group root --mtime @0 file | LST" \
59 testing "pass group" "tar c --owner root --group nobody --mtime @0 file | LST" \
63 testing "pass mtime" \
67 testing "adjust mode" \
72 testing "create dir" "$TAR dir | SUM 3" \
75 testing "pass dir" "$TAR dir | LST" \
80 testing "create file in dir" "$TAR dir/file | SUM 3" \
[all …]
Dmktemp.test3 [ -f testing.sh ] && . testing.sh
7 testing "default template uses \$TMPDIR" "TMPDIR=. mktemp | grep -q '^./tmp\...........$' && echo y…
8 testing "default creates file" "test -f `TMPDIR=. mktemp` && echo yes" "yes\n" \
10 testing "-d creates dir" "test -d `TMPDIR=. mktemp -d` && echo yes" "yes\n" \
12 testing "TEMPLATE does not use \$TMPDIR" "TMPDIR=/t mktemp -u hello.XXXXXXXX | grep -q '^hello\....…
13 testing "/ in TEMPLATE works but ignores \$TMPDIR" "TMPDIR=/t mktemp -u /x/hello.XXXXXXXX | grep -q…
14 testing "/ in TEMPLATE with -p DIR is error" "TMPDIR=/t mktemp -p DIR -u /x/hello.XXXXXXXX 2>/dev/n…
15 testing "-t TEMPLATE uses \$TMPDIR" "TMPDIR=/t mktemp -u -t hello.XXXXXXXX | grep -q '^/t/hello\...…
16 testing "-t and TEMPLATE but no \$TMPDIR uses /tmp" "TMPDIR= mktemp -u -t hello.XXXXXXXX | grep -q …
17 testing "-p DIR and TEMPLATE should use DIR" "TMPDIR=/t mktemp -u -p DIR hello.XXXXXXXX | grep -q '…
[all …]
Dxxd.test3 [ -f testing.sh ] && . testing.sh
12 testing "file1" "xxd file1" \
15 testing "file1 -l" "xxd -l 2 file1" \
18 testing "-" "xxd -" \
20 testing "xxd" "xxd" \
22 testing "-c 8 -g 4 file1" "xxd -c 8 -g 4 file1" \
24 testing "-c 8 -g 3 file1" "xxd -c 8 -g 3 file1" \
27 testing "-i" "cat file1 | xxd -i -" " 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x73, 0x6f, …
29 testing "-o 0x8000" "xxd -o 0x8000 file1" "00008000: 7468 6973 2069 7320 736f 6d65 2074 6578 this …
31 testing "-p" "xxd -p file1" "7468697320697320736f6d6520746578740a\n" "" ""
[all …]
Dcmp.test3 [ -f testing.sh ] && . testing.sh
6 testing "one argument match" 'cmp input && echo yes' "yes\n" \
9 testing "one argument diff" 'cmp input | sed s/byte/char/' \
12 testing "missing file1 [fail]" 'cmp file1 input 2>/dev/null || echo $?' "2\n" "foo" ""
22 testing "identical files, stdout" "cmp input input2" "" "ab\nc\n" ""
23 testing "identical files, return code" "cmp input input2 && echo yes" "yes\n" "ab\nc\n" ""
25 testing "EOF, stderr" "cmp input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" ""
26 testing "EOF, return code" "cmp input input2 2>/dev/null || echo yes" "yes\n" "ab\nc\nx" ""
28 testing "diff, stdout" "cmp input input2 | sed s/byte/char/" \
30 testing "diff, return code" "cmp input input2 > /dev/null || echo yes" "yes\n" "ab\nx\nx" ""
[all …]
Dchattr.test3 [ -f testing.sh ] && . testing.sh
21 testing "[-/+]i FILE[write]" "$IN && echo "$_t" > testFile &&
24 testing "[-/+]i FILE[re-write]" "$IN && echo "$_t" > testFile &&
28 testing "[-/+]i FILE[append]" "$IN && echo "$_t" > testFile &&
31 testing "[-/+]i FILE[move]" "$IN && echo "$_t" > testFile &&
34 testing "[-/+]i FILE[delete]" "$IN && echo "$_t" > testFile &&
37 testing "[-/+]i FILE[read]" "$IN && echo "$_t" > testFile &&
40 testing "[-/+]a FILE[write]" "$IN && echo "$_t" > testFile &&
43 testing "[-/+]a FILE[re-write]" "$IN && echo "$_t" > testFile &&
48 testing "[-/+]a FILE[append]" "$IN && echo "$_t" > testFile &&
[all …]
Dchmod.test44 testing "$u$g$o $type" "chmod $u$g$o $type &&
51 testing "750 dir 640 file" \
56 testing "666 dir file" \
61 testing "765 *" "chmod 765 * &&
66 testing "u=r dir file" "chmod u=r dir file &&
70 testing "u=w dir file" "chmod u=w dir file &&
74 testing "u=x dir file" "chmod u=x dir file &&
78 testing "u+r dir file" "chmod u+r dir file &&
82 testing "u+w dir file" "chmod u+w dir file &&
86 testing "u+x dir file" "chmod u+x dir file &&
[all …]
Dnl.test3 [ -f testing.sh ] && . testing.sh
7 testing "nl" "nl" " 1\tone\n 2\ttwo\n 3\tthree\n" \
10 testing "explicit defaults" "nl -nrn -b a" \
15 testing "-nln" "nl -nln" "1 \tone\n2 \ttwo\n3 \tthree\n" \
17 testing "-nln -w" "nl -nln -w 8" \
20 testing "-nrz" "nl -nrz" "000001\tone\n000002\ttwo\n000003\tthree\n" \
23 testing "-nrz -w" "nl -w3 -nrz" "001\tone\n002\ttwo\n003\tthree\n" \
34 testing "-b t" "nl -b t" " \n 1\tone\n \n 2\ttwo\n" \
36 testing "-b n" "nl -b n" " one\n two\n three\n" \
38 testing "-sook -b p" "nl -sook -bpoing" \
[all …]
Dfmt.test3 [ -f testing.sh ] && . testing.sh
13 testing "join" "fmt en.txt" "hello world this is some text\n" "" ""
14 testing "split" "fmt -w 10 en.txt" "hello\nworld\nthis is\nsome text\n" "" ""
15 testing "no room" "echo 'hello world' | fmt -w 1" "hello\nworld\n" "" ""
16 testing "blank line" "echo -e 'first paragraph of text\n\nand another' | fmt -w 10" "first\nparagra…
17 testing "ws-only line" "echo -e 'hello\n \nworld' | fmt -w 10" "hello\n\nworld\n" "" ""
18 testing "leading space" "echo ' hello world' | fmt -w 5" " hello\n world\n" "" ""
19 testing "utf8" "fmt -w 10 kr.txt" "동해물과\n백두산이\n마르고\n닳도록\n하나님이\n보우하사\n우리나라\n만세.\n" "" ""
21 testing "no newline" "fmt -w 10" "and\nthisisaverylongline\n" \
23 testing "" "fmt -w 9" "1 2 3 4\n5 6 7 8\n9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n"
[all …]
/third_party/grpc/test/cpp/ext/filters/census/
Dstats_plugin_end2end_test.cc39 namespace testing { namespace
46 using ::opencensus::stats::testing::TestUtils;
69 class StatsPluginEnd2EndTest : public ::testing::Test {
162 ::testing::UnorderedElementsAre(::testing::Pair( in TEST_F()
163 ::testing::ElementsAre(client_method_name_, TEST_TAG_VALUE), 17))); in TEST_F()
166 ::testing::UnorderedElementsAre(::testing::Pair( in TEST_F()
167 ::testing::ElementsAre(server_method_name_), 17))); in TEST_F()
171 ::testing::Pair(::testing::ElementsAre("OK", TEST_TAG_VALUE), 1), in TEST_F()
172 ::testing::Pair(::testing::ElementsAre("CANCELLED", TEST_TAG_VALUE), 1), in TEST_F()
173 ::testing::Pair(::testing::ElementsAre("UNKNOWN", TEST_TAG_VALUE), 1), in TEST_F()
[all …]

12345678910>>...148