Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[tesh] cleanup: SIGKILL -> SIGTERM
[simgrid.git] / tools / tesh / cd.tesh
1 #!/usr/bin/env tesh
2
3 # This example uses the cd command
4
5 ! output ignore
6 $ cmake -E remove_directory testdir_temp-cd
7
8 $ mkdir testdir_temp-cd
9 $ cd testdir_temp-cd
10
11 # Check that there is nothing in the current dir (which must be testdir_temp-cd)
12 $ ls
13
14 # Check that tesh detects properly cd to non-existing directories
15 ! expect return 4
16 < $ cd toto
17 > Test suite from stdin
18 > Chdir to toto failed: No such file or directory
19 > Test suite `(stdin)': NOK (system error)
20 $ ${bindir:=.}/tesh
21
22 # The next command checks that there is a testdir_temp-cd in the upper directory,
23 # ie that mkdir and cd both worked.
24 $ test -e ../testdir_temp-cd
25
26 $ cd ..
27
28 ! output ignore
29 $ cmake -E remove_directory testdir_temp-cd