Skip to content

Commit 2f1283b

Browse files
authored
Merge pull request #179 from tony/regression_00132
Handle cases with invalid session names, fixes #132
2 parents 914816a + 679bd7a commit 2f1283b

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kaptan>=0.5.7
2-
libtmux==0.5
2+
libtmux==0.6.0
33
click==6.6
44
colorama
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# regression for https://github.com/tony/tmuxp/issues/132
2+
session_name: dot.session-name
3+
windows:
4+
- layout: main-vertical
5+
panes:
6+
- shell_command:
7+
- echo 'hi'

tests/test_cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ def test_load_workspace(server, monkeypatch):
269269
assert session.name == 'sampleconfig'
270270

271271

272+
def test_regression_00132_session_name_with_dots(tmpdir, server, session):
273+
yaml_config = curjoin("workspacebuilder/regression_00132_dots.yaml")
274+
cli_args = [yaml_config]
275+
inputs = []
276+
runner = CliRunner()
277+
result = runner.invoke(
278+
cli.command_load, cli_args, input=''.join(inputs),
279+
standalone_mode=False)
280+
assert result.exception
281+
assert isinstance(result.exception, libtmux.exc.BadSessionName)
282+
283+
272284
@pytest.mark.parametrize("cli_args", [
273285
(['load', '.']),
274286
(['load', '.tmuxp.yaml']),

0 commit comments

Comments
 (0)