X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=cat%2Ftest-virt-cat.sh;fp=cat%2Ftest-virt-cat.sh;h=19b8d8756f60f265edc4c8aeb36ea82d03314011;hp=0000000000000000000000000000000000000000;hb=d29e9a552f5823d1d8cb8d4962cb1301bbf60b0e;hpb=4d900cdac8258daa2e99c6ceb2a4985154e94150 diff --git a/cat/test-virt-cat.sh b/cat/test-virt-cat.sh new file mode 100755 index 0000000..19b8d87 --- /dev/null +++ b/cat/test-virt-cat.sh @@ -0,0 +1,14 @@ +#!/bin/bash - + +export LANG=C +set -e + +# Read out the test files from the image using virt-cat. +if [ "$(./virt-cat ../images/fedora.img /etc/test1)" != "abcdefg" ]; then + echo "$0: error: mismatch in file test1" + exit 1 +fi +if [ "$(./virt-cat ../images/fedora.img /etc/test2)" != "" ]; then + echo "$0: error: mismatch in file test2" + exit 1 +fi