Cnofirm directories exist before adding to PATH

This commit is contained in:
Nathaniel Landau
2021-09-06 10:36:55 -04:00
parent 832c0ca24e
commit e8e9d51f9d
2 changed files with 9 additions and 6 deletions

View File

@@ -237,10 +237,11 @@ _testSeekConfirmation_() {
_testSetPATH_() {
@test "_setPATH_" {
_setPATH_ "/testing/from/bats" "/testing/again"
run echo "$PATH"
mkdir -p "${TESTDIR}/testing/from/bats"
_setPATH_ "${TESTDIR}/testing/from/bats" "${TESTDIR}/testing/again"
run echo "${PATH}"
assert_output --regexp "/testing/from/bats"
assert_output --regexp "/testing/again"
refute_output --regexp "/testing/again"
}
}