Permalink
Browse files

tests: add tests for the --overwrite feature.

  • Loading branch information...
1 parent 4ed1d12 commit ab09313b6829f1e260cd32a06817684009d6a4fc @Flameeyes committed Jun 24, 2012
Showing with 42 additions and 1 deletion.
  1. +4 −1 Makefile.am
  2. +12 −0 tests/runtestG1.sh
  3. +13 −0 tests/runtestG2.sh
  4. +13 −0 tests/runtestG3.sh
View
@@ -36,7 +36,10 @@ TESTS = tests/runtestA1.sh tests/runtestB1.sh tests/runtestB2.sh \
tests/runtestC3.sh tests/runtestD1.sh tests/runtestD2.sh \
tests/runtestD3.sh tests/runtestE1.sh tests/runtestE2.sh \
tests/runtestE3.sh tests/runtestF1.sh tests/runtestF2.sh \
- tests/runtestF3.sh
+ tests/runtestF3.sh tests/runtestG1.sh tests/runtestG2.sh \
+ tests/runtestG3.sh
+
+XFAIL_TESTS = tests/runtestG3.sh
EXTRA_DIST = $(TESTS) tests/imgsrc001.png tests/imgsrc002.png \
tests/imgsrc003.png tests/imgsrc004.png \
View
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo "[G1] No processing, with overwrite on non-existing file."
+
+set -e
+set -x
+
+rm -f tests/resultsG1.pbm
+
+./unpaper --overwrite -v --no-processing 1 tests/imgsrc001.pbm tests/resultsG1.pbm
+
+[ -f tests/resultsG1.pbm ]
View
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+echo "[G2] No processing, with overwrite on an existing file."
+
+set -e
+set -x
+
+rm -f tests/resultsG2.pbm
+touch tests/resultsG2.pbm
+
+./unpaper --overwrite -v --no-processing 1 tests/imgsrc001.pbm tests/resultsG2.pbm
+
+[ -s tests/resultsG2.pbm ]
View
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+echo "[G3] No processing, without overwrite on an existing file."
+
+set -e
+set -x
+
+rm -f tests/resultsG3.pbm
+touch tests/resultsG3.pbm
+
+./unpaper -v --no-processing 1 tests/imgsrc001.pbm tests/resultsG3.pbm
+
+[ -s tests/resultsG3.pbm ]

0 comments on commit ab09313

Please sign in to comment.