File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2323# provides a portable means of printing to an array variable while avoiding the
2424# use of `eval`.
2525#
26- # NOTE: By default, this function relies on the ASCII Record Separator character
26+ # NOTE: By default, this function relies on the ASCII Unit Separator character
2727# ($'\x1f') to delimit generated strings before splitting them into the result
2828# array. If you have strings containing this character, you can set a new
2929# delimiter via `_GO_ARRAY_PRINTF_DELIMITER`.
Original file line number Diff line number Diff line change @@ -35,6 +35,13 @@ teardown() {
3535 assert_failure " $expected "
3636}
3737
38+ @test " $SUITE : produce an error if the script dir isn't a directory" {
39+ rm -rf " $TEST_GO_SCRIPTS_DIR "
40+ printf ' ' > " $TEST_GO_SCRIPTS_DIR "
41+ run " $TEST_GO_SCRIPT "
42+ assert_failure " ERROR: $TEST_GO_SCRIPTS_DIR is not a directory"
43+ }
44+
3845@test " $SUITE : produce an error if the script dir can't be read or accessed" {
3946 skip_if_cannot_trigger_file_permission_failure
4047
Original file line number Diff line number Diff line change @@ -26,3 +26,10 @@ teardown() {
2626 [ -e " $_GO_CORE_DIR /lib/log" ]
2727 assert_success ' Hello, World!'
2828}
29+
30+
31+ @test " $SUITE : create_core_module_stub aborts if module unknown" {
32+ [ ! -e " $_GO_CORE_DIR /lib/foobar" ]
33+ run create_core_module_stub ' foobar' ' echo Hello, World!'
34+ assert_failure " No such core module: $_GO_CORE_DIR /lib/foobar"
35+ }
You can’t perform that action at this time.
0 commit comments