@@ -483,6 +483,22 @@ class CLILoadFixture(t.NamedTuple):
483483        expected_in_out = None ,
484484        expected_not_in_out = None ,
485485    ),
486+     CLILoadFixture (
487+         test_id = "configdir-session-name" ,
488+         cli_args = ["load" , "my_config" ],
489+         config_paths = ["{TMUXP_CONFIGDIR}/my_config.yaml" ],
490+         expected_exit_code = 0 ,
491+         expected_in_out = None ,
492+         expected_not_in_out = None ,
493+     ),
494+     CLILoadFixture (
495+         test_id = "configdir-absolute" ,
496+         cli_args = ["load" , "~/.config/tmuxp/my_config.yaml" ],
497+         config_paths = ["{TMUXP_CONFIGDIR}/my_config.yaml" ],
498+         expected_exit_code = 0 ,
499+         expected_in_out = None ,
500+         expected_not_in_out = None ,
501+     ),
486502]
487503
488504
@@ -491,8 +507,10 @@ class CLILoadFixture(t.NamedTuple):
491507    TEST_LOAD_FIXTURES , 
492508    ids = [test .test_id  for  test  in  TEST_LOAD_FIXTURES ], 
493509) 
510+ @pytest .mark .usefixtures ("tmuxp_configdir_default" ) 
494511def  test_load (
495512    tmp_path : pathlib .Path ,
513+     tmuxp_configdir : pathlib .Path ,
496514    server : "Server" ,
497515    session : Session ,
498516    capsys : pytest .CaptureFixture ,
@@ -510,7 +528,9 @@ def test_load(
510528
511529    monkeypatch .chdir (tmp_path )
512530    for  config_path  in  config_paths :
513-         tmuxp_config  =  pathlib .Path (config_path .format (tmp_path = tmp_path ))
531+         tmuxp_config  =  pathlib .Path (
532+             config_path .format (tmp_path = tmp_path , TMUXP_CONFIGDIR = tmuxp_configdir )
533+         )
514534        tmuxp_config .write_text (
515535            """ 
516536        session_name: test 
0 commit comments