-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use openai compatible environment variables for configuration and all…
…ow configuration using more specific variables that do not interfere with the openai defaults Signed-off-by: Mathias Burger <[email protected]>
- Loading branch information
1 parent
652cbe3
commit 61a0425
Showing
4 changed files
with
112 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bats | ||
|
||
load $BATS_TEST_DIRNAME/../please.sh | ||
|
||
@test "join elements with a comma" { | ||
result=$(join_by ',' 'a' 'b' 'c') | ||
[ "$result" == "a,b,c" ] | ||
} | ||
|
||
@test "join elements with a semicolon" { | ||
result=$(join_by ';' '1' '2' '3') | ||
[ "$result" == "1;2;3" ] | ||
} | ||
|
||
@test "join with a space as delimiter" { | ||
result=$(join_by ' ' 'x' 'y' 'z') | ||
[ "$result" == "x y z" ] | ||
} | ||
|
||
@test "join with an empty delimiter" { | ||
result=$(join_by '' '1' '2' '3') | ||
[ "$result" == "123" ] | ||
} | ||
|
||
@test "no delimiter provided should return the first element" { | ||
result=$(join_by '' 'single') | ||
[ "$result" == "single" ] | ||
} | ||
|
||
@test "join using array with no elements" { | ||
qaMessages=() | ||
|
||
result=$(join_by , "${qaMessages[@]}") | ||
[ "$result" == "" ] | ||
} | ||
|
||
@test "join using array with one element" { | ||
qaMessages=("a") | ||
|
||
result=$(join_by , "${qaMessages[@]}") | ||
[ "$result" == "a" ] | ||
} | ||
|
||
@test "join using array with two elements" { | ||
qaMessages=("a" "b") | ||
|
||
result=$(join_by , "${qaMessages[@]}") | ||
[ "$result" == "a,b" ] | ||
} |