From 1f32d06c4e075439f93ec03f645b00d9750fc595 Mon Sep 17 00:00:00 2001 From: Mildred Ki'Lya Date: Wed, 2 Jan 2013 10:53:36 +0100 Subject: [PATCH] Fix t/130-mode: "ls -l" output is not always as expected [tweaked by apenwarr to remove dependency on non-portable /usr/bin/stat] --- t/130-mode/all.do | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/130-mode/all.do b/t/130-mode/all.do index a436baf..48183fd 100644 --- a/t/130-mode/all.do +++ b/t/130-mode/all.do @@ -1,5 +1,5 @@ umask 0022 redo mode1 -MODE="$(ls -l mode1 | cut -d' ' -f1)" -[ "$MODE" = "-rw-r--r--" ] || exit 78 +MODE=$(python -c 'import os; print oct(os.stat("mode1").st_mode & 07777)') +[ "$MODE" = "0644" ] || exit 78