Denis Vlasenko | e40e76f | 2008-12-26 14:56:03 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Copyright 2008 by Denys Vlasenko |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 3 | # Licensed under GPLv2, see file LICENSE in this source tree. |
Denis Vlasenko | e40e76f | 2008-12-26 14:56:03 +0000 | [diff] [blame] | 4 | |
Mike Frysinger | caa7940 | 2009-11-04 18:41:22 -0500 | [diff] [blame] | 5 | . ./testing.sh |
Denys Vlasenko | 9297dbc | 2010-07-05 21:37:12 +0200 | [diff] [blame] | 6 | test -f "$bindir/.config" && . "$bindir/.config" |
Denis Vlasenko | e40e76f | 2008-12-26 14:56:03 +0000 | [diff] [blame] | 7 | |
| 8 | # testing "test name" "options" "expected result" "file input" "stdin" |
| 9 | |
| 10 | testing "unexpand case 1" "unexpand" \ |
| 11 | "\t12345678\n" "" " 12345678\n" \ |
| 12 | |
| 13 | testing "unexpand case 2" "unexpand" \ |
| 14 | "\t 12345678\n" "" " 12345678\n" \ |
| 15 | |
| 16 | testing "unexpand case 3" "unexpand" \ |
| 17 | "\t 12345678\n" "" " 12345678\n" \ |
| 18 | |
| 19 | testing "unexpand case 4" "unexpand" \ |
| 20 | "\t12345678\n" "" " \t12345678\n" \ |
| 21 | |
| 22 | testing "unexpand case 5" "unexpand" \ |
| 23 | "\t12345678\n" "" " \t12345678\n" \ |
| 24 | |
| 25 | testing "unexpand case 6" "unexpand" \ |
| 26 | "\t12345678\n" "" " \t12345678\n" \ |
| 27 | |
| 28 | testing "unexpand case 7" "unexpand" \ |
| 29 | "123\t 45678\n" "" "123 \t 45678\n" \ |
| 30 | |
Tomas Heinrich | 968951f | 2010-03-26 09:46:07 +0100 | [diff] [blame] | 31 | testing "unexpand case 8" "unexpand" \ |
| 32 | "a b\n" "" "a b\n" \ |
| 33 | |
Denys Vlasenko | 9297dbc | 2010-07-05 21:37:12 +0200 | [diff] [blame] | 34 | test x"$CONFIG_UNICODE_SUPPORT" = x"y" \ |
| 35 | && test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \ |
Denys Vlasenko | ee1f19b | 2010-07-06 02:20:00 +0200 | [diff] [blame] | 36 | && testing "unexpand with unicode characher 0x394" "unexpand" \ |
Denys Vlasenko | e3d90a9 | 2010-05-10 05:53:16 +0200 | [diff] [blame] | 37 | "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n" |
Tomas Heinrich | d2b1ba6 | 2010-01-04 16:21:31 +0100 | [diff] [blame] | 38 | |
Denis Vlasenko | e40e76f | 2008-12-26 14:56:03 +0000 | [diff] [blame] | 39 | exit $FAILCOUNT |