Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/format
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# provides a portable means of printing to an array variable while avoiding the
# use of `eval`.
#
# NOTE: By default, this function relies on the ASCII Record Separator character
# NOTE: By default, this function relies on the ASCII Unit Separator character
# ($'\x1f') to delimit generated strings before splitting them into the result
# array. If you have strings containing this character, you can set a new
# delimiter via `_GO_ARRAY_PRINTF_DELIMITER`.
Expand Down
7 changes: 7 additions & 0 deletions tests/core/set-scripts-dir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ teardown() {
assert_failure "$expected"
}

@test "$SUITE: produce an error if the script dir isn't a directory" {
rm -rf "$TEST_GO_SCRIPTS_DIR"
printf '' >"$TEST_GO_SCRIPTS_DIR"
run "$TEST_GO_SCRIPT"
assert_failure "ERROR: $TEST_GO_SCRIPTS_DIR is not a directory"
}

@test "$SUITE: produce an error if the script dir can't be read or accessed" {
skip_if_cannot_trigger_file_permission_failure

Expand Down
7 changes: 7 additions & 0 deletions tests/testing/stubbing.bats
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ teardown() {
[ -e "$_GO_CORE_DIR/lib/log" ]
assert_success 'Hello, World!'
}


@test "$SUITE: create_core_module_stub aborts if module unknown" {
[ ! -e "$_GO_CORE_DIR/lib/foobar" ]
run create_core_module_stub 'foobar' 'echo Hello, World!'
assert_failure "No such core module: $_GO_CORE_DIR/lib/foobar"
}