@@ -4,14 +4,14 @@ load 'util/init.sh'
44
55
66@test " fails on no arguments" {
7- run util.construct_clone_url
7+ run util.extract_data_from_input
88
99assert_failure
1010assert_line -p " Must supply a repository"
1111}
1212
1313@test " parses with full https url" {
14- util.construct_clone_url ' https://gitlab.com/eankeen/proj'
14+ util.extract_data_from_input ' https://gitlab.com/eankeen/proj'
1515
1616assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
1717assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -20,7 +20,7 @@ load 'util/init.sh'
2020}
2121
2222@test " parses with full http url" {
23- util.construct_clone_url ' http://gitlab.com/eankeen/proj'
23+ util.extract_data_from_input ' http://gitlab.com/eankeen/proj'
2424
2525assert [ " $REPLY1 " = ' http://gitlab.com/eankeen/proj.git' ]
2626assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -29,7 +29,7 @@ load 'util/init.sh'
2929}
3030
3131@test " parses with full https url with .git ending" {
32- util.construct_clone_url ' https://gitlab.com/eankeen/proj'
32+ util.extract_data_from_input ' https://gitlab.com/eankeen/proj'
3333
3434assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
3535assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -38,7 +38,7 @@ load 'util/init.sh'
3838}
3939
4040@test " parses with full http url with .git ending" {
41- util.construct_clone_url ' http://gitlab.com/eankeen/proj.git'
41+ util.extract_data_from_input ' http://gitlab.com/eankeen/proj.git'
4242
4343assert [ " $REPLY1 " = ' http://gitlab.com/eankeen/proj.git' ]
4444assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -47,7 +47,7 @@ load 'util/init.sh'
4747}
4848
4949@test " parses with full ssh url" {
50- util.construct_clone_url ' git@gitlab.com:eankeen/proj.git'
50+ util.extract_data_from_input ' git@gitlab.com:eankeen/proj.git'
5151
5252assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
5353assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -56,7 +56,7 @@ load 'util/init.sh'
5656}
5757
5858@test " parses with package and domain" {
59- util.construct_clone_url ' gitlab.com/eankeen/proj'
59+ util.extract_data_from_input ' gitlab.com/eankeen/proj'
6060
6161assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
6262assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -65,7 +65,7 @@ load 'util/init.sh'
6565}
6666
6767@test " parses with package and domain and ref" {
68- util.construct_clone_url ' gitlab.com/eankeen/proj@v0.1.0'
68+ util.extract_data_from_input ' gitlab.com/eankeen/proj@v0.1.0'
6969
7070assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
7171assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -74,7 +74,7 @@ load 'util/init.sh'
7474}
7575
7676@test " parses with package and domain with ssh" {
77- util.construct_clone_url ' gitlab.com/eankeen/proj' ' yes'
77+ util.extract_data_from_input ' gitlab.com/eankeen/proj' ' yes'
7878
7979assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
8080assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -83,7 +83,7 @@ load 'util/init.sh'
8383}
8484
8585@test " parses with package and domain and ref with ssh" {
86- util.construct_clone_url ' gitlab.com/eankeen/proj@v0.1.0' ' yes'
86+ util.extract_data_from_input ' gitlab.com/eankeen/proj@v0.1.0' ' yes'
8787
8888assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
8989assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -92,7 +92,7 @@ load 'util/init.sh'
9292}
9393
9494@test " parses with package" {
95- util.construct_clone_url ' eankeen/proj'
95+ util.extract_data_from_input ' eankeen/proj'
9696
9797assert [ " $REPLY1 " = ' https://github.com/eankeen/proj.git' ]
9898assert [ " $REPLY2 " = ' github.com' ]
@@ -101,7 +101,7 @@ load 'util/init.sh'
101101}
102102
103103@test " parses with package and ref" {
104- util.construct_clone_url ' eankeen/proj@v0.2.0'
104+ util.extract_data_from_input ' eankeen/proj@v0.2.0'
105105
106106assert [ " $REPLY1 " = ' https://github.com/eankeen/proj.git' ]
107107assert [ " $REPLY2 " = ' github.com' ]
@@ -110,7 +110,7 @@ load 'util/init.sh'
110110}
111111
112112@test " parses with package with ssh" {
113- util.construct_clone_url ' eankeen/proj' ' yes'
113+ util.extract_data_from_input ' eankeen/proj' ' yes'
114114
115115assert [ " $REPLY1 " = ' git@github.com:eankeen/proj' ]
116116assert [ " $REPLY2 " = ' github.com' ]
@@ -119,7 +119,7 @@ load 'util/init.sh'
119119}
120120
121121@test " parses with package with ssh and ref" {
122- util.construct_clone_url ' eankeen/proj@v0.2.0' ' yes'
122+ util.extract_data_from_input ' eankeen/proj@v0.2.0' ' yes'
123123
124124assert [ " $REPLY1 " = ' git@github.com:eankeen/proj' ]
125125assert [ " $REPLY2 " = ' github.com' ]
0 commit comments