Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tesh[t], the TEsting SHell Tool
[simgrid.git] / tools / tesh / cd.tesh
diff --git a/tools/tesh/cd.tesh b/tools/tesh/cd.tesh
new file mode 100644 (file)
index 0000000..b1f6074
--- /dev/null
@@ -0,0 +1,17 @@
+#! ./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
+
+# 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