@@ -55,35 +55,36 @@ t.test('file and directories made consistent if toPath not set', t => {
5555} )
5656
5757t . test ( 'consistent hosted git info urls' , t => {
58- const expect = 'git+ssh://git@github.com/a/b.git'
58+ const expectSsh = 'git+ssh://git@github.com/a/b.git'
59+ const expectHttps = 'git+https://github.com/a/b.git'
5960 const expectAuth = 'git+https://user:pass@github.com/a/b.git'
60- t . equal ( cr ( 'a/b' ) , expect )
61- t . equal ( cr ( 'github:a/b' ) , expect )
62- t . equal ( cr ( 'git+https://github.com/a/b' ) , expect )
63- t . equal ( cr ( 'git://github.com/a/b' ) , expect )
64- t . equal ( cr ( 'git+ssh://git@github.com/a/b' ) , expect )
65- t . equal ( cr ( 'git+https://github.com/a/b.git' ) , expect )
66- t . equal ( cr ( 'git://github.com/a/b.git' ) , expect )
67- t . equal ( cr ( 'git+ssh://git@github.com/a/b.git' ) , expect )
61+ t . equal ( cr ( 'a/b' ) , expectSsh )
62+ t . equal ( cr ( 'github:a/b' ) , expectSsh )
63+ t . equal ( cr ( 'git+https://github.com/a/b' ) , expectHttps )
64+ t . equal ( cr ( 'git://github.com/a/b' ) , expectSsh )
65+ t . equal ( cr ( 'git+ssh://git@github.com/a/b' ) , expectSsh )
66+ t . equal ( cr ( 'git+https://github.com/a/b.git' ) , expectHttps )
67+ t . equal ( cr ( 'git://github.com/a/b.git' ) , expectSsh )
68+ t . equal ( cr ( 'git+ssh://git@github.com/a/b.git' ) , expectSsh )
6869 t . equal ( cr ( 'git+https://user:pass@github.com/a/b.git' ) , expectAuth )
6970
7071 const hash = '#0000000000000000000000000000000000000000'
71- t . equal ( cr ( 'a/b' + hash ) , expect + hash )
72- t . equal ( cr ( 'github:a/b' + hash ) , expect + hash )
73- t . equal ( cr ( 'git+https://github.com/a/b' + hash ) , expect + hash )
74- t . equal ( cr ( 'git://github.com/a/b' + hash ) , expect + hash )
75- t . equal ( cr ( 'git+ssh://git@github.com/a/b' + hash ) , expect + hash )
76- t . equal ( cr ( 'git+https://github.com/a/b.git' + hash ) , expect + hash )
77- t . equal ( cr ( 'git://github.com/a/b.git' + hash ) , expect + hash )
78- t . equal ( cr ( 'git+ssh://git@github.com/a/b.git' + hash ) , expect + hash )
79- t . equal ( cr ( 'xyz@a/b' + hash ) , expect + hash )
80- t . equal ( cr ( 'xyz@github:a/b' + hash ) , expect + hash )
81- t . equal ( cr ( 'xyz@git+https://github.com/a/b' + hash ) , expect + hash )
82- t . equal ( cr ( 'xyz@git://github.com/a/b' + hash ) , expect + hash )
83- t . equal ( cr ( 'xyz@git+ssh://git@github.com/a/b' + hash ) , expect + hash )
84- t . equal ( cr ( 'xyz@git+https://github.com/a/b.git' + hash ) , expect + hash )
85- t . equal ( cr ( 'xyz@git://github.com/a/b.git' + hash ) , expect + hash )
86- t . equal ( cr ( 'xyz@git+ssh://git@github.com/a/b.git' + hash ) , expect + hash )
72+ t . equal ( cr ( 'a/b' + hash ) , expectSsh + hash )
73+ t . equal ( cr ( 'github:a/b' + hash ) , expectSsh + hash )
74+ t . equal ( cr ( 'git+https://github.com/a/b' + hash ) , expectHttps + hash )
75+ t . equal ( cr ( 'git://github.com/a/b' + hash ) , expectSsh + hash )
76+ t . equal ( cr ( 'git+ssh://git@github.com/a/b' + hash ) , expectSsh + hash )
77+ t . equal ( cr ( 'git+https://github.com/a/b.git' + hash ) , expectHttps + hash )
78+ t . equal ( cr ( 'git://github.com/a/b.git' + hash ) , expectSsh + hash )
79+ t . equal ( cr ( 'git+ssh://git@github.com/a/b.git' + hash ) , expectSsh + hash )
80+ t . equal ( cr ( 'xyz@a/b' + hash ) , expectSsh + hash )
81+ t . equal ( cr ( 'xyz@github:a/b' + hash ) , expectSsh + hash )
82+ t . equal ( cr ( 'xyz@git+https://github.com/a/b' + hash ) , expectHttps + hash )
83+ t . equal ( cr ( 'xyz@git://github.com/a/b' + hash ) , expectSsh + hash )
84+ t . equal ( cr ( 'xyz@git+ssh://git@github.com/a/b' + hash ) , expectSsh + hash )
85+ t . equal ( cr ( 'xyz@git+https://github.com/a/b.git' + hash ) , expectHttps + hash )
86+ t . equal ( cr ( 'xyz@git://github.com/a/b.git' + hash ) , expectSsh + hash )
87+ t . equal ( cr ( 'xyz@git+ssh://git@github.com/a/b.git' + hash ) , expectSsh + hash )
8788 t . end ( )
8889} )
8990
0 commit comments