Patchwork tests: drop an unnecessary redirect to /dev/null

login
register
mail settings
Submitter Matt Harbison
Date Aug. 21, 2018, 2:06 a.m.
Message ID <c17fc7f1b96ac9f847f5.1534817213@Envy>
Download mbox | patch
Permalink /patch/33930/
State Accepted
Headers show

Comments

Matt Harbison - Aug. 21, 2018, 2:06 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1534817062 14400
#      Mon Aug 20 22:04:22 2018 -0400
# Node ID c17fc7f1b96ac9f847f5e904c1331c29060ec9cd
# Parent  f85b256082527ab729cd480c21a310127b42eb2e
tests: drop an unnecessary redirect to /dev/null

This eliminates the need to conditionalize the color output, because NUL on
Windows is a tty.  Credit to Yuya for recognizing this.
Yuya Nishihara - Aug. 21, 2018, 11:46 a.m.
On Mon, 20 Aug 2018 22:06:53 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1534817062 14400
> #      Mon Aug 20 22:04:22 2018 -0400
> # Node ID c17fc7f1b96ac9f847f5e904c1331c29060ec9cd
> # Parent  f85b256082527ab729cd480c21a310127b42eb2e
> tests: drop an unnecessary redirect to /dev/null

Queued, thanks.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -1254,11 +1254,9 @@  Broken disabled extension and command:
   > def g():
   >     pass
   > EOF
-  $ hg --config extensions.path=./path.py help foo > /dev/null
-  abort: no such help topic: foo (no-windows !)
-  (try 'hg help --keyword foo') (no-windows !)
-  \x1b[0;31mabort: no such help topic: foo\x1b[0m (esc) (windows !)
-  \x1b[0;31m(try 'hg help --keyword foo')\x1b[0m (esc) (windows !)
+  $ hg --config extensions.path=./path.py help foo
+  abort: no such help topic: foo
+  (try 'hg help --keyword foo')
   [255]
 
   $ cat > throw.py <<EOF
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1480,11 +1480,9 @@  Test -e / -c / -k combinations
   Commands:
   $ hg help -c commit > /dev/null
   $ hg help -e -c commit > /dev/null
-  $ hg help -e commit > /dev/null
-  abort: no such help topic: commit (no-windows !)
-  (try 'hg help --keyword commit') (no-windows !)
-  \x1b[0;31mabort: no such help topic: commit\x1b[0m (esc) (windows !)
-  \x1b[0;31m(try 'hg help --keyword commit')\x1b[0m (esc) (windows !)
+  $ hg help -e commit
+  abort: no such help topic: commit
+  (try 'hg help --keyword commit')
   [255]
 
 Test keyword search help