summaryrefslogtreecommitdiffstats
path: root/testsuite/lib.test/fileutils.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/lib.test/fileutils.exp')
-rw-r--r--testsuite/lib.test/fileutils.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/lib.test/fileutils.exp b/testsuite/lib.test/fileutils.exp
new file mode 100644
index 0000000..3eaf654
--- /dev/null
+++ b/testsuite/lib.test/fileutils.exp
@@ -0,0 +1,19 @@
+#
+# Testsuite for lib/fileutils program
+#
+
+set noarg "${topdir}src/tests/test_fileutils"
+
+set test "without argument"
+spawn $noarg
+expect_pass "$test" "Hello, World!"
+
+set badfd "${srcdir}/lib.test/fileutils_badfd.sh"
+set test "test bad file descriptor"
+spawn $badfd
+expect_pass "$test" "test_fileutils: write error: Bad file descriptor"
+
+set full "${srcdir}/lib.test/fileutils_full.sh"
+set test "test no space left on device"
+spawn $full
+expect_pass "$test" "test_fileutils: write error: No space left on device"