unexpand.tests 982 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # Copyright 2008 by Denys Vlasenko
  3. # Licensed under GPL v2, see file LICENSE for details.
  4. . ./testing.sh
  5. # testing "test name" "options" "expected result" "file input" "stdin"
  6. testing "unexpand case 1" "unexpand" \
  7. "\t12345678\n" "" " 12345678\n" \
  8. testing "unexpand case 2" "unexpand" \
  9. "\t 12345678\n" "" " 12345678\n" \
  10. testing "unexpand case 3" "unexpand" \
  11. "\t 12345678\n" "" " 12345678\n" \
  12. testing "unexpand case 4" "unexpand" \
  13. "\t12345678\n" "" " \t12345678\n" \
  14. testing "unexpand case 5" "unexpand" \
  15. "\t12345678\n" "" " \t12345678\n" \
  16. testing "unexpand case 6" "unexpand" \
  17. "\t12345678\n" "" " \t12345678\n" \
  18. testing "unexpand case 7" "unexpand" \
  19. "123\t 45678\n" "" "123 \t 45678\n" \
  20. testing "unexpand case 8" "unexpand" \
  21. "a b\n" "" "a b\n" \
  22. optional UNICODE_SUPPORT
  23. testing "unexpand with unicode characher 0x394" "unexpand" \
  24. "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n"
  25. SKIP=
  26. exit $FAILCOUNT