Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Last corrections of Tesh tool.
[simgrid.git] / tools / tesh2 / examples / cd.tesh
index 1e175f1..c1e52c9 100644 (file)
@@ -1,23 +1,26 @@
-#! ./tesh\r
-\r
-# This example uses the cd command\r
-\r
-$ rm -rf testdir_temp\r
-$ mkdir testdir_temp\r
-$ cd testdir_temp\r
-\r
-# Check that there is nothing in the current dir (which must be testdir_temp)\r
-$ ls\r
-\r
-# Check that tesh detects properly cd to non-existing directories\r
-! expect return $ENOENT\r
-< $ cd toto\r
-\r
-$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
-\r
-# The next command checks that there is a testdir_temp in the upper directory, \r
-# ie that mkdir and cd both worked.\r
-#$ test -e ../testdir_temp\r
-\r
-$ cd ..\r
-$ rmdir testdir_temp\r
+#! ./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