]> arthur.barton.de Git - bup.git/blobdiff - t/test-sparse-files.sh
restore: test --sparse with zeros at 64k boundary
[bup.git] / t / test-sparse-files.sh
index 54ecb8268b5602947e6fc5d7bfb87d5919aa645c..f9e10eadf109a845434de7aeabbd8106afa1e714 100755 (executable)
@@ -141,5 +141,20 @@ WVPASS rm -r restore
 WVPASS bup restore --sparse -C restore "src/latest/$(pwd)/"
 WVPASS "$top/t/compare-trees" -c src/ restore/src/
 
+WVSTART "sparse file restore --sparse (short zero runs around boundary)"
+WVPASS python > src/foo <<EOF
+from sys import stdout
+stdout.write("x" * 65535 + "\0")
+stdout.write("\0" + "x" * 65535)
+stdout.write("\0" + "x" * 65534 + "\0")
+stdout.write("x" * 65536)
+stdout.write("\0")
+EOF
+WVPASS bup index src
+WVPASS bup save -n src src
+WVPASS rm -r restore
+WVPASS bup restore --sparse -C restore "src/latest/$(pwd)/"
+WVPASS "$top/t/compare-trees" -c src/ restore/src/
+
 
 WVPASS rm -rf "$tmpdir"