@@ -4,14 +4,14 @@ load 'util/init.sh'
4
4
5
5
6
6
@test " fails on no arguments" {
7
- run util.construct_clone_url
7
+ run util.extract_data_from_input
8
8
9
9
assert_failure
10
10
assert_line -p " Must supply a repository"
11
11
}
12
12
13
13
@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'
15
15
16
16
assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
17
17
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -20,7 +20,7 @@ load 'util/init.sh'
20
20
}
21
21
22
22
@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'
24
24
25
25
assert [ " $REPLY1 " = ' http://gitlab.com/eankeen/proj.git' ]
26
26
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -29,7 +29,7 @@ load 'util/init.sh'
29
29
}
30
30
31
31
@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'
33
33
34
34
assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
35
35
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -38,7 +38,7 @@ load 'util/init.sh'
38
38
}
39
39
40
40
@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'
42
42
43
43
assert [ " $REPLY1 " = ' http://gitlab.com/eankeen/proj.git' ]
44
44
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -47,7 +47,7 @@ load 'util/init.sh'
47
47
}
48
48
49
49
@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'
51
51
52
52
assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
53
53
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -56,7 +56,7 @@ load 'util/init.sh'
56
56
}
57
57
58
58
@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'
60
60
61
61
assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
62
62
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -65,7 +65,7 @@ load 'util/init.sh'
65
65
}
66
66
67
67
@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'
69
69
70
70
assert [ " $REPLY1 " = ' https://gitlab.com/eankeen/proj.git' ]
71
71
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -74,7 +74,7 @@ load 'util/init.sh'
74
74
}
75
75
76
76
@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'
78
78
79
79
assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
80
80
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -83,7 +83,7 @@ load 'util/init.sh'
83
83
}
84
84
85
85
@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'
87
87
88
88
assert [ " $REPLY1 " = ' git@gitlab.com:eankeen/proj' ]
89
89
assert [ " $REPLY2 " = ' gitlab.com' ]
@@ -92,7 +92,7 @@ load 'util/init.sh'
92
92
}
93
93
94
94
@test " parses with package" {
95
- util.construct_clone_url ' eankeen/proj'
95
+ util.extract_data_from_input ' eankeen/proj'
96
96
97
97
assert [ " $REPLY1 " = ' https://github.com/eankeen/proj.git' ]
98
98
assert [ " $REPLY2 " = ' github.com' ]
@@ -101,7 +101,7 @@ load 'util/init.sh'
101
101
}
102
102
103
103
@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'
105
105
106
106
assert [ " $REPLY1 " = ' https://github.com/eankeen/proj.git' ]
107
107
assert [ " $REPLY2 " = ' github.com' ]
@@ -110,7 +110,7 @@ load 'util/init.sh'
110
110
}
111
111
112
112
@test " parses with package with ssh" {
113
- util.construct_clone_url ' eankeen/proj' ' yes'
113
+ util.extract_data_from_input ' eankeen/proj' ' yes'
114
114
115
115
assert [ " $REPLY1 " = ' git@github.com:eankeen/proj' ]
116
116
assert [ " $REPLY2 " = ' github.com' ]
@@ -119,7 +119,7 @@ load 'util/init.sh'
119
119
}
120
120
121
121
@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'
123
123
124
124
assert [ " $REPLY1 " = ' git@github.com:eankeen/proj' ]
125
125
assert [ " $REPLY2 " = ' github.com' ]
0 commit comments