Patchwork [2,of,2] tests: test-check-code-hg.t works for all files to check

login
register
mail settings
Submitter Simon Heimberg
Date July 15, 2013, 11:24 p.m.
Message ID <2f2a1caf1e123a5a3764.1373930657@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1905/
State Superseded
Commit 9aee3d01439407c66fedc30d52b8e1845387b3bb
Headers show

Comments

Simon Heimberg - July 15, 2013, 11:24 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1373925057 -7200
# Node ID 2f2a1caf1e123a5a3764d0454b909a965459fc41
# Parent  6b87c9fb68dcb34bb20eb678ee83dae802ec4729
tests: test-check-code-hg.t works for all files to check

with xargs, backslashes are eaten up. Convert them to slashes therefore.
This is only a problem with ls (on windows). hg manifest returns slashes.

The pipe char is moved before the line end for telling check-code.py that sed
does not modify the output.

Patch

diff -r 6b87c9fb68dc -r 2f2a1caf1e12 tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t	Sam Jul 13 23:10:56 2013 +0200
+++ b/tests/test-check-code-hg.t	Mon Jul 15 23:50:57 2013 +0200
@@ -26,6 +26,5 @@ 
 
 New errors are not allowed. Warnings are strongly discouraged.
 
-  $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py; } \
-  >   | xargs "$check_code" --warnings --per-file=0 \
-  >   || false
+  $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py | sed 's-\\-/-g'; } |
+  >   xargs "$check_code" --warnings --per-file=0 || false