diff tests/test-mq.t @ 12375:02990e22150b

tests: require regexes in unified tests to be marked with " (re)" Consider this test: $ hg glog --template '{rev}:{node|short} "{desc}"\n' @ 2:20c4f79fd7ac "3" | | o 1:38f24201dcab "2" |/ o 0:2a18120dc1c9 "1" Because each line beginning with "|" can be compiled as a regular expression (equivalent to ".*|"), they will match any output. Similarly: $ echo foo The blank output line can be compiled as a regular expression and will also match any output. With this patch, none of the above output lines will be matched as regular expressions. A line must end in " (re)" in order to be matched as one. Lines are still matched literally first, so the following will pass: $ echo 'foo (re)' foo (re)
author Brodie Rao <brodie@bitheap.org>
date Wed, 22 Sep 2010 16:06:00 -0500
parents 22f3353bcc36
children 97ffc68f71d3
line wrap: on
line diff
--- a/tests/test-mq.t	Wed Sep 22 16:05:59 2010 -0500
+++ b/tests/test-mq.t	Wed Sep 22 16:06:00 2010 -0500
@@ -135,7 +135,7 @@
   guards
   $ cat .hg/patches/series
   $ hg qinit -c
-  abort: repository .* already exists!
+  abort: repository .* already exists! (re)
   [255]
   $ cd ..
 
@@ -237,9 +237,9 @@
   $ cat .hg/patches/test.patch
   foo bar
   
-  diff -r [a-f0-9]* a
-  --- a/a\t(?P<date>.*)
-  \+\+\+ b/a\t(?P<date2>.*)
+  diff -r [a-f0-9]* a (re)
+  --- a/a\t(?P<date>.*) (re)
+  \+\+\+ b/a\t(?P<date2>.*) (re)
   @@ -1,1 +1,2 @@
    a
   +a
@@ -290,7 +290,7 @@
 .hg/tags.cache (pre qpush):
 
   $ cat .hg/tags.cache
-  1 [\da-f]{40}
+  1 [\da-f]{40} (re)
   
   $ hg qpush
   applying test.patch
@@ -300,7 +300,7 @@
 .hg/tags.cache (post qpush):
 
   $ cat .hg/tags.cache
-  2 [\da-f]{40}
+  2 [\da-f]{40} (re)
   
   $ checkundo qpush
   $ cd ..
@@ -737,7 +737,7 @@
   adding x
   $ hg strip tip
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to .*
+  saved backup bundle to .* (re)
   $ hg unbundle .hg/strip-backup/*
   adding changesets
   adding manifests
@@ -760,7 +760,7 @@
 
   $ hg strip -f tip
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to .*
+  saved backup bundle to .* (re)
 
 
 cd b; hg qrefresh
@@ -782,14 +782,14 @@
   foo
   
   diff -r cb9a9f314b8b a
-  --- a/a\t(?P<date>.*)
-  \+\+\+ b/a\t(?P<date>.*)
+  --- a/a\t(?P<date>.*) (re)
+  \+\+\+ b/a\t(?P<date>.*) (re)
   @@ -1,1 +1,2 @@
    a
   +a
   diff -r cb9a9f314b8b b/f
-  --- /dev/null\t(?P<date>.*)
-  \+\+\+ b/b/f\t(?P<date>.*)
+  --- /dev/null\t(?P<date>.*) (re)
+  \+\+\+ b/b/f\t(?P<date>.*) (re)
   @@ -0,0 +1,1 @@
   +f
 
@@ -800,8 +800,8 @@
   foo
   
   diff -r cb9a9f314b8b b/f
-  --- /dev/null\t(?P<date>.*)
-  \+\+\+ b/b/f\t(?P<date>.*)
+  --- /dev/null\t(?P<date>.*) (re)
+  \+\+\+ b/b/f\t(?P<date>.*) (re)
   @@ -0,0 +1,1 @@
   +f
   $ hg status
@@ -1118,7 +1118,7 @@
   
   $ hg strip 1
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to .*
+  saved backup bundle to .* (re)
   $ checkundo strip
   $ hg log
   changeset:   1:20cbbe65cff7