aboutsummaryrefslogtreecommitdiff
path: root/test/error
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 13:25:52 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 13:25:55 +1200
commit7d662ce78e10ae531504a9431576534679b80598 (patch)
treefcecfda87e763d68fdc04930152528c89decee18 /test/error
parentec2005a6ba473e35c105c736719f0c779f5cfb4f (diff)
downloadpgm-interlace-7d662ce78e10ae531504a9431576534679b80598.tar.xz
Bulk addition of tests
Diffstat (limited to 'test/error')
-rwxr-xr-xtest/error/header-mismatch.sh3
-rwxr-xr-xtest/error/no-token-available.sh7
-rwxr-xr-xtest/error/non-positive-dimension.sh10
-rwxr-xr-xtest/error/not-square.sh3
4 files changed, 23 insertions, 0 deletions
diff --git a/test/error/header-mismatch.sh b/test/error/header-mismatch.sh
new file mode 100755
index 0000000..92418ea
--- /dev/null
+++ b/test/error/header-mismatch.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${EXECUTABLE} ../input/{white,single-frame}.pgm > /dev/null
diff --git a/test/error/no-token-available.sh b/test/error/no-token-available.sh
new file mode 100755
index 0000000..5ad117b
--- /dev/null
+++ b/test/error/no-token-available.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+${EXECUTABLE} /dev/stdin << EOF
+P5
+300
+2
+EOF
diff --git a/test/error/non-positive-dimension.sh b/test/error/non-positive-dimension.sh
new file mode 100755
index 0000000..13ab1d1
--- /dev/null
+++ b/test/error/non-positive-dimension.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+${EXECUTABLE} /dev/stdin << EOF
+P5
+2
+0
+255
+11
+11
+EOF
diff --git a/test/error/not-square.sh b/test/error/not-square.sh
new file mode 100755
index 0000000..93accbe
--- /dev/null
+++ b/test/error/not-square.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${EXECUTABLE} ../input/{white,black}.pgm