浏览代码

Filepath space escaping

Boris Staletic 7 年之前
父节点
当前提交
3e77555905
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      python/ycm/tests/vimsupport_test.py

+ 7 - 0
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\ ' )