Patchwork [1,of,3] test-phases-exchange: properly conditionalize output

login
register
mail settings
Submitter Matt Harbison
Date July 18, 2017, 12:51 p.m.
Message ID <684787b859b507ffa4a4.1500382278@Envy>
Download mbox | patch
Permalink /patch/22481/
State Accepted
Headers show

Comments

Matt Harbison - July 18, 2017, 12:51 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1500380050 14400
#      Tue Jul 18 08:14:10 2017 -0400
# Node ID 684787b859b507ffa4a42baf6e453f14c6eb6352
# Parent  7733525d160cbf6395d63fc8a62b56760e75b06b
test-phases-exchange: properly conditionalize output

I forgot to invert the conditions, and the test runner didn't catch it[1].  But
since only '&&' is supported in the per-line feature tests, this won't work
anyway.

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-July/101941.html
Yuya Nishihara - July 18, 2017, 2:32 p.m.
On Tue, 18 Jul 2017 08:51:18 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1500380050 14400
> #      Tue Jul 18 08:14:10 2017 -0400
> # Node ID 684787b859b507ffa4a42baf6e453f14c6eb6352
> # Parent  7733525d160cbf6395d63fc8a62b56760e75b06b
> test-phases-exchange: properly conditionalize output

I'm not 100% sure about the run-tests changes, but they smell good.
Queued, thanks.

Patch

diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -1302,12 +1302,17 @@ 
 does.  The conditional output accounts for changes in the conditional block
 above.
 
+#if unix-permissions no-root
+  $ hg -R Upsilon phase -q --force --draft 2
+  test-debug-phase: move rev 2: 0 -> 1
+#else
   $ hg -R Upsilon phase -q --force --draft 2
   test-debug-phase: move rev 2: 0 -> 1
-  test-debug-phase: move rev 3: 0 -> 1 (unix-permissions no-root !)
-  test-debug-phase: move rev 7: 0 -> 1 (unix-permissions no-root !)
-  test-debug-phase: move rev 8: 0 -> 1 (unix-permissions no-root !)
-  test-debug-phase: move rev 9: 0 -> 1 (unix-permissions no-root !)
+  test-debug-phase: move rev 3: 0 -> 1
+  test-debug-phase: move rev 7: 0 -> 1
+  test-debug-phase: move rev 8: 0 -> 1
+  test-debug-phase: move rev 9: 0 -> 1
+#endif
 
   $ hg clone -q Upsilon Pi -r 7
   test-debug-phase: new rev 0:  x -> 0