summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-29 18:44:46 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-29 18:44:46 +0100
commitbf2b08560f649c22152e4138531ad0b46b4ad1b3 (patch)
tree3002cb0225a56b15ee905bbbeb52603f3e033f76 /images
parent9847e0c07d5907887e26ec60192fa12aa46277ee (diff)
downloadlibguestfs-bf2b08560f649c22152e4138531ad0b46b4ad1b3.tar.gz
libguestfs-bf2b08560f649c22152e4138531ad0b46b4ad1b3.tar.xz
libguestfs-bf2b08560f649c22152e4138531ad0b46b4ad1b3.zip
tests: Fix read_file test.
The test ignored the fact that this function returns a (char *, size_t) pair, and just treated the char * as a string. This of course would fail if the string didn't happen to be nul-terminated. The tests are updated to add a new TestOutputBuffer type which should be used with functions that return RBufferOut.
Diffstat (limited to 'images')
-rw-r--r--images/Makefile.am4
-rw-r--r--images/known-43
-rw-r--r--images/known-52
3 files changed, 8 insertions, 1 deletions
diff --git a/images/Makefile.am b/images/Makefile.am
index b6b7f72a..424f5e45 100644
--- a/images/Makefile.am
+++ b/images/Makefile.am
@@ -22,7 +22,7 @@ EXTRA_DIST = \
helloworld.tar \
helloworld.tar.gz \
mbr-ext2-empty.img.gz \
- empty known-1 known-2 known-3 \
+ empty known-1 known-2 known-3 known-4 known-5 \
bin-i586-dynamic \
bin-sparc-dynamic \
bin-win32.exe \
@@ -49,6 +49,8 @@ squash_files_src = \
$(srcdir)/known-1 \
$(srcdir)/known-2 \
$(srcdir)/known-3 \
+ $(srcdir)/known-4 \
+ $(srcdir)/known-5 \
$(srcdir)/bin-i586-dynamic \
$(srcdir)/bin-sparc-dynamic \
$(srcdir)/bin-win32.exe \
diff --git a/images/known-4 b/images/known-4
new file mode 100644
index 00000000..f5bc74f6
--- /dev/null
+++ b/images/known-4
@@ -0,0 +1,3 @@
+abc
+def
+ghi \ No newline at end of file
diff --git a/images/known-5 b/images/known-5
new file mode 100644
index 00000000..3122d943
--- /dev/null
+++ b/images/known-5
@@ -0,0 +1,2 @@
+abcdefghi
+jklmnopqr \ No newline at end of file