Interleaving commands and tests
When interleaving commands and tests we (may?) want that the tests are performed only on the state reached so far and not after launching all the commands in the should
file.
An example of what such a test could look like:
dir=$(mktemp -d)
ls $dir
$ Check that directory is empty
0:.
touch $dir/file
ls -1 $dir
$ Directory should now contain file `file`
1:file
rm -f $dir/file
$ Directory should be empty again
0:.
rmdir $dir