Add addl wf_root test

This commit is contained in:
Michael Wolf
2023-09-30 17:19:47 -06:00
parent c2fe100ad9
commit 4d05d3da71

View File

@@ -61,7 +61,7 @@ testNoramlizeDirOfFile001() {
assertEquals "$expected" "$out/tests/.."
}
testWfRoot() {
testWfRoot001() {
expected=$(normalize_dir_of_file "$DIR/../install.sh")
dir=$(mktemp -d --tmpdir would-reformat-testProjectRoot001.XXXXXX)
@@ -69,7 +69,17 @@ testWfRoot() {
git init >/dev/null 2>&1
"$DIR"/../install.sh 2>&2 >/dev/null
got=$(wf_root "$(pwd)")
got=$(wf_root)
assertEquals "$expected" "$got"
}
testWfRoot002() {
expected=$(normalize_dir_of_file "$DIR/../install.sh")
export WF_ROOT="$expected"
got=$(wf_root)
assertEquals "$expected" "$got"
}