Commit Graph

9 Commits

Author SHA1 Message Date
micbou
f14485acb9 Rewrite syntax tests
Use matchers from hamcrest instead of eq_ assertions in syntax tests
to get more detailed assertion errors when tests are failing.
2016-08-06 01:12:59 +02:00
micbou
b0786d5c4f Fix LookupError exception when opening a file
Open the file in binary mode in CheckFilename function.
Use ReadFile helper in syntax_parse tests.
2016-05-10 16:30:04 +02:00
Ben Jackson
edd2bdbe0f Update flake8 config 2016-03-06 17:39:55 +00:00
Val Markovic
4e82409cc1 Futurize pass + manual fixes 2016-02-27 16:12:44 -08:00
micbou
4835b49a89 Remove interpreter line from Python sources 2016-02-05 16:24:03 +01:00
Ben Jackson
958d8f1eb5 Support subcommands which return detailed info
We display the detailed info text in the preview window. Vim's preview window is
designed to display actual files, not scratch data. Our approach is to open a
temporary file, even though that file is never written. This way, all of Vim's
existing settings for the preview window (and people's configured mappings) just
work. This is also consistent with showing the documentation in the preview
window during completion.

Other plugins have more complicated functions for this (such as eclim), or
Scratch.vim, but this approach is simple and doesn't require external
dependencies or additional settings.

Tests:

This required fixing a sort-of-bug in which the mock'd Vim module was always
only set once, and could not be changed outside of the module which created it.
This meant that it wasn't easy to have arbitrary tests, because it was dependent
on the order in which the tests execute as to whether the return from
MockVimModule() was actually the one in use.

The solution was to make the mock'd vim module a singleton, and use mock's
patch decorator to assign new MagicMock() instances to those methods in the vim
module which a particular test is interested in.
2015-09-20 21:30:23 +01:00
Strahinja Val Markovic
feca403431 Now extracting PHP functions.
Needed special support because of 'contained' syntax arg.

Fixes #1143
Related #1058
2014-09-02 10:53:38 -07:00
David\ Beitey
3bef7977a9 Enable Function syntax for keyword seeding 2014-05-21 13:33:45 +10:00
Strahinja Val Markovic
a69bbb3009 Updating code to work with new ycmd location 2014-05-13 13:09:19 -07:00