Commit Graph

77 Commits

Author SHA1 Message Date
Holger Rapp
9587d9daa4 Merge pull request #486 from seletskiy/enhance-undo
Add more precise undo levels (expanding, jumping)
2015-04-30 07:55:58 +02:00
Stanislav Seletskiy
099d3bcfbc Add more precise undo levels (expanding, jumping)
Breaking undo achieved through re-setting &undolevel:

    Setting the value of 'undolevels' also breaks undo. Even when the new
    value is equal to the old value.

    [:h :undoj]
2015-04-27 19:30:17 +06:00
Stanislav Seletskiy
1b3ecf4a85 priority test, docs & fmt fixes 2015-04-27 15:42:21 +06:00
Stanislav Seletskiy
904fbdecf5 review fixes 2015-04-25 21:38:22 +06:00
Holger Rapp
82ceb62887 Remove testing with GNU screen
The testing on Travis only relies on tmux which also works locally fine.
No need to support two interfaces for the same thing.
2015-04-22 09:31:07 +02:00
Stanislav Seletskiy
87c3a7ba43 fix UltiSnipFunc test 2015-04-19 11:40:00 +06:00
Holger Rapp
aeb2e24204 Disabled unite test - it seems flaky. 2015-04-18 17:33:36 +02:00
Holger Rapp
99eede1bf6 Started to test py2 and py3 on travis now.
I also learned that Vim 7.3 does not seem to be working at all anymore.
Fixes a bug that only happens with python3.
2015-04-18 17:15:05 +02:00
kawing.chiu
f9a22111f0 Fix adjacent tabstop input issue.
Previously, adjacent tabstops like $1$2 were not handled properly.
$2 could be jumped to but no text could be added. See issue #457.
2015-03-13 23:49:45 +08:00
spacewander
4d88df461f remove duplicate things in vim_test_case.py 2015-03-05 18:21:09 +08:00
Holger Rapp
56ac14840f Disable neocomplete test which fails right now. 2015-02-14 15:39:12 +01:00
Holger Rapp
09876e0084 Support for m (trim) snippet option. 2015-02-14 14:20:03 +01:00
Daniel Hahler
1a3d0ce4b3 tests: allow passing in PYTHON, and default to python2 2015-02-09 22:48:16 +01:00
Daniel Hahler
6602da89dd tests: fix duplicate method name (test_SnippetPriorities) 2015-02-09 22:48:16 +01:00
Daniel Hahler
98fa887e57 tests: remove star imports, sort 2015-02-09 22:48:16 +01:00
Stanislav Seletskiy
81a628c6ea Add option 'm' for trimming whitespaces in snippet
Fix #391
2015-02-04 11:55:28 +06:00
Holger Rapp
6a787cdc7b Applied pyformat on entire codebase. 2015-01-20 21:26:03 +01:00
John Szakmeister
1f3f1ce641 Don't rely on having the tmux/screen cwd being in the project directory.
Instead, let's just change the runtime path to include a pointer to the
top of the tree.
2014-11-24 04:45:37 -05:00
John Szakmeister
8b2115ec26 Fix #171: UltiSnips crashes in new file with text containing 0x80 char
It turns out that vim.eval() will attempt to do Unicode conversion and
can fail when raw bytes are present in the unnamed register.  To avoid
this problem, let's not carry the value across the bridge, and instead
store the cached value in Vim directly.  This successfully sidesteps the
issue entirely, and provides the correct save and restore behavior.

This also adds a test case for the issue.  Since expansion can finish
(despite the errors), the test has to capture the error messages and
examine them for a failure.
2014-11-21 06:09:49 -05:00
John Szakmeister
f4df1bd9e8 Teach _vim_enc to handle UnicodeDecodeErrors.
It's possible that when using _vim_dec with Python 2 that we fail to
convert the string to Unicode and just return the raw string instead.
This could happen, for instance, when there was arbitrary data in the
unnamed register during the save/restore process.  During restoration,
we'd attempt to encode the string, but this may fail with a
UnicodeDecodeError as Python attempts to first convert to Unicode and
then to the requested encoding.

To fix this, let's also catch `UnicodeDecodeError` and return the raw
string if we fail to convert.
2014-11-21 06:09:18 -05:00
John Szakmeister
56aa817be0 Reset the unnamed register at the start of a test.
Any test that alters the unnamed register can cause subsequent tests to
fail if there is an issues saving and restoring the register.  Let's
make the test infrastructure more robust against this issue by resetting
the unnamed register to an empty string.
2014-11-15 04:30:52 -05:00
Glenn Griffin
e3abd6678f Added test case for shiftwidth=0 and added myself to contributors list. 2014-10-08 10:30:40 -07:00
Holger Rapp
c3660128ac Implements clearsnippets by priority. 2014-08-02 14:55:27 +02:00
cwahbong
63f65ea874 Add/modify test cases for priority-based clearsnippets. 2014-08-01 14:32:47 +08:00
cwahbong
97bad9906a Add test case for #341 (github). 2014-07-31 20:58:43 +08:00
Holger Rapp
4dcfca755b Test refactorings. 2014-07-24 08:18:12 +02:00
cwahbong
1cf3b928fe Refactor: split test.py into several smaller files. 2014-07-23 17:22:11 +08:00