summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-binary-io.sh
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-21 05:23:24 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-21 05:23:24 +0000
commita3ec215973c3653ebdeb81dcdd1274519c376a3d (patch)
treedc0edc2133786db0565f19d51c4a9957dd69e2ac /gnulib-tests/test-binary-io.sh
downloaddiffutils-tarball-master.tar.gz
Diffstat (limited to 'gnulib-tests/test-binary-io.sh')
-rwxr-xr-xgnulib-tests/test-binary-io.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnulib-tests/test-binary-io.sh b/gnulib-tests/test-binary-io.sh
new file mode 100755
index 0000000..c4dd6e9
--- /dev/null
+++ b/gnulib-tests/test-binary-io.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
+./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1
+
+rm -fr $tmpfiles
+
+exit 0