diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-05-23 23:12:01 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-05-23 23:12:01 +1200 |
commit | 6e081c33ef93e631cdd4b39c4de7de3fef3562bf (patch) | |
tree | 06799eafd4228dc1672c6e79e1991976528168e6 | |
parent | a08d36176dc702e643e9c29a1401ced14b6439d6 (diff) | |
download | pgm-interlace-6e081c33ef93e631cdd4b39c4de7de3fef3562bf.tar.xz |
Add test for open failure after other openings
-rwxr-xr-x | test/error/open-fail-not-so-simple.sh | 15 | ||||
-rw-r--r-- | test/error/open-fail-not-so-simple.stderr.log.expected | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/error/open-fail-not-so-simple.sh b/test/error/open-fail-not-so-simple.sh new file mode 100755 index 0000000..917c05d --- /dev/null +++ b/test/error/open-fail-not-so-simple.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +t="$0.tmp" + +for i in "$t."{1,2,3} ; do + cp ../input/white.pgm "$i" +done +chmod -r "$t.3" + +${EXECUTABLE} $t.{1,2,3} > /dev/null +ret=$? + +rm "$t."{1,2,3} + +exit $ret diff --git a/test/error/open-fail-not-so-simple.stderr.log.expected b/test/error/open-fail-not-so-simple.stderr.log.expected new file mode 100644 index 0000000..13c6640 --- /dev/null +++ b/test/error/open-fail-not-so-simple.stderr.log.expected @@ -0,0 +1 @@ +failed to open './open-fail-not-so-simple.sh.tmp.3': fopen: Permission denied |