diff options
author | Rob Landley <rob@landley.net> | 2018-06-23 18:03:20 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-06-23 18:03:20 -0500 |
commit | a28099897695583e63d1eceaa62a18b395d6fbfe (patch) | |
tree | fbe4e509ea2c1e7787290a82856f9650469c0409 | |
parent | 89d6d71cdaa31672a52032ba77b376093a4c8e9e (diff) | |
download | toybox-a28099897695583e63d1eceaa62a18b395d6fbfe.tar.gz |
Add a couple more fmt tests.
-rwxr-xr-x | tests/fmt.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/fmt.test b/tests/fmt.test index 0d5c5bd4..201952ef 100755 --- a/tests/fmt.test +++ b/tests/fmt.test @@ -18,4 +18,16 @@ testing "ws-only line" "echo -e 'hello\n \nworld' | fmt -w 10" "hello\n\nworld\ testing "leading space" "echo ' hello world' | fmt -w 5" " hello\n world\n" "" "" testing "utf8" "fmt -w 10 kr.txt" "동해물과\n백두산이\n마르고\n닳도록\n하나님이\n보우하사\n우리나라\n만세.\n" "" "" +testing "no newline" "fmt -w 10" "and\nthisisaverylongline\n" \ + "" "and thisisaverylongline" +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" +testing "" "fmt -w 10" "1 2 3 4 5\n6 7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" +testing "" "fmt -w 11" "1 2 3 4 5\n6 7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" +testing "" "fmt -w 12" "1 2 3 4 5 6\n7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" + +testing "matched tab indent" "fmt" "\thello world\n" "" "\thello\n\tworld" +testing "matched tab/space" "fmt" ' hello world\n' "" \ + " hello\n\tworld" +testing "matched space/tab" "fmt" "\thello world\n" "" "\thello\n world" + rm en.txt kr.txt |