Add addl test

This commit is contained in:
Michael Wolf
2023-09-30 14:53:47 -06:00
parent 7ed9ffce4a
commit d4f5fbdaf8

View File

@@ -61,5 +61,18 @@ testNoramlizeDirOfFile001() {
assertEquals "$expected" "$out/tests/.."
}
testWfRoot() {
expected=$(normalize_dir_of_file "$DIR/../install.sh")
dir=$(mktemp -d --tmpdir would-reformat-testProjectRoot001.XXXXXX)
cd "$dir" || exit
git init >/dev/null 2>&1
"$DIR"/../install.sh 2>&2 >/dev/null
got=$(wf_root $(pwd))
assertEquals "$expected" "$got"
}
# shellcheck disable=SC1091
source shunit2