Commit Graph

265 Commits

Author SHA1 Message Date
Holger Rapp
ccf44a61ff Make iterators python 3 and 2 compatible. 2014-02-14 09:14:20 +01:00
Holger Rapp
5aca4a6952 Use the correct python version in tests. 2014-02-14 08:22:09 +01:00
Holger Rapp
82ca377aaf Moved the core of the plugin into autoload. This will not really impact loading times because UltiSnips is loaded on the first CursorMovedI command anyways, but it might fix some issues with --noplugin. 2014-02-11 07:56:56 +01:00
Holger Rapp
888ce5dac5 Fix a bug in retaining the unnamed register. 2014-02-10 21:06:04 +01:00
Holger Rapp
f2a9a5eb8d Refactored how snippet files are parsed. 2014-02-10 08:40:37 +01:00
Holger Rapp
c67a59f579 More linting and refactorings mainly in _transformation.py. 2014-02-08 14:23:16 +01:00
Holger Rapp
bd132bc379 More linting warnings and a small bug fix. 2014-02-07 09:50:20 +01:00
Holger Rapp
ed2a0c517f Fixed remaining tests. 2014-02-05 19:13:34 +01:00
Holger Rapp
a7de815f47 Started fixing the tests that broke through the remapping change. 2014-02-05 17:45:45 +01:00
LFDM
f26a2ce830 Adds a test for the new feature 2014-02-01 01:43:43 +01:00
Sergey Alexandrov
f7c83ebbdb Add a test case for bug 1251994 2013-12-29 01:56:32 +04:00
Romain Giot
de7bff28df Update tests to make test -a option only when unidecode is installed 2013-10-19 15:34:13 +02:00
Romain Giot
ddcf183a59 Add two additional tests for the 'a' flag in the transformation 2013-10-07 09:49:02 +02:00
John Szakmeister
31f318cb7e Teach list_snippets_dict to escape apostrophes in the description.
This was discovered while trying to use
UltiSnips_SnippetsInCurrentScope() with some snippets that have
apostrophes in the description (such as printf('...', ...)).
2013-08-05 16:43:58 -04:00
Holger Rapp
5a3190e65c Fixed b1191617. 2013-06-29 15:44:02 +02:00
Holger Rapp
b03bb13423 TestCase for b1191617 and slightly more stable way to execute python in test cases. 2013-06-21 22:12:39 +02:00
Holger Rapp
5d6f72949d Added UltiSnips_SnippetsInCurrentScope(). Patch by Jorge (skeept) 2013-06-10 18:27:48 +02:00
Holger Rapp
e10285b382 Fix for bug 1073816 and some improvements to debug utilities. 2013-04-14 13:09:33 +02:00
Aaron Schrab
3a4991fb32 Add option for stripping of trailing whitespace
Add "s" snippet option which, if set, will cause trailing whitespace to
be stripped from lines before jumping to the next tab stop.

When used with a snippet like the following this will allow the text
from the $1 tabstop to be removed and have the space in front of that
automatically deleted when the user jumps to $2. This will work even if
using the same key for snippet expansion and jumping to the next
tabstop, whereas if the space was manually removed the key would cause
the snippet to be expanded again.

    snippet do "do block" s
    do `!p snip.rv = "|" if t[1] else""`${1:args}`!p snip.rv = "|" if t[1] else""`
    	$2
    end
    $0
    endsnippet
2012-11-24 13:25:29 -05:00
Holger Rapp
3fc86a36a8 Fix for folding problem by Aaron 2012-08-22 11:55:31 +02:00
Aaron Schrab
1f151bea64 Remove obsolete comment
Change in b319569 made this comment obsolete.
2012-08-15 23:38:41 -04:00
Holger Rapp
b319569b7b Fixed bug 1034805: Langmap with escaped characters where a problem 2012-08-15 14:13:50 +02:00
Aaron Schrab
3584ee3421 Add test with perl syntax folding
Exercise changes from commit 7335225, to check that the problem fixed by
that doesn't recur.

I've run all tests including this one both with and without the
previously mentioned commit, the new test only passes if that commit is
included.  All other tests pass in either case.
2012-08-09 13:19:51 -04:00
Aaron Schrab
8e3f419c44 Fix tests to work with new version of screen
Debian unstable currently has a pre-release version of screen 4.1.0.
This version changes the "stuff" command so that special characters get
parsed, breaking many of the tests.

Detect if the version of screen being used to run tests does this
parsing, and if so do additional escaping of characters so that tests
again work.

With this change, all tests pass with both old and new versions of
screen.
2012-08-08 19:57:55 -04:00
Aaron Schrab
2ab17b6cca Move getting buffer data into interface class
Put the code that instructs vim to write its buffer to a temporary file
and then reads that file into a python string into the VimInterface
class.  This will allow that to be done by code outside of tests.
2012-08-08 19:57:55 -04:00
Aaron Schrab
fc22af0d1e Use classes for managing vim interaction
Create classes for interacting with vim, a base class with common
methods, a class for interacting via screen, and one for interacting on
Windows.

At startup time an instance of one of these classes is created, and that
object is passed to all of the tests instead of the session.

I haven't been able to get UltiSnips working in vim on Windows to really
test this, but I have verified that vim interactions still work.
2012-08-08 19:57:33 -04:00
Aaron Schrab
461a475d2a Have test script set vim buffer type to nofile
Instruct vim not to complain about quitting without writing the buffer
used to run tests by setting the buftype option to nofile.
2012-08-08 19:39:50 -04:00
Holger Rapp
d49db703e5 Fixed bug with mkline and noexpandtab 2012-03-24 20:15:43 +01:00
Holger Rapp
4be8a92bf6 Added Jim to the list of contributors 2012-03-11 17:30:05 +01:00
Holger Rapp
45b1d09d53 Fixed bug: / could not be escaped in Visual default text 2012-02-24 09:42:02 +01:00
Holger Rapp
874cb89401 Fixed a bug when visual expand was used after umlauts or tabs. 2012-02-16 21:42:26 +01:00
Holger Rapp
bed41564c0 Python code has access to text for VISUAL via snip.v 2012-02-12 12:33:53 +01:00
Holger Rapp
c1e5bb6c5f Visual now supports transformations 2012-02-12 12:15:54 +01:00
Holger Rapp
92209f99d2 Fixed jumping back bug after killing the current tabstop 2012-02-12 09:37:59 +01:00
Holger Rapp
164bcbc714 Fixed bug triggered by deleting the last few lines of a snippet in normal mode 2012-02-12 08:53:42 +01:00
Holger Rapp
6d6fe9dbb6 Fixed a bug when tabstop zero was deleted and then a jump attemted 2012-02-12 08:14:21 +01:00
Holger Rapp
fd03a1c7d9 Fixed a bug in snippet listing and silenced tests 2012-02-01 23:37:37 +01:00
Holger Rapp
8dd7720c29 Fix bug: List snippets didn't work after whitespace. 2012-02-01 21:39:33 +01:00
Holger Rapp
46f3258af9 Fixed a bug in snippet selection when using selection=exclusive 2012-02-01 20:31:03 +01:00
Holger Rapp
13aadb5def $VISUAL now supports default text 2012-01-31 14:20:49 +01:00
Holger Rapp
8c9bf502f2 Fixed a bug that could happen when a whole snippet was deleted. 2012-01-31 08:12:05 +01:00
Holger Rapp
e34fac23ff One error in last commit 2012-01-29 17:03:11 +01:00
Holger Rapp
da71206fce Significant bug fixes for windows. 2012-01-29 16:51:22 +01:00
Holger Rapp
ee607db3be Guess when a tabstop is overwritten 2012-01-28 17:07:37 +01:00
Holger Rapp
d537d1d438 A few more tests. 2012-01-28 17:07:37 +01:00
Holger Rapp
e69838c4bf UltiSnips should now be able to cope with formatoptions. Removed turning them off and the corresponding snippet option "f" 2012-01-28 17:07:37 +01:00
Holger Rapp
f2ce576fbd Fixed various smaller bugs I encountered 2012-01-28 17:07:37 +01:00
Holger Rapp
6226b29fb5 Added and fixed a failing test case 2012-01-28 17:07:37 +01:00
Holger Rapp
0caa5be256 Small refactoring 2012-01-28 17:07:36 +01:00
Holger Rapp
ced34ee36a Made simple insertion and deletion a little more robust 2012-01-28 17:07:36 +01:00