Searched refs:testing (Results 1 - 25 of 1389) sorted by relevance

1234567891011>>

/external/toybox/tests/
H A Dfactor.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "factor -32" "factor -32" "-32: -1 2 2 2 2 2\n" "" ""
8 testing "factor 0" "factor 0" "0: 0\n" "" ""
9 testing "factor 1" "factor 1" "1: 1\n" "" ""
10 testing "factor 2" "factor 2" "2: 2\n" "" ""
11 testing "factor 3" "factor 3" "3: 3\n" "" ""
12 testing "factor 4" "factor 4" "4: 2 2\n" "" ""
13 testing "facto
[all...]
H A Dsed.test3 #testing "name" "command" "result" "infile" "stdin"
5 testing 'sed as cat' 'sed ""' "one\ntwo\nthree" "" "one\ntwo\nthree"
7 SKIP_HOST=1 testing 'sed - - twice' 'sed "" - -' "hello\n" "" "hello\n"
8 testing 'sed -n' 'sed -n ""' "" "" "one\ntwo\nthree"
9 testing 'sed -n p' 'sed -n p' "one\ntwo\nthree" "" "one\ntwo\nthree"
10 testing 'sed 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 'se
[all...]
H A Dseq.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "seq (exit with error)" "seq 2> /dev/null || echo yes" "yes\n" "" ""
8 testing "seq (exit with error)" "seq 1 2 3 4 2> /dev/null || echo yes" \
10 testing "seq one argument" "seq 3" "1\n2\n3\n" "" ""
11 testing "seq two arguments" "seq 5 7" "5\n6\n7\n" "" ""
12 testing "seq two arguments reversed" "seq 7 5" "" "" ""
13 testing "seq two arguments equal" "seq 3 3" "3\n" "" ""
14 testing "se
[all...]
H A Duudecode.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "uudecode uu empty file" "uudecode -o /dev/stdout && echo yes" \
9 testing "uudecode uu 1-char" "uudecode -o /dev/stdout" "a" "" \
11 testing "uudecode uu 2-char" "uudecode -o /dev/stdout" "ab" "" \
13 testing "uudecode uu 3-char" "uudecode -o /dev/stdout" "abc" "" \
16 testing "uudecode b64 empty file" "uudecode -o /dev/stdout && echo yes" \
18 testing "uudecode b64 1-char" "uudecode -o /dev/stdout" "a" "" \
20 testing "uudecod
[all...]
H A Duuencode.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "uuencode not enough args [fail]" "uuencode 2>/dev/null" "" "" ""
9 testing "uuencode uu empty file" "uuencode test" \
11 testing "uuencode uu 1-char" "uuencode test" \
13 testing "uuencode uu 2-char" "uuencode test" \
15 testing "uuencode uu 3-char" "uuencode test" \
18 testing "uuencode b64 empty file" "uuencode -m test" \
20 testing "uuencod
[all...]
H A Dnl.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "nl" "nl" " 1\tone\n 2\ttwo\n 3\tthree\n" \
10 testing "nl explicit defaults" "nl -nrn -b a" \
15 testing "nl -nln" "nl -nln" "1 \tone\n2 \ttwo\n3 \tthree\n" \
17 testing "nl -nln -w" "nl -nln -w 8" \
20 testing "nl -nrz" "nl -nrz" "000001\tone\n000002\ttwo\n000003\tthree\n" \
23 testing "nl -nrz -w" "nl -w3 -nrz" "001\tone\n002\ttwo\n003\tthree\n" \
34 testing "n
[all...]
H A Dexpr.test3 [ -f testing.sh ] && . testing.sh
5 testing "expr integer" "expr 5" "5\n" "" ""
6 testing "expr integer negative" "expr -5" "-5\n" "" ""
7 testing "expr string" "expr astring" "astring\n" "" ""
8 testing "expr 1 + 3" "expr 1 + 3" "4\n" "" ""
9 testing "expr 5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" ""
10 testing "expr ( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" ""
11 testing "expr * / same priority" "expr 4 \* 3 / 2" "6\n" "" ""
12 testing "exp
[all...]
H A Dbasename.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
8 testing "basename /-only" "basename ///////" "/\n" "" ""
9 testing "basename trailing /" "basename a//////" "a\n" "" ""
10 testing "basename combined" "basename /////a///b///c///d/////" "d\n" "" ""
13 testing "basename suffix" "basename a/b/c/d.suffix .suffix" "d\n" "" ""
16 testing "basename suffix=result" "basename .txt .txt" ".txt\n" "" ""
19 testing "basename reappearing suffix 1" "basename a.txt.txt .txt" "a.txt\n" "" ""
20 testing "basenam
[all...]
H A Ddirname.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "dirname /-only" "dirname ///////" "/\n" "" ""
8 testing "dirname trailing /" "dirname a//////" ".\n" "" ""
9 testing "dirname combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" ""
10 testing "dirname /a/" "dirname /////a///" "/\n" "" ""
H A Difconfig.test22 [ -f testing.sh ] && . testing.sh
31 #testing "name" "command" "result" "infile" "stdin"
38 testing "ifconfig dummy0 down and if config /-only" \
44 testing "ifconfig dummy0 up" \
51 testing "ifconfig dummy0 10.240.240.240" \
58 testing "ifconfig dummy0 netmask 255.255.240.0" \
65 testing "ifconfig dummy0 broadcast 10.240.240.255" \
72 testing "ifconfig dummy0 default" \
79 testing "ifconfi
[all...]
H A Dxargs.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "xargs" "xargs && echo yes" "hello\nyes\n" "" "hello"
8 testing "xargs spaces" "xargs" \
11 testing "xargs -n 0" "xargs -n 0 2>/dev/null || echo ok" "ok\n" \
13 testing "xargs -n 2" "xargs -n 2" "one two\nthree\n" "" "one \ntwo\n three"
14 testing "xargs -n exact match" "xargs -n 3" "one two three\n" "" "one two three"
15 testing "xargs2" "xargs -n2" "one two\nthree four\nfive\n" "" \
17 testing "xarg
[all...]
H A Dcmp.test3 [ -f testing.sh ] && . testing.sh
5 testing "cmp not enough arguments [fail]" "cmp input 2>/dev/null || echo yes" "yes\n" "foo" ""
6 testing "cmp missing file1 [fail]" "cmp file1 input 2>/dev/null || echo yes" "yes\n" "foo" ""
9 #testing "cmp directory [fail]" "cmp dir dir 2>/dev/null || echo yes" \
16 testing "cmp identical files, stdout" "cmp input input2" "" "ab\nc\n" ""
17 testing "cmp identical files, return code" "cmp input input2 && echo yes" "yes\n" "ab\nc\n" ""
19 testing "cmp EOF, stderr" "cmp input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" ""
20 testing "cmp EOF, return code" "cmp input input2 2>/dev/null || echo yes" "yes\n" "ab\nc\nx" ""
22 testing "cm
[all...]
H A Dsort.test6 [ -f testing.sh ] && . testing.sh
10 testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" ""
11 testing "sort #2" "sort input" "010\n1\n3\n" "3\n1\n010\n" ""
12 testing "sort stdin" "sort" "a\nb\nc\n" "" "b\na\nc\n"
13 testing "sort numeric" "sort -n input" "1\n3\n010\n" "3\n1\n010\n" ""
14 testing "sort reverse" "sort -r input" "wook\nwalrus\npoint\npabst\naargh\n" \
32 testing "sort one key" "sort -k4,4 input" \
44 testing "sort key range with numeric option" "sort -k2,3n input" \
55 testing "sor
[all...]
H A Dcat.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
9 testing "cat" "cat && echo yes" "oneyes\n" "" "one"
10 testing "cat -" "cat - && echo yes" "oneyes\n" "" "one"
11 testing "cat file1 file2" "cat file1 file2" "one\ntwo\n" "" ""
12 testing "cat - file" "cat - file1" "zero\none\n" "" "zero\n"
13 testing "cat file -" "cat file1 -" "one\nzero\n" "" "zero\n"
15 testing "cat file1 notfound file2" \
19 testing "ca
[all...]
H A Dgrep.test3 [ -f testing.sh ] && . testing.sh
8 #testing "name" "command" "result" "infile" "stdin"
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 "gre
[all...]
H A Dhead.test3 [ -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 "head -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"
17 testing "head, multiple files" "head -n 2 input file1" "==> input <==\none\ntwo\n\n==> file1 <==\nfoo\nbar\n" "one\ntwo\nthree\n" ""
H A Dmd5sum.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
10 testing "md5sum ''" "md5sum" "d41d8cd98f00b204e9800998ecf8427e -\n" "" ""
11 testing "md5sum infile" "md5sum input" \
13 testing "md5sum two files" "md5sum - input" \
16 testing "md5sum 4" "md5sum" "c3fcd3d76192e4007dfb496cca67e13b -\n" \
18 testing "md5sum 5" "md5sum" "d174ab98d277d9f5a5611c2c9f419d9f -\n" \
20 testing "md5sum 6" "md5sum" "57edf4a22be3c955ac49da2e2107b67a -\n" \
H A Dblkid.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
10 testing "blkid file" "blkid temp.img" 'temp.img: TYPE="squashfs"\n' "" ""
13 testing "blkid cramfs" 'bzcat "$BDIR"/cramfs.bz2 | blkid -' \
15 testing "blkid ext2" 'bzcat "$BDIR"/ext2.bz2 | blkid -' \
18 testing "blkid ext3" 'bzcat "$BDIR"/ext3.bz2 | blkid -' \
21 testing "blkid ext4" 'bzcat "$BDIR"/ext4.bz2 | blkid -' \
24 testing "blkid f2fs" 'bzcat "$BDIR"/f2fs.bz2 | blkid -' \
27 testing "blki
[all...]
H A Drev.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
9 testing "rev" "rev && echo yes" "orez\nyes\n" "" "zero\n"
10 testing "rev -" "rev - && echo yes" "orez\nyes\n" "" "zero\n"
11 testing "rev file1 file2" "rev file1 file2" "eno\nowt\n" "" ""
12 testing "rev - file" "rev - file1" "orez\neno\n" "" "zero\n"
13 testing "rev file -" "rev file1 -" "eno\norez\n" "" "zero\n"
14 testing "rev no trailing newline" "rev -" "cba\nfed\n" "" "abc\ndef"
16 testing "re
[all...]
H A Dcut.test7 [ -f testing.sh ] && . testing.sh
9 #testing "name" "command" "result" "infile" "stdin"
12 # Creating test file for testing cut
17 testing "cut with -c (a-b)" "cut -c 4-10 abc.txt" ":two:th\nha:beta\n quick \n" "" ""
18 testing "cut with -f (a-)" "cut -d ':' -f 5- abc.txt" "five:six:seven\nepsilon:zeta:eta:teta:iota:kappa:lambda:mu\nthe quick brown fox jumps over the lazy dog\n" "" ""
20 testing "cut with -f (a)" "cut -d ' ' -f 3 abc.txt" "one:two:three:four:five:six:seven\nalpha:beta:gamma:delta:epsilon:zeta:eta:teta:iota:kappa:lambda:mu\nbrown\n" "" ""
22 testing "cut with echo, -c (a-b)" "echo 'ref_categorie=test' | cut -c 1-15 " "ref_categorie=t\n" "" ""
23 testing "cut with echo, -c (a)" "echo 'ref_categorie=test' | cut -c 14" "=\n" "" ""
28 testing "cu
[all...]
H A Dmodinfo.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
17 testing "modinfo gets right number of fields" "modinfo ne2k-pci |cut -d: -f1 |grep -v ver|sort" "alias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nauthor\ndepends\ndescription\nfilename\nlicense\nparm\nparm\nparm\n" "" ""
18 testing "modinfo treats - and _ as equivalent" "modinfo ne2k_pci |cut -d: -f1 |grep -v ver|sort" "alias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nalias\nauthor\ndepends\ndescription\nfilename\nlicense\nparm\nparm\nparm\n" "" ""
23 testing "modinfo -F filename gets absolute path" "[ -e `modinfo -F filename ne2k-pci` ] && echo ne2k-pci " "ne2k-pci\n" "" ""
25 testing "modinfo supports multiple modules" "modinfo -F filename ne2k-pci 8390 | wc -l" "2\n" "" ""
27 testing "modinfo does not output filename for bad module" "modinfo -F filename zxcvbnm__9753" "" "" ""
H A Dtouch.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 testing "touch" "touch walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
8 testing "touch 1 2 3" "touch one two three && rm one two three && echo yes" "yes\n" \
10 testing "touch -c" "touch -c walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
11 testing "touch -c missing" "touch -c warrus && [ ! -e warrus ] && echo yes" \
14 # This isn't testing fraction of a second because I dunno how to read it back
16 testing "touch -d" \
19 #testing "touc
[all...]
H A Dtac.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
10 testing "tac" "tac && echo yes" "one-B\none-A\nyes\n" "" "one-A\none-B\n"
11 testing "tac -" "tac - && echo yes" "one-B\none-A\nyes\n" "" "one-A\none-B\n"
12 testing "tac file1 file2" "tac file1 file2" "one-B\none-A\ntwo-B\ntwo-A\n" "" ""
13 testing "tac - file" "tac - file1" "zero-B\nzero-A\none-B\none-A\n" "" "zero-A\nzero-B\n"
14 testing "tac file -" "tac file1 -" "one-B\none-A\nzero-B\nzero-A\n" "" "zero-A\nzero-B\n"
16 testing "tac file1 notfound file2" \
20 testing "ta
[all...]
H A Dcksum.test3 [ -f testing.sh ] && . testing.sh
6 #testing "name" "command" "result" "infile" "stdin"
9 testing "cksum on stdin" "echo -n hello | cksum" "3287646509 5\n" "" ""
11 testing "cksum on file" "cksum tmpfile" "3287646509 5 tmpfile\n" "" ""
14 testing "cksum on multiple files" "cksum one two" "4294967295 0 one\n4294967295 0 two\n" "" ""
19 testing "cksum on abc including length" "echo -n 'abc' | cksum" "1219131554 3\n" "" ""
20 testing "cksum on abc excluding length" "echo -ne 'abc\x3' | cksum -N" "1219131554 4\n" "" ""
23 testing "cksum on no data post-inversion" "echo -n "" | cksum" "4294967295 0\n" "" ""
25 testing "cksu
[all...]
H A Dsha1sum.test3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
9 testing "sha1sum TEST1" \
14 testing "sha1sum TEST2" \
19 testing "sha1sum TEST3" \
24 testing "sha1sum TEST4" \
31 testing "sha1sum" \
36 testing "sha1sum -" \
41 testing "sha1su
[all...]

Completed in 171 milliseconds

1234567891011>>