Skip to content

Commit 8a3fb79

Browse files
committed
Address CI inventory assertion
1 parent 1f9a0f7 commit 8a3fb79

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

tests/core_resolve_target.bats

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,15 @@ teardown() {
115115
records=$(list_worktree_records "$TEST_REPO")
116116
local repo_root
117117
repo_root=$(cd "$TEST_REPO" && pwd -P)
118-
119-
[[ "$records" == *"1"$'\t'"$repo_root"$'\t'*$'\t'"ok"* ]]
120-
[[ "$records" == *"0"$'\t'"$TEST_WORKTREES_DIR/records-normal"$'\t'"records-normal"$'\t'"ok"* ]]
121-
[[ "$records" == *"0"$'\t'"$TEST_WORKTREES_DIR/records-detached"$'\t'"(detached)"$'\t'"detached"* ]]
122-
[[ "$records" == *"0"$'\t'"$TEST_WORKTREES_DIR/records-locked"$'\t'"records-locked"$'\t'"locked"* ]]
118+
local normal_path detached_path locked_path
119+
normal_path=$(cd "$TEST_WORKTREES_DIR/records-normal" && pwd -P)
120+
detached_path=$(cd "$TEST_WORKTREES_DIR/records-detached" && pwd -P)
121+
locked_path=$(cd "$TEST_WORKTREES_DIR/records-locked" && pwd -P)
122+
123+
[[ "$records" == *"is_main 1"$'\n'"path $repo_root"$'\n'*"status ok"* ]]
124+
[[ "$records" == *"is_main 0"$'\n'"path $normal_path"$'\n'"branch records-normal"$'\n'"status ok"* ]]
125+
[[ "$records" == *"is_main 0"$'\n'"path $detached_path"$'\n'"branch (detached)"$'\n'"status detached"* ]]
126+
[[ "$records" == *"is_main 0"$'\n'"path $locked_path"$'\n'"branch records-locked"$'\n'"status locked"* ]]
123127

124128
git -C "$TEST_REPO" worktree unlock "$TEST_WORKTREES_DIR/records-locked"
125129
}

0 commit comments

Comments
 (0)