@@ -442,7 +442,7 @@ def test_load_symlinked_workspace(
442
442
class CLILoadFixture (t .NamedTuple ):
443
443
test_id : str
444
444
cli_args : t .List [str ]
445
- config_path : str
445
+ config_paths : t . List [ str ]
446
446
expected_exit_code : int
447
447
expected_in_out : "ExpectedOutput" = None
448
448
expected_not_in_out : "ExpectedOutput" = None
@@ -452,13 +452,29 @@ class CLILoadFixture(t.NamedTuple):
452
452
453
453
TEST_LOAD_FIXTURES = [
454
454
CLILoadFixture (
455
- test_id = "exists " ,
455
+ test_id = "relative-dot-samedir " ,
456
456
cli_args = ["load" , "." ],
457
- config_path = "{tmp_path}/.tmuxp.yaml" ,
457
+ config_paths = [ "{tmp_path}/.tmuxp.yaml" ] ,
458
458
expected_exit_code = 0 ,
459
459
expected_in_out = None ,
460
460
expected_not_in_out = None ,
461
- )
461
+ ),
462
+ CLILoadFixture (
463
+ test_id = "relative-dot-slash-samedir" ,
464
+ cli_args = ["load" , "./" ],
465
+ config_paths = ["{tmp_path}/.tmuxp.yaml" ],
466
+ expected_exit_code = 0 ,
467
+ expected_in_out = None ,
468
+ expected_not_in_out = None ,
469
+ ),
470
+ CLILoadFixture (
471
+ test_id = "relative-file-samedir" ,
472
+ cli_args = ["load" , "./.tmuxp.yaml" ],
473
+ config_paths = ["{tmp_path}/.tmuxp.yaml" ],
474
+ expected_exit_code = 0 ,
475
+ expected_in_out = None ,
476
+ expected_not_in_out = None ,
477
+ ),
462
478
]
463
479
464
480
@@ -475,7 +491,7 @@ def test_load(
475
491
monkeypatch : pytest .MonkeyPatch ,
476
492
test_id : str ,
477
493
cli_args : t .List [str ],
478
- config_path : str ,
494
+ config_paths : t . List [ str ] ,
479
495
expected_exit_code : int ,
480
496
expected_in_out : "ExpectedOutput" ,
481
497
expected_not_in_out : "ExpectedOutput" ,
@@ -485,17 +501,18 @@ def test_load(
485
501
assert server .socket_name is not None
486
502
487
503
monkeypatch .chdir (tmp_path )
488
- tmuxp_config = pathlib .Path (config_path .format (tmp_path = tmp_path ))
489
- tmuxp_config .write_text (
490
- """
491
- session_name: test
492
- windows:
493
- - window_name: test
494
- panes:
495
- -
496
- """ ,
497
- encoding = "utf-8" ,
498
- )
504
+ for config_path in config_paths :
505
+ tmuxp_config = pathlib .Path (config_path .format (tmp_path = tmp_path ))
506
+ tmuxp_config .write_text (
507
+ """
508
+ session_name: test
509
+ windows:
510
+ - window_name: test
511
+ panes:
512
+ -
513
+ """ ,
514
+ encoding = "utf-8" ,
515
+ )
499
516
500
517
try :
501
518
cli .cli ([* cli_args , "-d" , "-L" , server .socket_name ])
0 commit comments