github.com/rogpeppe/go-internal@v1.12.1-0.20240509064211-c8567cf8e95f/cmd/testscript/testdata/work.txt (about) 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 stderr '^temporary work directory: \Q'$WORK'\E[/\\]\.tmp[/\\]' 13 stderr '^temporary work directory for file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]' 14 stderr '^temporary work directory for dir[/\\]file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]' 15 expandone $WORK/.tmp/testscript*/file.txt/script.txtar 16 expandone $WORK/.tmp/testscript*/file.txt1/script.txtar 17 18 -- file.txt -- 19 >exec true 20 -- dir/file.txt -- 21 >exec true