6118be808c
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.
21 lines
567 B
Plaintext
21 lines
567 B
Plaintext
#
|
|
# 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"
|