diff tests/test-subrepo.t @ 12376:97ffc68f71d3

tests: add glob matching for unified tests This adds a " (glob)" marker that works like a simpler version of (re): "*" is converted to ".*", and "?" is converted to ".". Both special characters can be escaped using "\", and the backslash itself can be escaped as well. Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't supported.
author Brodie Rao <brodie@bitheap.org>
date Wed, 22 Sep 2010 16:06:02 -0500
parents 02990e22150b
children 4fee1fd3de9a
line wrap: on
line diff
--- a/tests/test-subrepo.t	Wed Sep 22 16:06:00 2010 -0500
+++ b/tests/test-subrepo.t	Wed Sep 22 16:06:02 2010 -0500
@@ -236,19 +236,19 @@
   $ cd ..
   $ hg clone t tc
   updating to branch default
-  pulling subrepo s from .*/sub/t/s (re)
+  pulling subrepo s from */sub/t/s (glob)
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
   added 4 changesets with 5 changes to 3 files
-  pulling subrepo s/ss from .*/sub/t/s/ss (re)
+  pulling subrepo s/ss from */sub/t/s/ss (glob)
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pulling subrepo t from .*/sub/t/t (re)
+  pulling subrepo t from */sub/t/t (glob)
   requesting all changes
   adding changesets
   adding manifests
@@ -270,14 +270,14 @@
   $ hg ci -m11
   committing subrepository t
   $ hg push
-  pushing .*sub/t (re)
-  pushing .*sub/t/s/ss (re)
+  pushing *sub/t (glob)
+  pushing *sub/t/s/ss (glob)
   searching for changes
   no changes found
-  pushing .*sub/t/s (re)
+  pushing *sub/t/s (glob)
   searching for changes
   no changes found
-  pushing .*sub/t/t (re)
+  pushing *sub/t/t (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -295,27 +295,27 @@
   $ hg ci -m12
   committing subrepository s
   $ hg push
-  pushing .*sub/t (re)
-  pushing .*sub/t/s/ss (re)
+  pushing *sub/t (glob)
+  pushing *sub/t/s/ss (glob)
   searching for changes
   no changes found
-  pushing .*sub/t/s (re)
+  pushing *sub/t/s (glob)
   searching for changes
   abort: push creates new remote heads on branch 'default'!
   (did you forget to merge? use push -f to force)
   [255]
   $ hg push -f
-  pushing .*sub/t (re)
-  pushing .*sub/t/s/ss (re)
+  pushing *sub/t (glob)
+  pushing *sub/t/s/ss (glob)
   searching for changes
   no changes found
-  pushing .*sub/t/s (re)
+  pushing *sub/t/s (glob)
   searching for changes
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing .*sub/t/t (re)
+  pushing *sub/t/t (glob)
   searching for changes
   no changes found
   searching for changes
@@ -337,7 +337,7 @@
 
   $ cd ../tc
   $ hg pull
-  pulling .*sub/t (re)
+  pulling *sub/t (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -348,7 +348,7 @@
 should pull t
 
   $ hg up
-  pulling subrepo t from .*/sub/t/t (re)
+  pulling subrepo t from */sub/t/t (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -541,9 +541,9 @@
   $ cat mercurial2/main/nested_absolute/.hg/hgrc \
   >     mercurial2/main/nested_relative/.hg/hgrc
   [paths]
-  default = .*/test-subrepo\.t/sub/mercurial/nested_absolute (re)
+  default = */test-subrepo.t/sub/mercurial/nested_absolute (glob)
   [paths]
-  default = .*/test-subrepo\.t/sub/mercurial/nested_relative (re)
+  default = */test-subrepo.t/sub/mercurial/nested_relative (glob)
   $ rm -rf mercurial mercurial2
 
 issue 1977
@@ -559,7 +559,7 @@
   committing subrepository s
   $ hg clone repo repo2
   updating to branch default
-  pulling subrepo s from .*/sub/repo/s (re)
+  pulling subrepo s from */sub/repo/s (glob)
   requesting all changes
   adding changesets
   adding manifests