printf.tests 489 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. set -e
  3. . testing.sh
  4. # Need this in order to not execute shell builtin
  5. bb="busybox "
  6. # testing "test name" "command" "expected result" "file input" "stdin"
  7. testing "printf produce no further output 1" \
  8. "${bb}printf '\c' foo" \
  9. "" \
  10. "" ""
  11. testing "printf produce no further output 2" \
  12. "${bb}printf '%s\c' foo \$HOME" \
  13. "foo" \
  14. "" ""
  15. testing "printf repeatedly use pattern for each argv" \
  16. "${bb}printf '%s\n' foo \$HOME" \
  17. "foo\n$HOME\n" \
  18. "" ""
  19. exit $FAILCOUNT