[PATCH] tests: unify test-execute-bit
Adrian Buehlmann
adrian at cadifra.com
Fri Sep 3 02:49:32 CDT 2010
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1283499977 -7200
# Node ID 40d099043c80167c80e1d4ad106f62b1762dcd66
# Parent 9f8dedd13ec4c87200e32ba87128bf42834292ae
tests: unify test-execute-bit
diff --git a/tests/test-execute-bit.out b/tests/test-execute-bit.out
deleted file mode 100644
--- a/tests/test-execute-bit.out
+++ /dev/null
@@ -1,8 +0,0 @@
-adding a
-79abf14474dc tip
-% make sure we notice the change of mode if the cached size == -1
-n 0 -1 unset a
-M a
-0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-d69afc33ff8a
-not executable -- whew
diff --git a/tests/test-execute-bit b/tests/test-execute-bit.t
old mode 100755
new mode 100644
rename from tests/test-execute-bit
rename to tests/test-execute-bit.t
--- a/tests/test-execute-bit
+++ b/tests/test-execute-bit.t
@@ -1,21 +1,28 @@
-#!/bin/sh
+ $ "$TESTDIR/hghave" execbit || exit 80
-"$TESTDIR/hghave" execbit || exit 80
+ $ hg init
+ $ echo a > a
+ $ hg ci -Am'not executable'
+ adding a
-hg init
-echo a > a
-hg ci -Am'not executable'
+ $ chmod +x a
+ $ hg ci -m'executable'
+ $ hg id
+ 79abf14474dc tip
-chmod +x a
-hg ci -m'executable'
-hg id
+Make sure we notice the change of mode if the cached size == -1:
-echo '% make sure we notice the change of mode if the cached size == -1'
-hg rm a
-hg revert -r 0 a
-hg debugstate
-hg st
+ $ hg rm a
+ $ hg revert -r 0 a
+ $ hg debugstate
+ n 0 -1 unset a
+ $ hg status
+ M a
-hg up 0
-hg id
-test -x a && echo executable -- eek || echo not executable -- whew
+ $ hg up 0
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg id
+ d69afc33ff8a
+ $ test -x a && echo executable -- bad || echo not executable -- good
+ not executable -- good
+
More information about the Mercurial-devel
mailing list