#
# Testsuite for lib/fileutils program
#

set testprog "${topdir}lib/test_fileutils"
set scriptdir [file dirname [ info script ]]

set test "without argument"
spawn $testprog
expect_pass "$test" "Hello, World!"

set badfd "${scriptdir}/fileutils_badfd.sh"
set test "test bad file descriptor"
spawn $badfd $testprog
expect_pass "$test" "test_fileutils: write error: Bad file descriptor"

set full "${scriptdir}/fileutils_full.sh"
set test "test no space left on device"
spawn $full $testprog
expect_pass "$test" "test_fileutils: write error: No space left on device"
