ia64/xen-unstable

view tools/xenstore/testsuite/02directory.test @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents 3233e7ecfa9f
children a5d67e3fbff1 872cf6ee0594
line source
1 # Root directory has only tool dir in it.
2 expect tool
3 dir /
5 # Create a file.
6 write /test create contents
8 # Directory shows it.
9 expect test
10 expect tool
11 dir /
13 # Make a new directory, check it's there
14 mkdir /dir
15 expect dir
16 expect test
17 expect tool
18 dir /
20 # Check it's empty.
21 dir /dir
23 # Create a file, check it exists.
24 write /dir/test2 create contents2
25 expect test2
26 dir /dir
27 expect contents2
28 read /dir/test2
30 # Creating dir over the top should fail.
31 expect mkdir failed: File exists
32 mkdir /dir
33 expect mkdir failed: File exists
34 mkdir /dir/test2
36 # Mkdir implicitly creates directories.
37 mkdir /dir/1/2/3/4
38 expect test2
39 expect 1
40 dir /dir
41 expect 2
42 dir /dir/1
43 expect 3
44 dir /dir/1/2
45 expect 4
46 dir /dir/1/2/3
47 dir /dir/1/2/3/4