Patchwork [3,of,3,v2] schemes: add tests new for expand-scheme command

login
register
mail settings
Submitter Jason R. Coombs
Date Feb. 1, 2016, 2:09 p.m.
Message ID <8c5e77d186807e6facc0.1454335785@waste.org>
Download mbox | patch
Permalink /patch/12933/
State Accepted
Headers show

Comments

Jason R. Coombs - Feb. 1, 2016, 2:09 p.m.
# HG changeset patch
# User Jason R. Coombs <jaraco@jaraco.com>
# Date 1454097224 18000
#      Fri Jan 29 14:53:44 2016 -0500
# Node ID 8c5e77d186807e6facc019bfbaccc2f637d538cd
# Parent  4c43c291019bd015d803ac0f5d4f1faef92165b8
schemes: add tests new for expand-scheme command

Patch

diff --git a/tests/test-schemes.t b/tests/test-schemes.t
--- a/tests/test-schemes.t
+++ b/tests/test-schemes.t
@@ -52,6 +52,21 @@ 
   no changes found
   [1]
 
+check that expand-scheme outputs the canonical form
+
+  $ hg expand-scheme bb://user/repo
+  https://bitbucket.org/user/repo
+
+expanding an unknown scheme emits the input
+
+  $ hg expand-scheme foobar://this/that
+  foobar://this/that
+
+expanding a canonical URL emits the input
+
+  $ hg expand-scheme https://bitbucket.org/user/repo
+  https://bitbucket.org/user/repo
+
 errors
 
   $ cat errors.log