changeset 16487:4fe874697a4d stable

tests: fix incorrect markup of continued lines of sh commands
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 23 Apr 2012 01:39:26 +0200
parents ac987a9d8d49
children d9901eb3e42d
files contrib/check-code.py tests/test-copy2.t tests/test-diff-change.t tests/test-hgignore.t tests/test-serve.t
diffstat 5 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Apr 23 01:39:26 2012 +0200
+++ b/contrib/check-code.py	Mon Apr 23 01:39:26 2012 +0200
@@ -95,6 +95,7 @@
     (uprefix + r'.*\|\| echo.*(fail|error)',
      "explicit exit code checks unnecessary"),
     (uprefix + r'set -e', "don't use set -e"),
+    (uprefix + r'\s', "don't indent commands, use > for continued lines"),
     (uprefixc + r'( *)\t', "don't use tabs to indent"),
     (uprefixc + r'.*do\s*true;\s*done',
      "don't use true as loop body, use sleep 0"),
--- a/tests/test-copy2.t	Mon Apr 23 01:39:26 2012 +0200
+++ b/tests/test-copy2.t	Mon Apr 23 01:39:26 2012 +0200
@@ -100,7 +100,7 @@
     bar
 
 foo was clean:
-  $  hg st -AC foo
+  $ hg st -AC foo
   C foo
 but it's considered modified after a copy --after --force
   $ hg copy -Af bar foo
--- a/tests/test-diff-change.t	Mon Apr 23 01:39:26 2012 +0200
+++ b/tests/test-diff-change.t	Mon Apr 23 01:39:26 2012 +0200
@@ -33,8 +33,8 @@
 Testing diff --change when merge:
 
   $ for i in 1 2 3 4 5 6 7 8 9 10; do
-  $    echo $i >> file.txt
-  $ done
+  >    echo $i >> file.txt
+  > done
   $ hg commit -m "lots of text" # 3
 
   $ sed -e 's,^2$,x,' file.txt > file.txt.tmp
--- a/tests/test-hgignore.t	Mon Apr 23 01:39:26 2012 +0200
+++ b/tests/test-hgignore.t	Mon Apr 23 01:39:26 2012 +0200
@@ -48,7 +48,7 @@
   [255]
 
   $ echo ".*\.o" > .hgignore
-  $  hg status
+  $ hg status
   A dir/b.o
   ? .hgignore
   ? a.c
--- a/tests/test-serve.t	Mon Apr 23 01:39:26 2012 +0200
+++ b/tests/test-serve.t	Mon Apr 23 01:39:26 2012 +0200
@@ -28,9 +28,9 @@
   $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
   $ cat hg.pid >> "$DAEMON_PIDS"
   $ if [ -f access.log ]; then
-  $     echo 'access log created - .hg/hgrc respected'
+  >     echo 'access log created - .hg/hgrc respected'
+  > fi
   access log created - .hg/hgrc respected
-  $ fi
 
 errors