ia64/xen-unstable

view tools/xenstore/testsuite/03write.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 f7a7f8f2e6e4 872cf6ee0594
line source
1 # Write without create fails.
2 expect write failed: No such file or directory
3 write /test none contents
5 # Exclusive write succeeds
6 write /test excl contents
7 expect contents
8 read /test
10 # Exclusive write fails to overwrite.
11 expect write failed: File exists
12 write /test excl contents
14 # Non-exclusive overwrite succeeds.
15 write /test none contents2
16 expect contents2
17 read /test
18 write /test create contents3
19 expect contents3
20 read /test
22 # Write should implicitly create directories
23 write /dir/test create contents
24 expect test
25 dir /dir
26 expect contents
27 read /dir/test
28 write /dir/1/2/3/4 excl contents4
29 expect test
30 expect 1
31 dir /dir
32 expect 2
33 dir /dir/1
34 expect 3
35 dir /dir/1/2
36 expect 4
37 dir /dir/1/2/3
38 expect contents4
39 read /dir/1/2/3/4