# HG changeset patch # User Martin Geisler # Date 1282056762 -7200 # Node ID e31e5eb8736c5b05b85202693f1e98cad4f1288b # Parent 628cdd158ec0827b02fe2f645d2c1f9ae9e273bd tests: unify test-subrepo-paths diff -r 628cdd158ec0 -r e31e5eb8736c tests/test-subrepo-paths --- a/tests/test-subrepo-paths Tue Aug 17 16:52:26 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -#!/bin/sh - -hg init outer -cd outer - -echo 'sub = http://example.net/libfoo' > .hgsub -hg add .hgsub - -echo '% hg debugsub with no remapping' -hg debugsub - -cat > .hg/hgrc < .hg/hgrc <&1 | "$TESTDIR/filtertmp.py" - -exit 0 diff -r 628cdd158ec0 -r e31e5eb8736c tests/test-subrepo-paths.out --- a/tests/test-subrepo-paths.out Tue Aug 17 16:52:26 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -% hg debugsub with no remapping -path sub - source http://example.net/libfoo - revision -% hg debugsub with remapping -path sub - source ssh://localhost/libfoo - revision -% test bad subpaths pattern -abort: bad subrepository pattern in $HGTMP/test-subrepo-paths/outer/.hg/hgrc:2: invalid group reference diff -r 628cdd158ec0 -r e31e5eb8736c tests/test-subrepo-paths.t --- /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 < [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 < [subpaths] + > .* = \1 + > EOF + $ hg debugsub + abort: bad subrepository pattern in .*/test-subrepo-paths.t/outer/.hg/hgrc:2: invalid group reference + + $ exit 0