Fix detection with unittest

This commit is contained in:
raimon
2016-12-04 12:53:15 +09:00
parent 69ed6266a4
commit 48de7f5abb
2 changed files with 2 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ function! Requirements_matched_filename(filename)
return 1
endif
if a:filename =~# '\v.constraints\.(txt|in)$'
if a:filename =~# '\vconstraints\.(txt|in)$'
return 1
endif

View File

@@ -5,6 +5,7 @@ describe 'enable: Requirements_matched_filename()'
it 'to enable file type detection: basic filename'
Expect Requirements_matched_filename('requirements.txt') to_be_true
Expect Requirements_matched_filename('requires.txt') to_be_true
Expect Requirements_matched_filename('constraints.txt') to_be_true
end
it 'to enable file type detection: pip-tools filename'