feature: add connect command

This commit is contained in:
2025-07-18 08:26:49 -07:00
parent f290de739b
commit c07e3ff37d
2 changed files with 23 additions and 11 deletions

View File

@@ -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