tests/test-subrepo-paths.t
changeset 15150 91dc8878f888
parent 13582 4f5b269f4ce6
child 15447 9910f60a37ee
--- a/tests/test-subrepo-paths.t	Thu Sep 22 14:39:49 2011 +0200
+++ b/tests/test-subrepo-paths.t	Thu Sep 22 15:15:18 2011 +0200
@@ -1,19 +1,22 @@
   $ hg init outer
   $ cd outer
 
+  $ echo '[paths]' >> .hg/hgrc
+  $ echo 'default = http://example.net/' >> .hg/hgrc
+
 hg debugsub with no remapping
 
-  $ echo 'sub = http://example.net/libfoo' > .hgsub
+  $ echo 'sub = libfoo' > .hgsub
   $ hg add .hgsub
 
   $ hg debugsub
   path sub
-   source   http://example.net/libfoo
+   source   libfoo
    revision 
 
 hg debugsub with remapping
 
-  $ echo '[subpaths]' > .hg/hgrc
+  $ echo '[subpaths]' >> .hg/hgrc
   $ printf 'http://example.net/lib(.*) = C:\\libs\\\\1-lib\\\n' >> .hg/hgrc
 
   $ hg debugsub
@@ -30,6 +33,21 @@
    source   C:\libs\bar-lib\
    revision 
 
+test absolute source path -- testing with a URL is important since
+standard os.path.join wont treat that as an absolute path
+
+  $ echo 'abs = http://example.net/abs' > .hgsub
+  $ hg debugsub
+  path abs
+   source   http://example.net/abs
+   revision 
+
+  $ echo 'abs = /abs' > .hgsub
+  $ hg debugsub
+  path abs
+   source   /abs
+   revision 
+
 test bad subpaths pattern
 
   $ cat > .hg/hgrc <<EOF