Commit 1294594
committed
test(tools): Use a named buffer sentinel for paste_text isolation test
why: CI on tmux 3.2a failed the paste_text buffer-isolation test —
`show-buffer` without `-b` returned an empty stdout after paste_text
completed. The behavior of tmux's "default" (unnamed) buffer varies
across releases: some versions treat it as "the most recently
written buffer" (so a named buffer that was created and deleted
during paste_text can leave the default pointing at nothing on
older tmux). The original test assumed the sentinel set via
`set-buffer <value>` would always be the default after paste_text
finished — that assumption doesn't hold portably.
what:
- Write the sentinel into an explicit named buffer with `set-buffer
-b mcp_test_user_buffer <value>` and read it back with
`show-buffer -b mcp_test_user_buffer`. Named-buffer targeting has
been stable in tmux since 1.5 and works identically across every
release in the CI matrix.
- Clean up the sentinel named buffer at the end of the test so it
doesn't linger across parallel test workers.
- Add `import contextlib` at module top (stdlib, namespace style
per AGENTS.md).
The core claim — that paste_text does not disturb user buffer state
— remains tested, now in a portable form. The separate check for
"no mcp_paste_* leakage" in list-buffers is unchanged.1 parent 252f6c1 commit 1294594
1 file changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
978 | 979 | | |
979 | 980 | | |
980 | 981 | | |
981 | | - | |
| 982 | + | |
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
985 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
986 | 993 | | |
987 | | - | |
988 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
989 | 997 | | |
990 | 998 | | |
991 | 999 | | |
992 | 1000 | | |
993 | 1001 | | |
994 | 1002 | | |
995 | 1003 | | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1000 | 1009 | | |
1001 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1002 | 1015 | | |
1003 | 1016 | | |
1004 | 1017 | | |
| |||
0 commit comments