Skip to content

Commit

Permalink
Fix detection with unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
raimon49 committed Dec 4, 2016
1 parent 69ed626 commit 48de7f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ftdetect/requirements.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions t/test_ftdetect.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 48de7f5

Please sign in to comment.