From: Rob Browning Date: Tue, 18 Feb 2014 18:30:31 +0000 (-0600) Subject: test-ls.sh: take only the first 10 chars from ls -l's mode string. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=bd27bc382be06bc4923894c7355572b484c4e5f8;p=packages%2Fb%2Fbup.git test-ls.sh: take only the first 10 chars from ls -l's mode string. Since ls -l's mode string may not be separated from the next field by a space (i.e. when ACLs, etc. are involved), take only the first 10 characters for now when retrieving the symlink mode string (cf. 30d9027cc5444f038d38927219dc59e3b69fa219). Thanks to Mark J Hewitt for pointing out the problem and testing the solution. Signed-off-by: Rob Browning --- diff --git a/t/test-ls.sh b/t/test-ls.sh index d91f1d3..4a9e5b1 100755 --- a/t/test-ls.sh +++ b/t/test-ls.sh @@ -121,7 +121,7 @@ d--------- ?/? 0 1970-01-01 00:00 .commit/ d--------- ?/? 0 1970-01-01 00:00 .tag/ d--------- ?/? 0 1970-01-01 00:00 src/" -symlink_mode="$(WVPASS ls -l src/symlink | cut -d' ' -f 1)" || exit $? +symlink_mode="$(WVPASS ls -l src/symlink | cut -b -10)" || exit $? symlink_size="$(WVPASS python -c "import os print os.lstat('src/symlink').st_size")" || exit $?