Logo AND Algorithmique Numérique Distribuée

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