File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -773,3 +773,28 @@ def test_show_hooks_stores_string_values(
773773
774774 # Cleanup
775775 session .unset_hook (test_case .hook .split ("[" )[0 ])
776+
777+
778+ # =============================================================================
779+ # run_hook Tests
780+ # =============================================================================
781+
782+
783+ def test_run_hook_basic (server : Server ) -> None :
784+ """Test run_hook() method exists and can be called without error."""
785+ if not has_gte_version ("3.2" ):
786+ pytest .skip ("Requires tmux >= 3.2" )
787+
788+ session = server .new_session (session_name = "test_run_hook" )
789+
790+ # Set a hook first
791+ session .set_hook ("session-renamed[0]" , 'display-message "test"' )
792+
793+ # Run the hook immediately - should not raise
794+ result = session .run_hook ("session-renamed[0]" )
795+
796+ # Verify returns self for chaining
797+ assert result is session
798+
799+ # Cleanup
800+ session .unset_hook ("session-renamed" )
You can’t perform that action at this time.
0 commit comments