@@ -263,7 +263,7 @@ def check_cmd(config_arg):
263263
264264def test_load_workspace (server , monkeypatch ):
265265 # this is an implementation test. Since this testsuite may be ran within
266- # a tmux session by the developer themselv , delete the TMUX variable
266+ # a tmux session by the developer himself , delete the TMUX variable
267267 # temporarily.
268268 monkeypatch .delenv ('TMUX' , raising = False )
269269 session_file = curjoin ("workspacebuilder/two_pane.yaml" )
@@ -278,6 +278,37 @@ def test_load_workspace(server, monkeypatch):
278278 assert session .name == 'sampleconfig'
279279
280280
281+ def test_load_symlinked_workspace (server , tmpdir , monkeypatch ):
282+ # this is an implementation test. Since this testsuite may be ran within
283+ # a tmux session by the developer himself, delete the TMUX variable
284+ # temporarily.
285+ monkeypatch .delenv ('TMUX' , raising = False )
286+
287+ realtemp = tmpdir .mkdir ('myrealtemp' )
288+ linktemp = tmpdir .join ('symlinktemp' )
289+ linktemp .mksymlinkto (realtemp )
290+ projfile = linktemp .join ('simple.yaml' )
291+
292+ projfile .write ("""
293+ session_name: samplesimple
294+ start_directory: './'
295+ windows:
296+ - panes:
297+ - echo 'hey'""" )
298+
299+ # open it detached
300+ session = load_workspace (
301+ projfile .strpath ,
302+ socket_name = server .socket_name ,
303+ detached = True
304+ )
305+ pane = session .attached_window .attached_pane
306+
307+ assert isinstance (session , libtmux .Session )
308+ assert session .name == 'samplesimple'
309+ assert pane .current_path == realtemp .strpath
310+
311+
281312def test_regression_00132_session_name_with_dots (tmpdir , server , session ):
282313 yaml_config = curjoin ("workspacebuilder/regression_00132_dots.yaml" )
283314 cli_args = [yaml_config ]
0 commit comments