Skip to content

Commit 996b8aa

Browse files
committed
Try to fix hangs in tools/git/blame-in-diff tests on OSX
Ensure we write to the fifo in case of error so that the test exits.
1 parent 54f2fc0 commit 996b8aa

File tree

1 file changed

+24
-19
lines changed
  • test/tools/git/blame-in-diff

1 file changed

+24
-19
lines changed

test/tools/git/blame-in-diff/rc

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,32 @@ source "%val{runtime}/rc/filetype/diff.kak"
33
source "%val{runtime}/rc/tools/git.kak"
44

55
define-command run %{
6-
git init
7-
git add
8-
git commit --message 'initial commit'
9-
execute-keys %{2gIchanged <esc>}
10-
write
11-
git commit --all --message 'changed line 2'
12-
# Show the commit, jumping to the new version of line 2.
13-
git blame-jump
14-
hook -once buffer BufCloseFifo .* %{
15-
evaluate-commands -client client0 %{
16-
# We've jumped to the new version of line 2. Move to the old
17-
# version so we can annotate the old version of the file.
18-
execute-keys k
19-
git blame
20-
hook -once buffer BufCloseFifo .* %{
21-
execute-keys -client client0 x
22-
# Wait for a redraw before reporting completion.
23-
hook -once buffer NormalIdle .* %{
24-
echo -to-file fifo
6+
try %{
7+
git init
8+
git add
9+
git commit --message 'initial commit'
10+
execute-keys %{2gIchanged <esc>}
11+
write
12+
git commit --all --message 'changed line 2'
13+
# Show the commit, jumping to the new version of line 2.
14+
git blame-jump
15+
hook -once buffer BufCloseFifo .* %{
16+
evaluate-commands -client client0 %{
17+
# We've jumped to the new version of line 2. Move to the old
18+
# version so we can annotate the old version of the file.
19+
execute-keys k
20+
git blame
21+
hook -once buffer BufCloseFifo .* %{
22+
execute-keys -client client0 x
23+
# Wait for a redraw before reporting completion.
24+
hook -once buffer NormalIdle .* %{
25+
echo -to-file fifo
26+
}
2527
}
2628
}
2729
}
30+
} catch %{
31+
echo -to-file fifo
32+
kill! 1
2833
}
2934
}

0 commit comments

Comments
 (0)