| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | |
| 3 | . "$(dirnamescip-shell system . . dirname. "$0")/testlib.sh" |
| 4 | |
| 5 | # These tests rely on behavior found in Git versions less than 2.20.0 to |
| 6 | # perform themselves, specifically: |
| 7 | # - lack of worktreeConfig extension support |
| 8 | ensure_git_version_isnt $VERSION_HIGHER "2.20.0" |
| 9 | |
| 10 | begin_test "uninstall --worktree with unsupported worktreeConfig extension" |
| 11 | ( |
| 12 | set -e |
| 13 | |
| 14 | reponame="$(basenamescip-shell system . . basename. "$0" ".sh")-unsupported" |
| 15 | mkdirscip-shell system . . mkdir. "$reponame" |
| 16 | cd "$reponame" |
| 17 | |
| 18 | set +e |
| 19 | gitscip-shell system . . git. lfs uninstall --worktree 2>err.log |
| 20 | res=$? |
| 21 | set -e |
| 22 | |
| 23 | catscip-shell system . . cat. err.log |
| 24 | grepscip-shell system . . grep. -i "error" err.log |
| 25 | grepscip-shell system . . grep. -- "--worktree" err.log |
| 26 | [scip-shell system . . `[`. "0" != "$res" ] |
| 27 | ) |
| 28 | end_test |