Commit 6118be80 authored by Craig Small's avatar Craig Small

misc: testsuite to source aux scripts correctly

Because I don't know how to redirect properly in tcl, there are
some small scripts that do this for me. With your standard
make check, all is good because the scripts and the binary are
in the usual spots.

make distcheck however puts them all over the place. The binary is
in a different tree to the test and aux scripts. The change now
tells where aux script where its binary is.
parent 96f151a4
......@@ -2,18 +2,19 @@
# Testsuite for lib/fileutils program
set noarg "${topdir}lib/test_fileutils"
set testprog "${topdir}lib/test_fileutils"
set scriptdir [file dirname [ info script ]]
set test "without argument"
spawn $noarg
spawn $testprog
expect_pass "$test" "Hello, World!"
set badfd "${topdir}testsuite/lib.test/"
set badfd "${scriptdir}/"
set test "test bad file descriptor"
spawn $badfd
spawn $badfd $testprog
expect_pass "$test" "test_fileutils: write error: Bad file descriptor"
set full "${topdir}testsuite/lib.test/"
set full "${scriptdir}/"
set test "test no space left on device"
spawn $full
spawn $full $testprog
expect_pass "$test" "test_fileutils: write error: No space left on device"
BASEDIR=$(dirname ${0})
${BASEDIR}/../../lib/test_fileutils >&-
BASEDIR=$(dirname ${0})
${BASEDIR}/../../lib/test_fileutils > /dev/full
${TESTPROG} >/dev/full
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment