cal.tests 939 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # Copyright 2010 by Denys Vlasenko
  3. # Licensed under GPL v2, see file LICENSE for details.
  4. . ./testing.sh
  5. test -f "$bindir/.config" && . "$bindir/.config"
  6. # testing "test name" "command" "expected result" "file input" "stdin"
  7. testing "cal 2000" "cal 1 2000" "\
  8. January 2000
  9. Su Mo Tu We Th Fr Sa
  10. 1
  11. 2 3 4 5 6 7 8
  12. 9 10 11 12 13 14 15
  13. 16 17 18 19 20 21 22
  14. 23 24 25 26 27 28 29
  15. 30 31
  16. " "" ""
  17. test x"$CONFIG_LOCALE_SUPPORT" = x"y" \
  18. && test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
  19. && test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"0" \
  20. && test x"$CONFIG_UNICODE_WIDE_WCHARS" = x"y" \
  21. && test x"$CONFIG_STATIC" != x"y" \
  22. && test x"$CONFIG_CROSS_COMPILER_PREFIX" = x"" \
  23. && testing "unicode cal 2000" "LANG=zh_TW.utf8 cal 1 2000" "\
  24. 一月 2000
  25. 日 一 二 三 四 五 六
  26. 1
  27. 2 3 4 5 6 7 8
  28. 9 10 11 12 13 14 15
  29. 16 17 18 19 20 21 22
  30. 23 24 25 26 27 28 29
  31. 30 31
  32. " "" ""
  33. exit $FAILCOUNT