From 35597a7c0152013f3306d1b1a8c56e95067e7477 Mon Sep 17 00:00:00 2001 From: Luca Benci Date: Tue, 31 Oct 2017 23:15:11 +0100 Subject: [PATCH] Change tests for trailing-space behaviour change --- tests/unit/completion/test_completer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/completion/test_completer.py b/tests/unit/completion/test_completer.py index 5f1581aa0..934872f2b 100644 --- a/tests/unit/completion/test_completer.py +++ b/tests/unit/completion/test_completer.py @@ -274,7 +274,11 @@ def test_on_selection_changed(before, newtxt, after, completer_obj, check(True, 2, after_txt, after_pos) # quick-completing a single item should move the cursor ahead by 1 and add - # a trailing space if at the end of the cmd string + # a trailing space if at the end of the cmd string, unless the command has + # maxsplit < len(before) (such as :open in these tests) + if after_txt.startswith(':open'): + return + after_pos += 1 if after_pos > len(after_txt): after_txt += ' '