Debian Codegraph @

cmd/testscript/testdata/work.txt

raw
1 # Test that passing -work leaves behind the working directory
2 # that contains the temporary directories within which the
3 # script arguments are expanded.
4 #
5 # This test also covers the use of multiple scripts which share
6 # the same basename, ensuring that the naming of the directories
7 # within the working directory.
8
9 unquote file.txt dir/file.txt
10
11 testscript -v -work file.txt dir/file.txt
12 stdout '^temporary work directory: \Q'$WORK'\E[/\\]\.tmp[/\\]'
13 expandone $WORK/.tmp/go-test-script*/script-file/foo
14 expandone $WORK/.tmp/go-test-script*/script-file#1/bar
15
16 -- file.txt --
17 >exec true
18 >-- foo --
19 >hello
20 -- dir/file.txt --
21 >exec true
22 >-- bar --
23 >hello