File: t-uninstall-worktree-unsupported.sh

package info (click to toggle)
git-lfs 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,808 kB
  • sloc: sh: 21,256; makefile: 507; ruby: 417
file content (28 lines) | stat: -rwxr-xr-x 604 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

. "$(dirname "$0")/testlib.sh"

# These tests rely on behavior found in Git versions less than 2.20.0 to
# perform themselves, specifically:
#   - lack of worktreeConfig extension support
ensure_git_version_isnt $VERSION_HIGHER "2.20.0"

begin_test "uninstall --worktree with unsupported worktreeConfig extension"
(
  set -e

  reponame="$(basename "$0" ".sh")-unsupported"
  mkdir "$reponame"
  cd "$reponame"

  set +e
  git lfs uninstall --worktree 2>err.log
  res=$?
  set -e

  cat err.log
  grep -i "error" err.log
  grep -- "--worktree" err.log
  [ "0" != "$res" ]
)
end_test