changeset 11914:e31e5eb8736c

tests: unify test-subrepo-paths
author Martin Geisler <mg@lazybytes.net>
date Tue, 17 Aug 2010 16:52:42 +0200
parents 628cdd158ec0
children d521e72314f9
files tests/test-subrepo-paths tests/test-subrepo-paths.out tests/test-subrepo-paths.t
diffstat 3 files changed, 35 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- 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 <<EOF
-[subpaths]
-http://example.net = ssh://localhost
-EOF
-
-echo '% hg debugsub with remapping'
-hg debugsub
-
-echo '% test bad subpaths pattern'
-cat > .hg/hgrc <<EOF
-[subpaths]
-.* = \1
-EOF
-hg debugsub 2>&1 | "$TESTDIR/filtertmp.py"
-
-exit 0
--- 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
--- /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