aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/error/open-fail-simple.sh13
-rw-r--r--test/error/open-fail-simple.stderr.log.expected1
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