diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-05-18 14:47:22 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-05-18 14:47:22 +1200 |
commit | a46e7a49e642c9b5b9f2bcbf8367c888714c7e93 (patch) | |
tree | 8d05d54714fe419a4b4fa3ce6ce7df8c2c6653a6 | |
parent | 4efa8d6151f0a04ee1c1703245b5945cbc637b88 (diff) | |
download | pgm-interlace-a46e7a49e642c9b5b9f2bcbf8367c888714c7e93.tar.xz |
Add simple test for denied read permission or other open failure
-rwxr-xr-x | test/error/open-fail-simple.sh | 13 | ||||
-rw-r--r-- | test/error/open-fail-simple.stderr.log.expected | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/error/open-fail-simple.sh b/test/error/open-fail-simple.sh new file mode 100755 index 0000000..c8c67f7 --- /dev/null +++ b/test/error/open-fail-simple.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +t="$0.tmp" + +cp ../input/white.pgm $t +chmod -r $t + +${EXECUTABLE} $t > /dev/null +ret=$? + +rm $t + +exit $ret diff --git a/test/error/open-fail-simple.stderr.log.expected b/test/error/open-fail-simple.stderr.log.expected new file mode 100644 index 0000000..0ac152a --- /dev/null +++ b/test/error/open-fail-simple.stderr.log.expected @@ -0,0 +1 @@ +failed to open './open-fail-simple.sh.tmp': fopen: Permission denied |