]> arthur.barton.de Git - bup.git/blobdiff - t/test.sh
Explicitly use "du -k" to set block size in t/test.sh.
[bup.git] / t / test.sh
index b56a06c1c77551ac40a38e99783fc541384a76ed..4d65f26d3484df59cdfffd1620373412022640ba 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -473,7 +473,7 @@ WVPASS bup save -n compression -0 --strip $TOP/Documentation
 # is harmless there.)
 WVPASSEQ "$(bup ls compression/latest/ | sort)" \
         "$(ls $TOP/Documentation | grep -v '^\.' | sort)"
-COMPRESSION_0_SIZE=$(du -s $D | cut -f1)
+COMPRESSION_0_SIZE=$(du -k -s $D | cut -f1)
 
 D=compression9.tmp
 export BUP_DIR="$TOP/$D/.bup"
@@ -483,7 +483,7 @@ WVPASS bup init
 WVPASS bup index $TOP/Documentation
 WVPASS bup save -n compression -9 --strip $TOP/Documentation
 WVPASSEQ "$(bup ls compression/latest/ | sort)" "$(ls $TOP/Documentation | sort)"
-COMPRESSION_9_SIZE=$(du -s $D | cut -f1)
+COMPRESSION_9_SIZE=$(du -k -s $D | cut -f1)
 
 WVPASS [ "$COMPRESSION_9_SIZE" -lt "$COMPRESSION_0_SIZE" ]
 
@@ -511,7 +511,6 @@ WVSTART "save disjoint top-level directories"
     WVPASS bup init
     WVPASS bup index -vu $(pwd)/$D/x "$tmpdir"
     WVPASS bup save -t -n src $(pwd)/$D/x "$tmpdir"
-    WVPASSEQ "$(bup ls -a src/latest)" \
-"$top_dir/
-tmp/"
+    # For now, assume that "ls -a" and "sort" use the same order.
+    WVPASSEQ "$(bup ls -a src/latest)" "$(echo -e "$top_dir/\ntmp/" | sort)"
 ) || WVFAIL