-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
end_with.s.bats
69 lines (57 loc) · 1.29 KB
/
end_with.s.bats
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bats
setup_fixture
@test "l.end_with.s hello o" {
run l.end_with.s "hello" "o"
assert_success
assert_output true
}
@test "l.end_with.s hello oo" {
run l.end_with.s "hello" "oo"
assert_success
assert_output false
}
@test "l.end_with.s hello hello" {
run l.end_with.s "hello" "hello"
assert_success
assert_output true
}
@test "l.end_with.s file.bash .bash" {
run l.end_with.s "file.bash" ".bash"
assert_success
assert_output true
}
@test "l.end_with.s file.bash ''" {
run l.end_with.s "file.bash" ""
assert_success
assert_output true
}
@test "l.end_with.s 'file bash' 'sh'" {
run l.end_with.s "file bash" "sh"
assert_success
assert_output true
}
@test "l.end_with.s 'file bash' ' bash '" {
run l.end_with.s "file bash" " bash "
assert_success
assert_output false
}
@test "l.end_with.s 'file bash' 'bash '" {
run l.end_with.s "file bash" "bash "
assert_success
assert_output false
}
@test "l.end_with.s 'file bash' ' bash'" {
run l.end_with.s "file bash" " bash"
assert_success
assert_output true
}
@test "l.end_with.s 'file bash' 'file'" {
run l.end_with.s "file bash" "file"
assert_success
assert_output false
}
@test "l.end_with.s 'file bash ' 'bash '" {
run l.end_with.s "file bash " " bash "
assert_success
assert_output true
}