summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/iscache-not-cache.exit1
-rwxr-xr-xtests/iscache-not-cache.script10
-rw-r--r--tests/iscache-not-cache.stderr1
3 files changed, 10 insertions, 2 deletions
diff --git a/tests/iscache-not-cache.exit b/tests/iscache-not-cache.exit
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/iscache-not-cache.exit
@@ -0,0 +1 @@
+1
diff --git a/tests/iscache-not-cache.script b/tests/iscache-not-cache.script
index acfc935..aacd621 100755
--- a/tests/iscache-not-cache.script
+++ b/tests/iscache-not-cache.script
@@ -14,7 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set -eu
+set -u
-! "$SRCDIR/cachedir" iscache "$DATADIR"
+"$SRCDIR/cachedir" iscache "$DATADIR" > "$DATADIR/stdout" 2> "$DATADIR/stderr"
+exit=$?
+set -e
+
+sed "s:$DATADIR:TMP:g" "$DATADIR/stdout"
+sed "s:$DATADIR:TMP:g" "$DATADIR/stderr" 1>&2
+exit $exit
diff --git a/tests/iscache-not-cache.stderr b/tests/iscache-not-cache.stderr
new file mode 100644
index 0000000..f90b672
--- /dev/null
+++ b/tests/iscache-not-cache.stderr
@@ -0,0 +1 @@
+TMP is not a cache directory