-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy patharray_include.bats
More file actions
52 lines (44 loc) · 957 Bytes
/
Copy patharray_include.bats
File metadata and controls
52 lines (44 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bats
setup_fixture
@test "l.array_include (he ll o world) hello" {
local arr=(he ll o world)
run l.array_include arr "hello"
assert_failure
assert_output ''
}
@test "l.array_include (he ll o world) ll" {
local arr=(he ll o world)
run l.array_include arr "ll"
assert_success
assert_output ''
}
@test "l.array_include (he ll o world) ok" {
local arr=(he ll o world)
run l.array_include arr "ok"
assert_failure
assert_output ''
}
@test "l.array_include ('' ' ') ''" {
local arr=('' ' ')
run l.array_include arr ''
assert_success
assert_output ''
}
@test "l.array_include ('' ' ') ' '" {
local arr=('' ' ')
run l.array_include arr ''
assert_success
assert_output ''
}
@test "l.array_include () ' '" {
local arr=()
run l.array_include arr ' '
assert_failure
assert_output ''
}
@test "l.array_include () ''" {
local arr=()
run l.array_include arr ''
assert_failure
assert_output ''
}