Skip to content

Commit 821bc43

Browse files
committed
Unify the assertions look for all tests
For consistency, now all tests follow the following: 1. all assertions are in double square quotes like [[ .... ]] 2. left part of the assertions is described without quotes 3. all variables are in ${...} format
1 parent 940d3d1 commit 821bc43

13 files changed

+188
-184
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,17 @@ Also, there are several optional addons which can be useful in some circumstance
135135
5. Do not fake `git-elegant` commands within the tests.
136136

137137
#### Assertions
138-
- `[[ "${lines[0]}" = "+ the space " ]]` for an output line (index starts from 0)
139-
- `[[ "$status" -eq 2 ]]` for a command status
140-
- `[[ "${#lines[@]}" -eq 0 ]]` for a length of command output
141-
- `[[ "${lines[@]}" =~ "exact string" ]]` for an output line within whole output
138+
- `[[ ${status} -eq 2 ]]` for a command status
139+
- `[[ ${#lines[@]} -eq 0 ]]` for a length of command output
140+
- `[[ ${lines[0]} = "+ the space " ]]` for an output line (index starts from 0)
141+
- `[[ ${lines[@]} =~ "exact string" ]]` for an output line within whole output
142142

143143
#### Test name template
144-
Use the following test name template - `'<command args>': <describe what will be tested>` like
145-
`'clone-repository': raise an error if cloneable URL isn't set`.
144+
Use the following test name template - `'<command>': <describes the behavior that will be tested>`
145+
like `'clone-repository': stops with exit code 45 if cloneable URL is not set`.
146+
147+
The behavior should be descriptive-style (`stops with exit code 45 if cloneable URL is not set`)
148+
rather than imperative-style (`stop with exit code 45 if cloneable URL is not set`).
146149

147150
### Updating documentation
148151
In order to get the documentation preview locally, please install required dependencies with

tests/git-elegant-acquire-git.bats

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,73 +18,73 @@ teardown() {
1818

1919
@test "'acquire-git': all configurations work as expected" {
2020
check git-elegant acquire-git
21-
[[ "${status}" -eq 0 ]]
21+
[[ ${status} -eq 0 ]]
2222
}
2323

2424
@test "'acquire-git': basics are configured as expected" {
2525
check git-elegant acquire-git
26-
[[ "${lines[@]}" =~ "Please hit enter if you wish {default value}." ]]
27-
[[ "${lines[@]}" =~ "What is your user name? {Elegant Git}: " ]]
28-
[[ "${lines[@]}" =~ "==>> git config --global user.name Elegant Git" ]]
29-
[[ "${lines[@]}" =~ "What is your user email? {[email protected]}: " ]]
30-
[[ "${lines[@]}" =~ "==>> git config --global user.email [email protected]" ]]
31-
[[ "${lines[@]}" =~ "Please specify a command to start the editor. {vi}: " ]]
32-
[[ "${lines[@]}" =~ "==>> git config --global core.editor vi" ]]
26+
[[ ${lines[@]} =~ "Please hit enter if you wish {default value}." ]]
27+
[[ ${lines[@]} =~ "What is your user name? {Elegant Git}: " ]]
28+
[[ ${lines[@]} =~ "==>> git config --global user.name Elegant Git" ]]
29+
[[ ${lines[@]} =~ "What is your user email? {[email protected]}: " ]]
30+
[[ ${lines[@]} =~ "==>> git config --global user.email [email protected]" ]]
31+
[[ ${lines[@]} =~ "Please specify a command to start the editor. {vi}: " ]]
32+
[[ ${lines[@]} =~ "==>> git config --global core.editor vi" ]]
3333
}
3434

3535
@test "'acquire-git': standards are configured as expected on Windows" {
3636
fake-pass "uname -s" Windows
3737
check git-elegant acquire-git
38-
[[ "${lines[@]}" =~ "==>> git config --global core.commentChar |" ]]
39-
[[ "${lines[@]}" =~ "==>> git config --global apply.whitespace fix" ]]
40-
[[ "${lines[@]}" =~ "==>> git config --global fetch.prune true" ]]
41-
[[ "${lines[@]}" =~ "==>> git config --global fetch.pruneTags false" ]]
42-
[[ "${lines[@]}" =~ "==>> git config --global core.autocrlf true" ]]
43-
[[ "${lines[@]}" =~ "==>> git config --global pull.rebase true" ]]
44-
[[ "${lines[@]}" =~ "==>> git config --global rebase.autoStash false" ]]
45-
[[ "${lines[@]}" =~ "==>> git config --global elegant.acquired true" ]]
38+
[[ ${lines[@]} =~ "==>> git config --global core.commentChar |" ]]
39+
[[ ${lines[@]} =~ "==>> git config --global apply.whitespace fix" ]]
40+
[[ ${lines[@]} =~ "==>> git config --global fetch.prune true" ]]
41+
[[ ${lines[@]} =~ "==>> git config --global fetch.pruneTags false" ]]
42+
[[ ${lines[@]} =~ "==>> git config --global core.autocrlf true" ]]
43+
[[ ${lines[@]} =~ "==>> git config --global pull.rebase true" ]]
44+
[[ ${lines[@]} =~ "==>> git config --global rebase.autoStash false" ]]
45+
[[ ${lines[@]} =~ "==>> git config --global elegant.acquired true" ]]
4646
# negative checks are used instead of checking commands size
47-
[[ ! "${lines[@]}" =~ "==>> git config --global credential.helper osxkeychain" ]]
48-
[[ ! "${lines[@]}" =~ "==>> git config --global core.autocrlf input" ]]
47+
[[ ! ${lines[@]} =~ "==>> git config --global credential.helper osxkeychain" ]]
48+
[[ ! ${lines[@]} =~ "==>> git config --global core.autocrlf input" ]]
4949
}
5050

5151
@test "'acquire-git': standards are configured as expected on Linux" {
5252
fake-pass "uname -s" Linux
5353
check git-elegant acquire-git
54-
[[ "${lines[@]}" =~ "==>> git config --global core.commentChar |" ]]
55-
[[ "${lines[@]}" =~ "==>> git config --global apply.whitespace fix" ]]
56-
[[ "${lines[@]}" =~ "==>> git config --global fetch.prune true" ]]
57-
[[ "${lines[@]}" =~ "==>> git config --global fetch.pruneTags false" ]]
58-
[[ "${lines[@]}" =~ "==>> git config --global core.autocrlf input" ]]
59-
[[ "${lines[@]}" =~ "==>> git config --global pull.rebase true" ]]
60-
[[ "${lines[@]}" =~ "==>> git config --global rebase.autoStash false" ]]
61-
[[ "${lines[@]}" =~ "==>> git config --global elegant.acquired true" ]]
54+
[[ ${lines[@]} =~ "==>> git config --global core.commentChar |" ]]
55+
[[ ${lines[@]} =~ "==>> git config --global apply.whitespace fix" ]]
56+
[[ ${lines[@]} =~ "==>> git config --global fetch.prune true" ]]
57+
[[ ${lines[@]} =~ "==>> git config --global fetch.pruneTags false" ]]
58+
[[ ${lines[@]} =~ "==>> git config --global core.autocrlf input" ]]
59+
[[ ${lines[@]} =~ "==>> git config --global pull.rebase true" ]]
60+
[[ ${lines[@]} =~ "==>> git config --global rebase.autoStash false" ]]
61+
[[ ${lines[@]} =~ "==>> git config --global elegant.acquired true" ]]
6262
# negative checks are used instead of checking commands size
63-
[[ ! "${lines[@]}" =~ "==>> git config --global credential.helper osxkeychain" ]]
64-
[[ ! "${lines[@]}" =~ "==>> git config --global core.autocrlf true" ]]
63+
[[ ! ${lines[@]} =~ "==>> git config --global credential.helper osxkeychain" ]]
64+
[[ ! ${lines[@]} =~ "==>> git config --global core.autocrlf true" ]]
6565
}
6666

6767
@test "'acquire-git': standards are configured as expected on Darwin" {
6868
fake-pass "uname -s" Darwin
6969
check git-elegant acquire-git
70-
[[ "${lines[@]}" =~ "==>> git config --global core.commentChar |" ]]
71-
[[ "${lines[@]}" =~ "==>> git config --global apply.whitespace fix" ]]
72-
[[ "${lines[@]}" =~ "==>> git config --global fetch.prune true" ]]
73-
[[ "${lines[@]}" =~ "==>> git config --global fetch.pruneTags false" ]]
74-
[[ "${lines[@]}" =~ "==>> git config --global core.autocrlf input" ]]
75-
[[ "${lines[@]}" =~ "==>> git config --global pull.rebase true" ]]
76-
[[ "${lines[@]}" =~ "==>> git config --global rebase.autoStash false" ]]
77-
[[ "${lines[@]}" =~ "==>> git config --global credential.helper osxkeychain" ]]
78-
[[ "${lines[@]}" =~ "==>> git config --global elegant.acquired true" ]]
70+
[[ ${lines[@]} =~ "==>> git config --global core.commentChar |" ]]
71+
[[ ${lines[@]} =~ "==>> git config --global apply.whitespace fix" ]]
72+
[[ ${lines[@]} =~ "==>> git config --global fetch.prune true" ]]
73+
[[ ${lines[@]} =~ "==>> git config --global fetch.pruneTags false" ]]
74+
[[ ${lines[@]} =~ "==>> git config --global core.autocrlf input" ]]
75+
[[ ${lines[@]} =~ "==>> git config --global pull.rebase true" ]]
76+
[[ ${lines[@]} =~ "==>> git config --global rebase.autoStash false" ]]
77+
[[ ${lines[@]} =~ "==>> git config --global credential.helper osxkeychain" ]]
78+
[[ ${lines[@]} =~ "==>> git config --global elegant.acquired true" ]]
7979
# negative checks are used instead of checking commands size
80-
[[ ! "${lines[@]}" =~ "==>> git config --global core.autocrlf true" ]]
80+
[[ ! ${lines[@]} =~ "==>> git config --global core.autocrlf true" ]]
8181
}
8282

8383
@test "'acquire-git': new aliases are configured as expected" {
8484
check git-elegant acquire-git
8585
for next in $(git-elegant show-commands); do
8686
echo "Test aliasing of '${next}' command"
87-
[[ "${lines[@]}" =~ "==>> git config --global alias.${next} elegant ${next}" ]]
87+
[[ ${lines[@]} =~ "==>> git config --global alias.${next} elegant ${next}" ]]
8888
echo "Tested successfully!"
8989
done
9090
}
@@ -93,26 +93,26 @@ teardown() {
9393
repo git config --global "alias.aaa" "\"elegant aaa\""
9494
repo git config --global "alias.bbb" "\"elegant bbb\""
9595
check git-elegant acquire-git
96-
[[ "$status" -eq 0 ]]
97-
[[ "${lines[@]}" =~ "2 Elegant Git aliases were removed." ]]
96+
[[ ${status} -eq 0 ]]
97+
[[ ${lines[@]} =~ "2 Elegant Git aliases were removed." ]]
9898
}
9999

100100
@test "'acquire-git': a message is displayed if global configuration is disabled" {
101101
read-clean
102102
read-answer "n"
103103
check git-elegant acquire-git
104-
[[ "$status" -eq 0 ]]
105-
[[ "${lines[@]}" =~ "You've decided to stay with local configurations. Great!" ]]
104+
[[ ${status} -eq 0 ]]
105+
[[ ${lines[@]} =~ "You've decided to stay with local configurations. Great!" ]]
106106
}
107107

108108
@test "'acquire-git': the basics are not changed if they are already configured" {
109109
repo git config --global user.name aaaa
110110
repo git config --global user.email aaaa
111111
repo git config --global core.editor aaaa
112112
check git-elegant acquire-git
113-
[[ "$status" -eq 0 ]]
114-
[[ "${lines[@]}" =~ "==>> git config --global user.name aaaa" ]]
115-
[[ "${lines[@]}" =~ "==>> git config --global user.email aaaa" ]]
116-
[[ "${lines[@]}" =~ "==>> git config --global core.editor aaaa" ]]
117-
[[ ! "${lines[@]}" =~ "Please hit enter if you wish {default value}." ]]
113+
[[ ${status} -eq 0 ]]
114+
[[ ${lines[@]} =~ "==>> git config --global user.name aaaa" ]]
115+
[[ ${lines[@]} =~ "==>> git config --global user.email aaaa" ]]
116+
[[ ${lines[@]} =~ "==>> git config --global core.editor aaaa" ]]
117+
[[ ! ${lines[@]} =~ "Please hit enter if you wish {default value}." ]]
118118
}

tests/git-elegant-acquire-repository.bats

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,69 @@ teardown() {
1818

1919
@test "'acquire-repository': all configurations work as expected" {
2020
check git-elegant acquire-repository
21-
[[ "${status}" -eq 0 ]]
21+
[[ ${status} -eq 0 ]]
2222
}
2323

2424
@test "'acquire-repository': basics are configured as expected" {
2525
check git-elegant acquire-repository
26-
[[ "${lines[@]}" =~ "What is your user name? {Elegant Git}: " ]]
27-
[[ "${lines[@]}" =~ "==>> git config --local user.name Elegant Git" ]]
28-
[[ "${lines[@]}" =~ "What is your user email? {[email protected]}: " ]]
29-
[[ "${lines[@]}" =~ "==>> git config --local user.email [email protected]" ]]
30-
[[ "${lines[@]}" =~ "Please specify a command to start the editor. {vi}: " ]]
31-
[[ "${lines[@]}" =~ "==>> git config --local core.editor vi" ]]
26+
[[ ${lines[@]} =~ "What is your user name? {Elegant Git}: " ]]
27+
[[ ${lines[@]} =~ "==>> git config --local user.name Elegant Git" ]]
28+
[[ ${lines[@]} =~ "What is your user email? {[email protected]}: " ]]
29+
[[ ${lines[@]} =~ "==>> git config --local user.email [email protected]" ]]
30+
[[ ${lines[@]} =~ "Please specify a command to start the editor. {vi}: " ]]
31+
[[ ${lines[@]} =~ "==>> git config --local core.editor vi" ]]
3232
}
3333

3434
@test "'acquire-repository': standards are configured as expected on Windows" {
3535
fake-pass "uname -s" Windows
3636
check git-elegant acquire-repository
37-
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
38-
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
39-
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
40-
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
41-
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf true" ]]
42-
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
43-
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
37+
[[ ${lines[@]} =~ "==>> git config --local core.commentChar |" ]]
38+
[[ ${lines[@]} =~ "==>> git config --local apply.whitespace fix" ]]
39+
[[ ${lines[@]} =~ "==>> git config --local fetch.prune true" ]]
40+
[[ ${lines[@]} =~ "==>> git config --local fetch.pruneTags false" ]]
41+
[[ ${lines[@]} =~ "==>> git config --local core.autocrlf true" ]]
42+
[[ ${lines[@]} =~ "==>> git config --local pull.rebase true" ]]
43+
[[ ${lines[@]} =~ "==>> git config --local rebase.autoStash false" ]]
4444
# negative checks are used instead of checking commands size
45-
[[ ! "${lines[@]}" =~ "==>> git config --local credential.helper osxkeychain" ]]
46-
[[ ! "${lines[@]}" =~ "==>> git config --local core.autocrlf input" ]]
45+
[[ ! ${lines[@]} =~ "==>> git config --local credential.helper osxkeychain" ]]
46+
[[ ! ${lines[@]} =~ "==>> git config --local core.autocrlf input" ]]
4747
}
4848

4949
@test "'acquire-repository': standards are configured as expected on Linux" {
5050
fake-pass "uname -s" Linux
5151
check git-elegant acquire-repository
52-
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
53-
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
54-
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
55-
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
56-
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf input" ]]
57-
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
58-
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
52+
[[ ${lines[@]} =~ "==>> git config --local core.commentChar |" ]]
53+
[[ ${lines[@]} =~ "==>> git config --local apply.whitespace fix" ]]
54+
[[ ${lines[@]} =~ "==>> git config --local fetch.prune true" ]]
55+
[[ ${lines[@]} =~ "==>> git config --local fetch.pruneTags false" ]]
56+
[[ ${lines[@]} =~ "==>> git config --local core.autocrlf input" ]]
57+
[[ ${lines[@]} =~ "==>> git config --local pull.rebase true" ]]
58+
[[ ${lines[@]} =~ "==>> git config --local rebase.autoStash false" ]]
5959
# negative checks are used instead of checking commands size
60-
[[ ! "${lines[@]}" =~ "==>> git config --local credential.helper osxkeychain" ]]
61-
[[ ! "${lines[@]}" =~ "==>> git config --local core.autocrlf true" ]]
60+
[[ ! ${lines[@]} =~ "==>> git config --local credential.helper osxkeychain" ]]
61+
[[ ! ${lines[@]} =~ "==>> git config --local core.autocrlf true" ]]
6262
}
6363

6464
@test "'acquire-repository': standards are configured as expected on Darwin" {
6565
fake-pass "uname -s" Darwin
6666
check git-elegant acquire-repository
67-
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
68-
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
69-
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
70-
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
71-
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf input" ]]
72-
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
73-
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
74-
[[ "${lines[@]}" =~ "==>> git config --local credential.helper osxkeychain" ]]
67+
[[ ${lines[@]} =~ "==>> git config --local core.commentChar |" ]]
68+
[[ ${lines[@]} =~ "==>> git config --local apply.whitespace fix" ]]
69+
[[ ${lines[@]} =~ "==>> git config --local fetch.prune true" ]]
70+
[[ ${lines[@]} =~ "==>> git config --local fetch.pruneTags false" ]]
71+
[[ ${lines[@]} =~ "==>> git config --local core.autocrlf input" ]]
72+
[[ ${lines[@]} =~ "==>> git config --local pull.rebase true" ]]
73+
[[ ${lines[@]} =~ "==>> git config --local rebase.autoStash false" ]]
74+
[[ ${lines[@]} =~ "==>> git config --local credential.helper osxkeychain" ]]
7575
# negative checks are used instead of checking commands size
76-
[[ ! "${lines[@]}" =~ "==>> git config --local core.autocrlf true" ]]
76+
[[ ! ${lines[@]} =~ "==>> git config --local core.autocrlf true" ]]
7777
}
7878

7979
@test "'acquire-repository': new aliases are configured as expected" {
8080
check git-elegant acquire-repository
8181
for next in $(git-elegant show-commands); do
8282
echo "Test aliasing of '${next}' command"
83-
[[ "${lines[@]}" =~ "==>> git config --local alias.${next} elegant ${next}" ]]
83+
[[ ${lines[@]} =~ "==>> git config --local alias.${next} elegant ${next}" ]]
8484
echo "Tested successfully!"
8585
done
8686
}
@@ -89,8 +89,8 @@ teardown() {
8989
repo git config --local "alias.aaa" "\"elegant aaa\""
9090
repo git config --local "alias.bbb" "\"elegant bbb\""
9191
check git-elegant acquire-repository
92-
[[ "$status" -eq 0 ]]
93-
[[ "${lines[@]}" =~ "2 Elegant Git aliases were removed." ]]
92+
[[ ${status} -eq 0 ]]
93+
[[ ${lines[@]} =~ "2 Elegant Git aliases were removed." ]]
9494
}
9595

9696
@test "'acquire-repository': 'elegant.acquired' affects configuration correctly" {
@@ -99,15 +99,15 @@ teardown() {
9999
repo git config --global "alias.bbb" "\"elegant bbb\""
100100
repo git config --global "elegant.acquired" "true"
101101
check git-elegant acquire-repository
102-
[[ "${lines[@]}" =~ "What is your user name? {Elegant Git}: " ]]
103-
[[ "${lines[@]}" =~ "==>> git config --local user.name Elegant Git" ]]
104-
[[ "${lines[@]}" =~ "What is your user email? {[email protected]}: " ]]
105-
[[ "${lines[@]}" =~ "==>> git config --local user.email [email protected]" ]]
106-
[[ ! "${lines[@]}" =~ "Please specify a command to start the editor. {vi}: " ]]
107-
[[ ! "${lines[@]}" =~ "==>> git config --local core.editor vi" ]]
108-
[[ ! "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
109-
[[ "${lines[@]}" =~ "1 Elegant Git aliases were removed." ]]
110-
[[ ! "${lines[@]}" =~ "==>> git config --local alias.acquire-repository elegant acquire-repository" ]]
102+
[[ ${lines[@]} =~ "What is your user name? {Elegant Git}: " ]]
103+
[[ ${lines[@]} =~ "==>> git config --local user.name Elegant Git" ]]
104+
[[ ${lines[@]} =~ "What is your user email? {[email protected]}: " ]]
105+
[[ ${lines[@]} =~ "==>> git config --local user.email [email protected]" ]]
106+
[[ ! ${lines[@]} =~ "Please specify a command to start the editor. {vi}: " ]]
107+
[[ ! ${lines[@]} =~ "==>> git config --local core.editor vi" ]]
108+
[[ ! ${lines[@]} =~ "==>> git config --local core.commentChar |" ]]
109+
[[ ${lines[@]} =~ "1 Elegant Git aliases were removed." ]]
110+
[[ ! ${lines[@]} =~ "==>> git config --local alias.acquire-repository elegant acquire-repository" ]]
111111
}
112112

113113
@test "'acquire-repository': configures a signature if GPG key is provided" {

tests/git-elegant-amend-work.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ teardown() {
2020
fake-pass "git commit --amend"
2121
repo git checkout -b test
2222
check git-elegant amend-work
23-
[[ "${status}" -eq 0 ]]
23+
[[ ${status} -eq 0 ]]
2424
}
2525

2626
@test "'amend-work': exit code is 42 when current local branch is master" {
2727
check git-elegant amend-work
28-
[[ "${status}" -eq 42 ]]
29-
[[ "${lines[@]}" =~ "== No commits to 'master' branch. Please read more on https://elegant-git.bees-hive.org ==" ]]
30-
[[ "${lines[@]}" =~ "== Try 'git elegant start-work' prior to retrying this command. ==" ]]
28+
[[ ${status} -eq 42 ]]
29+
[[ ${lines[@]} =~ "== No commits to 'master' branch. Please read more on https://elegant-git.bees-hive.org ==" ]]
30+
[[ ${lines[@]} =~ "== Try 'git elegant start-work' prior to retrying this command. ==" ]]
3131
}

tests/git-elegant-clone-repository.bats

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ teardown() {
1616
fake-clean
1717
}
1818

19-
@test "'clone-repository': raise an error if cloneable URL isn't set" {
20-
check git-elegant clone-repository
21-
[[ "${lines[0]}" =~ "Cloneable URL is not set" ]]
19+
@test "'clone-repository': stops with exit code 45 if cloneable URL is not set" {
20+
check git-elegant clone-repository
21+
[[ ${status} -eq 45 ]]
22+
[[ ${lines[0]} =~ "Cloneable URL is not set" ]]
2223
}
2324

2425
@test "'clone-repository': clone the repo" {
25-
check git-elegant clone-repository https://github.com/extsoft/elegant-git.git
26-
[ "$status" -eq 0 ]
26+
check git-elegant clone-repository https://github.com/extsoft/elegant-git.git
27+
[[ ${status} -eq 0 ]]
2728
}

0 commit comments

Comments
 (0)