tests/test-init.t
changeset 12584 fb24b491e06a
parent 12328 b63f6422d2a7
child 12687 34d8247a4595
--- a/tests/test-init.t	Wed Sep 29 01:32:50 2010 +0200
+++ b/tests/test-init.t	Wed Sep 29 01:32:51 2010 +0200
@@ -24,13 +24,13 @@
   $ checknewrepo()
   > {
   >    name=$1
-  >    if [ -d $name/.hg/store ]; then
+  >    if [ -d "$name"/.hg/store ]; then
   >    echo store created
   >    fi
-  >    if [ -f $name/.hg/00changelog.i ]; then
+  >    if [ -f "$name"/.hg/00changelog.i ]; then
   >    echo 00changelog.i created
   >    fi
-  >    cat $name/.hg/requires
+  >    cat "$name"/.hg/requires
   > }
 
 creating 'local'
@@ -157,3 +157,31 @@
   revlogv1
   store
   fncache
+
+prepare test of init of url configured from paths
+
+  $ echo '[paths]' >> $HGRCPATH
+  $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
+  $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH
+
+init should (for consistency with clone) expand the url
+
+  $ hg init somewhere
+  $ checknewrepo "url from paths"
+  store created
+  00changelog.i created
+  revlogv1
+  store
+  fncache
+
+verify that clone also expand urls
+
+  $ hg clone somewhere elsewhere
+  updating to branch default
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ checknewrepo "another paths url"
+  store created
+  00changelog.i created
+  revlogv1
+  store
+  fncache