From 6e081c33ef93e631cdd4b39c4de7de3fef3562bf Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 23 May 2016 23:12:01 +1200 Subject: Add test for open failure after other openings --- test/error/open-fail-not-so-simple.sh | 15 +++++++++++++++ test/error/open-fail-not-so-simple.stderr.log.expected | 1 + 2 files changed, 16 insertions(+) create mode 100755 test/error/open-fail-not-so-simple.sh create mode 100644 test/error/open-fail-not-so-simple.stderr.log.expected 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 -- cgit v1.1