]> arthur.barton.de Git - bup.git/commitdiff
test-ls.sh: handle Cygwin's coupling of timestamp/permission modifications.
authorPatryck Rouleau <prouleau72@gmail.com>
Sun, 30 Mar 2014 15:04:49 +0000 (11:04 -0400)
committerRob Browning <rlb@defaultvalue.org>
Sun, 27 Apr 2014 16:14:04 +0000 (11:14 -0500)
In Cygwin, the file's modification date is updated when its
permissions are modified. To make the tests compatible with Cygwin,
create the files first, set their permissions, then set the date.

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
[rlb@defaultvalue.org: adjust commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
t/test-ls.sh

index 15b5ac86046905e5150feca40fed1ba4bac7f621..0740d1accae87d252ba9613bc55eec9c20098a23 100755 (executable)
@@ -17,20 +17,16 @@ WVPASS bup init
 WVPASS cd "$tmpdir"
 
 WVPASS mkdir src
-WVPASS touch -t 196907202018 src/.dotfile
-WVPASS bup random 1k > src/file
-WVPASS touch -t 196907202018 src/file
-(WVPASS cd src; WVPASS ln -s file symlink) || exit $?
+WVPASS touch src/.dotfile src/executable
 WVPASS mkfifo src/fifo
-WVPASS touch -t 196907202018 src/fifo
 WVPASS "$top"/t/mksock src/socket
-WVPASS touch -t 196907202018 src/socket
-WVPASS touch -t 196907202018 src/executable
+WVPASS bup random 1k > src/file
 WVPASS chmod u+x src/executable
-WVPASS touch -t 196907202018 src/executable
+WVPASS chmod -R u=rwX,g-rwx,o-rwx .
+WVPASS touch -t 196907202018 src/.dotfile src/*
+(WVPASS cd src; WVPASS ln -s file symlink) || exit $?
 WVPASS touch -t 196907202018 src
 WVPASS touch -t 196907202018 .
-WVPASS chmod -R u=rwX,g-rwx,o-rwx .
 WVPASS bup index src
 WVPASS bup save -n src src