[PATCH] tests: Use an explicit if/then/else block in test-execute-bit
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Oct 30 18:52:54 UTC 2007
# HG changeset patch
# User Giorgos Keramidas <keramida at ceid.upatras.gr>
# Date 1193770268 -7200
# Node ID e9773a4cd8dc4b9a4d304e6ebf0319aae18f747c
# Parent 5bff70ff04315b2929c548326d259c27c5e238b9
tests: Use an explicit if/then/else block in test-execute-bit
I'm not sure if all /bin/sh implementations handle correctly
multiple commands like:
cmd && true-branch || false-branch
so spell more explicitly the if-then-else conditionals we are
using to clarify a bit the test code.
diff --git a/tests/test-execute-bit b/tests/test-execute-bit
--- a/tests/test-execute-bit
+++ b/tests/test-execute-bit
@@ -12,4 +12,8 @@ hg id
hg up 0
hg id
-test -x a && echo executable -- eek || echo not executable -- whew
+if test -x a ; then
+ echo executable -- eek
+else
+ echo not executable -- whew
+fi
More information about the Mercurial-devel
mailing list