unlzma.tests 695 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. . ./testing.sh
  3. # testing "test name" "commands" "expected result" "file input" "stdin"
  4. # file input will be file called "input"
  5. # test can create a file "actual" instead of writing to stdout
  6. # Damaged encrypted streams
  7. testing "unlzma (bad archive 1)" \
  8. "unlzma <unlzma_issue_1.lzma 2>&1 >/dev/null; echo \$?" \
  9. "unlzma: corrupted data
  10. 1
  11. " "" ""
  12. # Damaged encrypted streams
  13. testing "unlzma (bad archive 2)" \
  14. "unlzma <unlzma_issue_2.lzma 2>&1 >/dev/null; echo \$?" \
  15. "unlzma: corrupted data
  16. 1
  17. " "" ""
  18. # Damaged encrypted streams
  19. testing "unlzma (bad archive 3)" \
  20. "unlzma <unlzma_issue_3.lzma 2>&1 >/dev/null; echo \$?" \
  21. "unlzma: corrupted data
  22. 1
  23. " "" ""
  24. exit $FAILCOUNT