# file : tests/test/script/integration/testscript # copyright : Copyright (c) 2014-2016 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file # @@ I think these should be run indirectly (via cat & build) # for cross-testing to work (we want to run the via the build # system we built, not the one we used to acomplish this. .include ../../common.test cd = [string] $path.canonicalize(./) td = [string] $path.canonicalize(test/) : scrip-files : { +touch testscript foo.test bar.test : testscript-and-other : $* <>"EOE" != 0 ./: test{../testscript ../foo} EOI error: both 'testscript' and other names specified for dir{$cd} EOE : other-and-testscript : $* <>"EOE" != 0 ./: test{../foo ../testscript} EOI error: both 'testscript' and other names specified for dir{$cd} EOE : others : $* <>"EOE" != 0 ./: test{foo} EOI error: working directory $td is a file/symlink EOE : wd-exists-before : touch foo.test; mkdir test &!test/; $* <>"EOE" ./: test{foo} EOI warning: working directory $td exists at the beginning of the test EOE : wd-not-empty-before : touch foo.test; mkdir test &!test/; touch test/dummy &!test/dummy; $* <>"EOE" ./: test{foo} EOI warning: working directory $td exists and is not empty at the beginning of the test EOE : wd-not-empty-after : : The idea here is to run a nested testscript that creates (but does not : clean up) a file in our working directory. Note that an implicit cleanup : cancelation is not required as the file is out of the test root directory : scope. Also note that we still have to remove everything after detecting the : failure. : cat <>>foo.test; touch ../../dummy EOI $* <>"EOE" &test/*** != 0 ./: test{foo} EOI error: working directory $td is not empty at the end of the test EOE