diff tests/test-subrepo-paths.t @ 11914:e31e5eb8736c

tests: unify test-subrepo-paths
author Martin Geisler <mg@lazybytes.net>
date Tue, 17 Aug 2010 16:52:42 +0200
parents tests/test-subrepo-paths@a8614c5a5e9a
children be33381882ad
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-subrepo-paths.t	Tue Aug 17 16:52:42 2010 +0200
@@ -0,0 +1,35 @@
+  $ hg init outer
+  $ cd outer
+
+  $ echo 'sub = http://example.net/libfoo' > .hgsub
+  $ hg add .hgsub
+
+hg debugsub with no remapping
+
+  $ hg debugsub
+  path sub
+   source   http://example.net/libfoo
+   revision 
+
+  $ cat > .hg/hgrc <<EOF
+  > [subpaths]
+  > http://example.net = ssh://localhost
+  > EOF
+
+hg debugsub with remapping
+
+  $ hg debugsub
+  path sub
+   source   ssh://localhost/libfoo
+   revision 
+
+test bad subpaths pattern
+
+  $ cat > .hg/hgrc <<EOF
+  > [subpaths]
+  > .* = \1
+  > EOF
+  $ hg debugsub
+  abort: bad subrepository pattern in .*/test-subrepo-paths.t/outer/.hg/hgrc:2: invalid group reference
+
+  $ exit 0