From 3e775559058ff10f8f477791c183e9ba8186d925 Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Wed, 24 May 2017 15:12:03 +0200 Subject: [PATCH] Filepath space escaping --- python/ycm/tests/vimsupport_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/ycm/tests/vimsupport_test.py b/python/ycm/tests/vimsupport_test.py index 3fc5d362..5f9684dc 100644 --- a/python/ycm/tests/vimsupport_test.py +++ b/python/ycm/tests/vimsupport_test.py @@ -1595,3 +1595,10 @@ def InsertNamespace_append_test( vim_current, *args ): ' int taco;', ' List salad = new List' ] AssertBuffersAreEqualAsBytes( expected_buffer, vim_current.buffer ) + + +def EscapedFilepath_test(): + eq_( vimsupport.EscapedFilepath( '/path/ with /sp ac es' ), + '/path/\ with\ /sp\ ac\ es' ) + eq_( vimsupport.EscapedFilepath( ' relative path/ with / spaces ' ), + '\ relative\ path/\ with\ /\ spaces\ ' )