]> arthur.barton.de Git - bup.git/blobdiff - t/test-ls
cmd/bup: adapt for python 3
[bup.git] / t / test-ls
index 7fb05cf29346257c17c5082c8d4188a8e528deb8..2b919a211958318f416ce8be1f830b8ae20e3e48 100755 (executable)
--- a/t/test-ls
+++ b/t/test-ls
@@ -45,6 +45,8 @@ WVPASS touch -t 200910032348 src/.dotfile src/*
 WVPASS touch -t 200910032348 src
 WVPASS touch -t 200910032348 .
 WVPASS bup index src
+# Include two saves to test multiple results per ref from rev_list.
+WVPASS bup save -n src -d 242312159 --strip src
 WVPASS bup save -n src -d 242312160 --strip src
 WVPASS bup tag some-tag src
 
@@ -82,7 +84,8 @@ src/"
 WVPASSEQ "$(WVPASS bup-ls /.tag)" "some-tag"
 
 WVPASSEQ "$(WVPASS bup-ls /src)" \
-"1977-09-05-125600
+"1977-09-05-125559
+1977-09-05-125600
 latest"
 
 WVPASSEQ "$(WVPASS bup-ls src/latest)" "bad-symlink
@@ -249,19 +252,20 @@ $socket_mode $uid/$gid 0 2009-10-03 23:48 socket
 $symlink_mode $uid/$gid $symlink_size $symlink_date symlink -> file"
 
 WVPASSEQ "$(bup-ls -ld "src/latest" | tr -s ' ' ' ')" \
-"drwx------ $user/$group 0 2009-10-03 23:48 src/latest"
+"lrwxr-xr-x 0/0 17 1970-01-01 00:00 src/latest -> 1977-09-05-125600"
 
 
 WVSTART "$ls_cmd_desc (backup set - long)"
 WVPASSEQ "$(bup-ls -l --numeric-ids src | cut -d' ' -f 1-2)" \
 "drwx------ $uid/$gid
-drwx------ $uid/$gid"
+drwx------ $uid/$gid
+lrwxr-xr-x 0/0"
 
-WVPASSEQ "$(bup-ls -ds "src/latest" | tr -s ' ' ' ')" \
-"$src_tree_hash src/latest"
+WVPASSEQ "$(bup-ls -ds "src/1977-09-05-125600" | tr -s ' ' ' ')" \
+"$src_tree_hash src/1977-09-05-125600"
 
-WVPASSEQ "$(bup-ls -ds --commit-hash "src/latest" | tr -s ' ' ' ')" \
-"$src_commit_hash src/latest"
+WVPASSEQ "$(bup-ls -ds --commit-hash "src/1977-09-05-125600" | tr -s ' ' ' ')" \
+"$src_commit_hash src/1977-09-05-125600"
 
 
 WVSTART "$ls_cmd_desc (dates TZ != UTC)"