feature: add connect command
This commit is contained in:
18
mc-test.sh
18
mc-test.sh
@@ -13,6 +13,12 @@ function assert() {
|
||||
return 1
|
||||
}
|
||||
|
||||
function test_assert() {
|
||||
local string="one two three four"
|
||||
assert "$(rest ${string})" "$(rest ${string})"
|
||||
}
|
||||
test_assert
|
||||
|
||||
function first_func_returns_first_item() {
|
||||
local string="one two three four"
|
||||
assert "$(first ${string})" "one"
|
||||
@@ -38,15 +44,7 @@ function rest_func_returns_rest_items_from_array() {
|
||||
rest_func_returns_rest_items_from_array
|
||||
|
||||
function rest_func_returns_rest_items_from_array_w_spaces() {
|
||||
local a=(two "three four")
|
||||
local b=("three four")
|
||||
assert "$(rest "${a[@]}")" "three four"
|
||||
local a=(one two "three four")
|
||||
assert "$(rest ${a[@]})" "two three four"
|
||||
}
|
||||
rest_func_returns_rest_items_from_array_w_spaces
|
||||
|
||||
function rest_func_returns_rest_items_from_array_item_w_spaces_removed() {
|
||||
local a=("two three" four)
|
||||
assert "$(rest "${a[@]}")" "four"
|
||||
}
|
||||
rest_func_returns_rest_items_from_array_item_w_spaces_removed
|
||||
|
||||
|
Reference in New Issue
Block a user