summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-15 23:54:51 +0100
committerRichard Jones <rjones@redhat.com>2009-04-15 23:54:51 +0100
commit05712b2457a44ee0f0020eced77db03c2aa419a1 (patch)
treeef1c0831f9215a61223221d068470aeab5bc1ab7 /src
parent54a6c3212ce1f942979639d2f2bd726414fff7c2 (diff)
downloadlibguestfs-05712b2457a44ee0f0020eced77db03c2aa419a1.tar.gz
libguestfs-05712b2457a44ee0f0020eced77db03c2aa419a1.tar.xz
libguestfs-05712b2457a44ee0f0020eced77db03c2aa419a1.zip
'guestfish edit' commands and several bugfixes.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 154614e5..4653d65c 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -914,12 +914,24 @@ pass C<lines> as a single element list, when the single element being
the string C<,> (comma).");
("write_file", (RErr, [String "path"; String "content"; Int "size"]), 44, [ProtocolLimitWarning],
- [InitEmpty, TestOutput (
- [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
- ["mkfs"; "ext2"; "/dev/sda1"];
- ["mount"; "/dev/sda1"; "/"];
- ["write_file"; "/new"; "new file contents"; "0"];
- ["cat"; "/new"]], "new file contents")],
+ [InitBasicFS, TestOutput (
+ [["write_file"; "/new"; "new file contents"; "0"];
+ ["cat"; "/new"]], "new file contents");
+ InitBasicFS, TestOutput (
+ [["write_file"; "/new"; "\nnew file contents\n"; "0"];
+ ["cat"; "/new"]], "\nnew file contents\n");
+ InitBasicFS, TestOutput (
+ [["write_file"; "/new"; "\n\n"; "0"];
+ ["cat"; "/new"]], "\n\n");
+ InitBasicFS, TestOutput (
+ [["write_file"; "/new"; ""; "0"];
+ ["cat"; "/new"]], "");
+ InitBasicFS, TestOutput (
+ [["write_file"; "/new"; "\n\n\n"; "0"];
+ ["cat"; "/new"]], "\n\n\n");
+ InitBasicFS, TestOutput (
+ [["write_file"; "/new"; "\n"; "0"];
+ ["cat"; "/new"]], "\n")],
"create a file",
"\
This call creates a file called C<path>. The contents of the