diff options
author | Rob Landley <rob@landley.net> | 2024-02-08 05:56:37 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2024-02-08 05:56:37 -0600 |
commit | bd6357ebe5a615a081c09fe7e53596c295a2ee23 (patch) | |
tree | 87763b662e1ef1113adf9d0ba161431b1830d187 | |
parent | 1dd04fe95769086873dbf40fc91e197414908624 (diff) | |
download | toybox-bd6357ebe5a615a081c09fe7e53596c295a2ee23.tar.gz |
Convert more testing->testcmd.
-rwxr-xr-x | tests/wc.test | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/wc.test b/tests/wc.test index c751cce8..966114cf 100755 --- a/tests/wc.test +++ b/tests/wc.test @@ -13,26 +13,26 @@ some lines EOF -testing "wc" "wc >/dev/null && echo yes" "yes\n" "" "" -testing "empty file" "wc" " 0 0 0\n" "" "" -testing "standard input" "wc" " 1 3 5\n" "" "a b\nc" -testing "standard input -c" "wc -c" "5\n" "" "a b\nc" -testing "standard input -cl" "wc -cl" " 1 5\n" "" "a b\nc" -testing "-c" "wc -c file1" "26 file1\n" "" "" -testing "-l" "wc -l file1" "4 file1\n" "" "" -testing "-w" "wc -w file1" "5 file1\n" "" "" -testing "-L" "wc -L file1" "18 file1\n" "" "" -NOSPACE=1 testing "one file" "wc file1" "4 5 26 file1\n" "" "" -testing "multiple files" "wc input - file1" \ +testcmd "wc" ">/dev/null && echo yes" "yes\n" "" "" +testcmd "empty file" "" " 0 0 0\n" "" "" +testcmd "standard input" "" " 1 3 5\n" "" "a b\nc" +testcmd "standard input -c" "-c" "5\n" "" "a b\nc" +testcmd "standard input -cl" "-cl" " 1 5\n" "" "a b\nc" +testcmd "-c" "-c file1" "26 file1\n" "" "" +testcmd "-l" "-l file1" "4 file1\n" "" "" +testcmd "-w" "-w file1" "5 file1\n" "" "" +testcmd "-L" "-L file1" "18 file1\n" "" "" +NOSPACE=1 testcmd "one file" "file1" "4 5 26 file1\n" "" "" +testcmd "multiple files" "input - file1" \ " 1 2 3 input\n 0 2 3 -\n 4 5 26 file1\n 5 9 32 total\n" "a\nb" "a b" #Tests for wc -m echo -n " " > file1 for i in $(seq 1 512); do echo -n "üüüüüüüüüüüüüüüü" >> file1; done -testing "-m" "wc -m file1" "8193 file1\n" "" "" +testcmd "-m" "-m file1" "8193 file1\n" "" "" testing "-m 2" 'cat "$FILES/utf8/test2.txt" | wc -m' "169\n" "" "" echo -n " " > file1 -NOSPACE=1 testing "-mlw" "wc -mlw input" "1 2 11 input\n" "hello, 世界!\n" "" +NOSPACE=1 testcmd "-mlw" "-mlw input" "1 2 11 input\n" "hello, 世界!\n" "" rm file1 # Corner cases for "line length". Not QUITE fold because \b doesn't subtract |