Commit 2ad6c9e 1 parent 6b06012 commit 2ad6c9e Copy full SHA for 2ad6c9e
File tree 5 files changed +26
-20
lines changed
5 files changed +26
-20
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
1
3
if type " $1 " > /dev/null 2>&1 ; then
2
4
exit 0
3
5
else
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
1
3
if [[ " $OSTYPE " =~ ^darwin ]]; then
2
4
exit 0
3
5
else
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
1
3
if [ $# -eq 1 ]; then
2
4
if eval " $1 " > /dev/null 2>&1 ; then
3
5
exit 0
Original file line number Diff line number Diff line change 11
11
[ " $ACTUAL " = " $EXPECTED " ]
12
12
}
13
13
14
+ @test " is-executable" {
15
+ run is-executable ls
16
+ [ " $status " -eq 0 ]
17
+ }
18
+
19
+ @test " is-executable (false)" {
20
+ run is-executable nonexistent
21
+ [ " $status " -eq 1 ]
22
+ }
23
+
24
+ @test " is-supported" {
25
+ run is-supported ls -a
26
+ [ " $status " -eq 0 ]
27
+ }
28
+
29
+ @test " is-supported (false)" {
30
+ run is-supported " ls --nonexistent"
31
+ [ " $status " -eq 1 ]
32
+ }
33
+
14
34
@test " set-config" {
15
35
run set-config KEY_A VALUE_1 MYFILE
16
36
run set-config KEY_B VALUE_2 MYFILE
Original file line number Diff line number Diff line change @@ -12,26 +12,6 @@ FIXTURE_TEXT="foo"
12
12
[ " $ACTUAL " = " $EXPECTED " ]
13
13
}
14
14
15
- @test " is-executable" {
16
- run is-executable ls
17
- [ " $status " -eq 0 ]
18
- }
19
-
20
- @test " is-executable (false)" {
21
- run is-executable nonexistent
22
- [ " $status " -eq 1 ]
23
- }
24
-
25
- @test " is-supported" {
26
- run is-supported ls -a
27
- [ " $status " -eq 0 ]
28
- }
29
-
30
- @test " is-supported (false)" {
31
- run is-supported " ls --nonexistent"
32
- [ " $status " -eq 1 ]
33
- }
34
-
35
15
@test " calc" {
36
16
ACTUAL=" $( calc 1+2) "
37
17
EXPECTED=3
You can’t perform that action at this time.
0 commit comments