Tests for hooks time and count.

This commit is contained in:
Nicholas Marriott
2026-07-28 08:08:26 +01:00
parent e2a5ea2e78
commit 3c1b2969a8
2 changed files with 10 additions and 0 deletions

View File

@@ -85,6 +85,11 @@ echo "$shown" | grep -q '^session-created\[0\]' ||
fail "missing first array item: $shown"
echo "$shown" | grep -q '^session-created\[1\]' ||
fail "missing second array item: $shown"
shown=$($TMUX show-hooks -gF '#{option_name}:#{hook_fire_count}:#{t/p:hook_fire_time}' \
session-created) ||
fail "show-hooks -gF failed"
echo "$shown" | grep -q '^session-created:[1-9][0-9]*:[^-][^ ]*$' ||
fail "missing hook fire formats: $shown"
# User hooks are options, but show-hooks should list only registered @ hooks
# and not ordinary user options.