Auto merge of #2662 - bstaletic:filepath_escaping3, r=micbou
Filepath space escaping Thank you for working on YCM! :) **Please complete these steps and check these boxes (by putting an `x` inside the brackets) _before_ filing your PR:** - [x] I have read and understood YCM's [CONTRIBUTING][cont] document. - [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [x] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [x] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** [Please explain **in detail** why the changes in this PR are needed.] This provides the most basic test for `EscapedFilepath()`. [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2662) <!-- Reviewable:end -->
This commit is contained in:
commit
6132f0bc50
@ -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\ ' )
|
||||
|
Loading…
Reference in New Issue
Block a user