Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
7f8cde7d6c0914ed645619ac16a38bbb3b4c059a
[simgrid.git] / tools / tesh2 / examples / cd.tesh
1 #! ./tesh
2
3 # This example uses the cd command
4
5 $ rm -rf testdir_temp
6 $ mkdir testdir_temp
7 $ cd testdir_temp
8
9 # Check that there is nothing in the current dir (which must be testdir_temp)
10 $ ls
11
12 # Check that tesh detects properly cd to non-existing directories
13 ! expect return $ENOENT
14 < $ cd toto
15 > Test unit from stdin
16 > [stdin:1] cd toto
17 > [stdin:1] Chdir to toto failed: no such file or directory
18 > Test unit `stdin': NOK (<stdin:1> no such file or directory)
19 $ tesh --log="log.thresh:info tesh.fmt:%m%n"
20
21 # The next command checks that there is a testdir_temp in the upper directory, 
22 # ie that mkdir and cd both worked.
23 #$ test -e ../testdir_temp
24
25 $ cd ..
26 $ rmdir testdir_temp