unexpand.tests 953 B

123456789101112131415161718192021222324252627282930313233343536
  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. testing "unexpand with unicode characher 0x394" "unexpand" \
  23. "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n" \
  24. exit $FAILCOUNT