diff tests/test-pull.t @ 13817:7f18bab2c0b0

url: abort on file:// URLs with non-localhost hosts
author Brodie Rao <brodie@bitheap.org>
date Wed, 30 Mar 2011 20:01:31 -0700
parents 1e497df514e2
children ad179644750f
line wrap: on
line diff
--- a/tests/test-pull.t	Wed Mar 30 20:00:24 2011 -0700
+++ b/tests/test-pull.t	Wed Mar 30 20:01:31 2011 -0700
@@ -78,4 +78,8 @@
 
   $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
   $ hg pull -q "$URL"
+  abort: file:// URLs can only refer to localhost
+  [255]
 
+  $ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
+  $ hg pull -q "$URL"