X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/842b8b761b8c0efdade0e9f688b22ac8ae89d965..c1fa53426d4f4db5c1fe697d915d30247fd5d09a:/tools/tesh2/examples/cd.tesh?ds=sidebyside diff --git a/tools/tesh2/examples/cd.tesh b/tools/tesh2/examples/cd.tesh index 1e175f1eee..7f8cde7d6c 100644 --- a/tools/tesh2/examples/cd.tesh +++ b/tools/tesh2/examples/cd.tesh @@ -1,23 +1,26 @@ -#! ./tesh - -# This example uses the cd command - -$ rm -rf testdir_temp -$ mkdir testdir_temp -$ cd testdir_temp - -# Check that there is nothing in the current dir (which must be testdir_temp) -$ ls - -# Check that tesh detects properly cd to non-existing directories -! expect return $ENOENT -< $ cd toto - -$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" - -# The next command checks that there is a testdir_temp in the upper directory, -# ie that mkdir and cd both worked. -#$ test -e ../testdir_temp - -$ cd .. -$ rmdir testdir_temp +#! ./tesh + +# This example uses the cd command + +$ rm -rf testdir_temp +$ mkdir testdir_temp +$ cd testdir_temp + +# Check that there is nothing in the current dir (which must be testdir_temp) +$ ls + +# Check that tesh detects properly cd to non-existing directories +! expect return $ENOENT +< $ cd toto +> Test unit from stdin +> [stdin:1] cd toto +> [stdin:1] Chdir to toto failed: no such file or directory +> Test unit `stdin': NOK ( no such file or directory) +$ tesh --log="log.thresh:info tesh.fmt:%m%n" + +# The next command checks that there is a testdir_temp in the upper directory, +# ie that mkdir and cd both worked. +#$ test -e ../testdir_temp + +$ cd .. +$ rmdir testdir_temp