aboutsummaryrefslogtreecommitdiffstats
path: root/tests/foundational.bats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/foundational.bats')
-rw-r--r--tests/foundational.bats10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/foundational.bats b/tests/foundational.bats
index c2768c2..29b8881 100644
--- a/tests/foundational.bats
+++ b/tests/foundational.bats
@@ -11,22 +11,20 @@ log_debug() {
}
@test "split line" {
- line_arr=("$(split_line "GETINFO version")")
+ line_arr=($(split_line "GETINFO version"))
[ "${line_arr[0]}" = "version" ]
}
@test "split line rmfirst" {
- line_arr=("$(split_line "GETINFO version" 0)")
+ line_arr=($(split_line "GETINFO version" 0))
[ "${line_arr[0]}" = "version" ]
}
@test "split line no-rmfirst" {
- skip "Not yet"
- IFS=" " line_arr=("$(split_line "GETINFO version" 1)")
+ IFS=" " line_arr=($(split_line "GETINFO version" 1))
[[ "$(declare -p line_arr)" == 'declare -'[aA]* ]]
- log_debug "$(declare -p line_arr)"
[[ "${line_arr[0]}" == "GETINFO" ]]
- [[ ${#line_arr} -eq 2 ]]
+ [[ ${#line_arr[@]} -eq 2 ]]
[[ "${line_arr[1]}" == "version" ]]
}