unexpand.tests 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. # Copyright 2008 by Denys Vlasenko
  3. # Licensed under GPLv2, see file LICENSE in this source tree.
  4. . ./testing.sh
  5. test -f "$bindir/.config" && . "$bindir/.config"
  6. # testing "test name" "options" "expected result" "file input" "stdin"
  7. testing "unexpand case 1" "unexpand" \
  8. "\t12345678\n" "" " 12345678\n" \
  9. testing "unexpand case 2" "unexpand" \
  10. "\t 12345678\n" "" " 12345678\n" \
  11. testing "unexpand case 3" "unexpand" \
  12. "\t 12345678\n" "" " 12345678\n" \
  13. testing "unexpand case 4" "unexpand" \
  14. "\t12345678\n" "" " \t12345678\n" \
  15. testing "unexpand case 5" "unexpand" \
  16. "\t12345678\n" "" " \t12345678\n" \
  17. testing "unexpand case 6" "unexpand" \
  18. "\t12345678\n" "" " \t12345678\n" \
  19. testing "unexpand case 7" "unexpand" \
  20. "123\t 45678\n" "" "123 \t 45678\n" \
  21. testing "unexpand case 8" "unexpand" \
  22. "a b\n" "" "a b\n" \
  23. test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
  24. && test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
  25. && testing "unexpand with unicode characher 0x394" "unexpand" \
  26. "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n"
  27. exit $FAILCOUNT