]> arthur.barton.de Git - bup.git/blobdiff - t/test-ls.sh
Add initial support for ls(1) style "-d" argument to "bup ls".
[bup.git] / t / test-ls.sh
index ec4d22b36a89d26e44db196347bd9bb55d8ab81f..15b5ac86046905e5150feca40fed1ba4bac7f621 100755 (executable)
@@ -34,6 +34,7 @@ WVPASS chmod -R u=rwX,g-rwx,o-rwx .
 WVPASS bup index src
 WVPASS bup save -n src src
 
+
 WVSTART "ls (short)"
 
 WVPASSEQ "$(WVPASS bup ls /)" "src"
@@ -92,6 +93,9 @@ file
 socket=
 symlink@"
 
+WVPASSEQ "$(WVPASS bup ls -d src/latest/"$tmpdir"/src)" "src/latest$tmpdir/src"
+
+
 WVSTART "ls (long)"
 
 WVPASSEQ "$(WVPASS bup ls -l / | tr -s ' ' ' ')" \
@@ -191,11 +195,16 @@ prw------- $uid/$gid 0 1969-07-20 20:18 fifo
 srwx------ $uid/$gid 0 1969-07-20 20:18 socket
 $symlink_mode $uid/$gid $symlink_size $symlink_date symlink -> file"
 
+WVPASSEQ "$(bup ls -ld "src/latest$tmpdir/src" | tr -s ' ' ' ')" \
+"drwx------ $user/$group 0 1969-07-20 20:18 src/latest$tmpdir/src"
+
+
 WVSTART "ls (backup set - long)"
 WVPASSEQ "$(bup ls -l src | cut -d' ' -f 1-2)" \
 "l--------- ?/?
 l--------- ?/?"
 
+
 WVSTART "ls (dates TZ != UTC)"
 export TZ=US/Central
 symlink_date_central="$(bup ls -l src/latest"$tmpdir"/src | grep symlink)"
@@ -209,4 +218,5 @@ srwx------ $uid/$gid 0 1969-07-20 15:18 socket
 $symlink_mode $uid/$gid $symlink_size $symlink_date_central symlink -> file"
 unset TZ
 
+
 WVPASS rm -rf "$tmpdir"