# Test that passing -work leaves behind the working directory
# that contains the temporary directories within which the
# script arguments are expanded.
#
# This test also covers the use of multiple scripts which share
# the same basename, ensuring that the naming of the directories
# within the working directory.

unquote file.txt dir/file.txt

testscript -v -work file.txt dir/file.txt
stderr '^temporary work directory: \Q'$WORK'\E[/\\]\.tmp[/\\]'
stderr '^temporary work directory for file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]'
stderr '^temporary work directory for dir[/\\]file.txt: \Q'$WORK'\E[/\\]\.tmp[/\\]'
expandone $WORK/.tmp/testscript*/file.txt/script.txtar
expandone $WORK/.tmp/testscript*/file.txt1/script.txtar

-- file.txt --
>exec true
-- dir/file.txt --
>exec true
