od.tests 771 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. # Copyright 2008 by Denys Vlasenko
  3. # Licensed under GPLv2, see file LICENSE in this source tree.
  4. . ./testing.sh
  5. # testing "test name" "commands" "expected result" "file input" "stdin"
  6. optional DESKTOP
  7. testing "od -b" \
  8. "od -b" \
  9. "\
  10. 0000000 110 105 114 114 117
  11. 0000005
  12. " \
  13. "" "HELLO"
  14. SKIP=
  15. optional DESKTOP
  16. testing "od -f" \
  17. "od -f" \
  18. "\
  19. 0000000 0.0000000e+00 0.0000000e+00
  20. 0000010
  21. " \
  22. "" "\x00\x00\x00\x00\x00\x00\x00\x00"
  23. SKIP=
  24. optional DESKTOP LONG_OPTS
  25. testing "od -b --traditional" \
  26. "od -b --traditional" \
  27. "\
  28. 0000000 110 105 114 114 117
  29. 0000005
  30. " \
  31. "" "HELLO"
  32. SKIP=
  33. optional DESKTOP LONG_OPTS
  34. testing "od -b --traditional FILE" \
  35. "od -b --traditional input" \
  36. "\
  37. 0000000 110 105 114 114 117
  38. 0000005
  39. " \
  40. "HELLO" ""
  41. SKIP=
  42. exit $FAILCOUNT