Skip to content

Commit 4b58fbc

Browse files
committed
core: Add _@go.set_scripts_dir missing dir test
Been meaning to add this forever. Took all of thirty seconds.
1 parent 70f2d39 commit 4b58fbc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/core/set-scripts-dir.bats

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)