Commit 6260ec2
committed
fix(tests): handle tmux version differences in options tests
Based on examination of tmux source code:
1. terminal-overrides defaults:
- tmux 3.0a-3.1b: Have default values (xterm*, screen*)
- tmux 3.2+: Defaults removed (commit 527f66ed, April 2020)
2. terminal-overrides parsing:
- Fix split("=") to split("=", 1) to handle values containing "="
- Example: "RGB=\E[...=%p1%d...]" was failing to parse
3. Style option behavior:
- When bg=default is set, tmux stores bg as color 8 (default)
- When converting to string, color 8 is omitted from output
- Test was incorrectly expecting "bg=default" in output
- This behavior is consistent across all tmux versions
References:
- /home/d/study/c/tmux-3.0a/options-table.c:219-223
- /home/d/study/c/tmux-3.2a/options-table.c:314-318
- /home/d/study/c/tmux-3.0a/style.c:174-245
- /home/d/study/c/tmux-3.2a/style.c:189-2701 parent 6d1b4f6 commit 6260ec2
2 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
493 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
497 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
| |||
573 | 577 | | |
574 | 578 | | |
575 | 579 | | |
| 580 | + | |
| 581 | + | |
576 | 582 | | |
577 | 583 | | |
578 | 584 | | |
579 | 585 | | |
| 586 | + | |
580 | 587 | | |
581 | | - | |
582 | 588 | | |
583 | 589 | | |
584 | 590 | | |
| |||
0 commit comments