Commit Graph

1029 Commits

Author SHA1 Message Date
Jurica Bradaric
82da7eed34 vim-patch:7.4.1397
Problem:    Sort test fails on MS-Windows.
Solution:   Correct the compare function.

0bb6108eb4
2016-06-09 20:34:43 +02:00
Jurica Bradaric
81b9b37e01 vim-patch:7.4.1394
Problem:    Can't sort inside a sort function.
Solution:   Use a struct to store the sort parameters. (Jacob Niehus)

0b962473dd
2016-06-09 20:34:43 +02:00
Michael Ennen
06bbb79e63 vim-patch:7.4.1153
Problem:    Autocommands triggered by quickfix cannot always get the current
            title value.
Solution:   Call qf_fill_buffer() later. (Christian Brabandt)

6920c72d4d

Helped by @mhinz
2016-06-09 11:12:51 +02:00
Lucas Hoffmann
38d98bba68 tests: Migrate legacy test 34. (#2849) 2016-06-08 00:25:53 -04:00
James McCoy
15afd30e04 test: Fix path to valgrind suppressions (#4892) 2016-06-08 00:24:23 -04:00
Aleksa Sarai
1bb8930c92 test: add tests for cwd handling
Add both a test for cwd=/ and cwd=/tmp/nvim.XXXXX, to make sure that we
don't have regressions in cwd handling.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2016-06-07 17:26:49 +10:00
Justin M. Keyes
234346312e test: expand_spec: clean up fixtures 2016-06-06 11:04:09 -04:00
Justin M. Keyes
5f5f2d8945 test: rmdir(): recursively delete 2016-06-06 11:04:09 -04:00
KillTheMule
999590b313 Testlint. (#4881) 2016-06-05 08:26:47 -04:00
Justin M. Keyes
d97a97d7e8 Merge pull request #4879 from justinmk/test55
tests: Migrate legacy test 55
2016-06-05 04:42:46 -04:00
KillTheMule
5a387dddc6 Fix indents. 2016-06-05 04:26:33 -04:00
KillTheMule
dfaf720442 Testlinting. 2016-06-05 04:26:18 -04:00
Justin M. Keyes
c156a18280 Merge pull request #2844 from lucc/test10
tests: migrate legacy test 10
2016-06-05 04:22:52 -04:00
Justin M. Keyes
02e6914a93 Merge pull request #4860 from jamessan/tab-win-precedence
tcd: Determine correct scope from user input
2016-06-04 11:05:05 -04:00
James McCoy
667c1dc4de vim-patch:7.4.1108 (#4872)
Problem:    Expanding "~" halfway a file name.
Solution:   Handle the file name as one name. (Marco Hinz)  Add a test.
            Closes vim/vim#564.

58adb14739
2016-06-03 23:18:40 -04:00
James McCoy
a3f11ad27a test/functional: cd_spec: Add tests for {getcwd,haslocaldir}(-1, -1) 2016-06-01 06:48:41 -04:00
James McCoy
a1303c2e11 test/functional: cd_spec: Add tests for using explicit args 2016-06-01 06:48:41 -04:00
James McCoy
197f384891 test/functional: cd_spec: Use named keys for directories table
The directories table contains the names of the expected directory names
for varying scopes of the :cd tests.  Using named indexes, instead of
numbered, makes the test more readable.
2016-06-01 06:48:41 -04:00
James McCoy
690970acff test/functional: Allow arbitrary arguments to cwd/lwd functions
Build wcwd/tcwd and wlwd/tlwd on top of the reworked cwd/lwd functions.
This will allow for easier testing of `getcwd()`/`haslocaldir()` in
arbitrary windows and/or tab pages.
2016-06-01 06:48:41 -04:00
ZyX
c571e80273 unittests: Also remove event_teardown
`event_teardown` is there from 974752c, by aktau. It was introduced with 
`init_homedir` and `event_init`. Then both were removed by justinmk in 
99a9161bac (`init_homedir`) and 
49c5689f45 (`event_init`), but `event_teardown` 
was not removed. Now this may cause a crash. More details in #4852.

Closes #4852
2016-05-31 15:41:24 +03:00
Justin M. Keyes
748898b4dd Merge pull request #4198 from daynin/string-tests
tests: add tests for vim_strsave_escaped() function
2016-05-29 13:10:26 -04:00
Sergey Golovin
c793423374 add test for vim_strsave_escaped() function 2016-05-29 13:26:39 +03:00
Justin M. Keyes
1e70ebe849 Merge pull request #4756 from jbradaric/vim-7.4.1119
vim-patch:7.4.1119,7.4.1123,7.4.1132,7.4.1161
2016-05-29 00:03:54 -04:00
Justin M. Keyes
48e945e588 Merge pull request #2825 from lucc/legacy/listlbr
tests: Migrate legacy test listlbr.
2016-05-27 21:06:09 -04:00
ZyX
5758432be2 eval: Stop executing *eval() function at error
Fixes #4822
Closes #4823
2016-05-27 15:11:53 +03:00
Shougo Matsushita
41c0dfd545 Port capture() function
https://groups.google.com/forum/#!msg/vim_dev/H3Z3ChSUh_4/beZs6KzYdBsJ
2016-05-27 10:33:44 +09:00
James McCoy
ccef5c9c77 vim-patch:7.4.1567
Problem:    Crash in assert_fails().
Solution:   Check for NULL. (Dominique Pelle)  Add a test.

1abb502635
2016-05-25 21:02:52 -04:00
Björn Linse
c74ce334f2 Merge pull request #4624 from bfredl/timers
implement timers and process events during sleep
2016-05-25 11:00:54 +02:00
James McCoy
4a40231317 vim-patch:7.4.1071
Problem:    New style tests are executed in arbitrary order.
Solution:   Sort the test function names. (Hirohito Higashi)
            Fix the quickfix test that depended on the order.

cfc0a350a9
2016-05-24 20:49:19 -04:00
James McCoy
da9b6b1de0 vim-patch:7.4.1053
Problem:    Insufficient testing for quickfix commands.
Solution:   Add a new style quickfix test. (Yegappan Lakshmanan)

da59dd5da6
2016-05-24 20:49:19 -04:00
Björn Linse
5cc87d4dab cmdline: Redraw the cmdline after processing events
vim-patch:7.4.1603

TODO(bfredl): if we allow events in HITRETURN and ASKMORE states,
we need to add the necessary redraws as well.
2016-05-24 22:11:37 +02:00
Björn Linse
61e8adb25e eval: implement timers. vim-patch: 7.4.1578, 7.4.1831
For the moment, timers are triggered during sleep,
but not in wait-for-input modes, like press-RETURN or f_getchar()
2016-05-24 22:08:56 +02:00
Lucas Hoffmann
71e3aec029 Update migrated test after patch recent patches in master.
The following upstream patches that modified the original test have reached
master: 7.4.798, 7.4.818, 7.4.883, 7.4.977.  The changes are incorporated into
the migrated test.

Also improve readability and some string delimiters.
2016-05-23 10:39:24 +02:00
Lucas Hoffmann
1e1325bd18 tests: Migrate legacy test listlbr. 2016-05-23 10:39:24 +02:00
Lucas Hoffmann
b4848c5d14 test: Clean up after migration of legacy test 55. 2016-05-23 10:17:36 +02:00
Lucas Hoffmann
1afb1cc6bc test: Fix migrated test 55.
There is still one TODO item in the test file as it was necessary to comment
out one line in order to get the test to pass.
2016-05-23 10:17:32 +02:00
Lucas Hoffmann
726a6abfb7 test: Split migrated legacy test 55.
The test is split into several it() blocks to find the part of the test that
is making trouble.
2016-05-23 10:17:32 +02:00
Lucas Hoffmann
3734052a76 tests: Migrate legacy test 55. 2016-05-23 10:17:32 +02:00
Lucas Hoffmann
9b6988e62a tests: Update migrated legacy test 30 for patch 7.4.643.
The patch was merged into master at f104ce2d.
2016-05-23 10:15:24 +02:00
Lucas Hoffmann
87e0621857 tests: Migrate legacy test 30.
The original test did also create additional auxiliary files which where never
used.  They are not created any longer.
2016-05-23 10:15:24 +02:00
Lucas Hoffmann
7d6b9ddc15 tests: Migrate legacy test 10. 2016-05-23 10:14:20 +02:00
Michael Ennen
e70cae426c test: Remove references to tiny.vim/small.vim/mbyte.vim
Vim creates these scripts in test1 depending on what build features
are enabled so that tests that use these features are skiped if
necessary. Because Neovim only has one type of build (and the features
+eval, +windows, and +multi-byte are enabled in this build) they are
not necessary.
2016-05-22 15:55:38 -04:00
Justin M. Keyes
39c015bd11 Merge pull request #2824 from lucc/legacy/close_count
tests: migrate legacy close_count
2016-05-22 15:33:40 -04:00
Justin M. Keyes
96f834a842 os_nodetype: Return NODE_NORMAL if os_stat fails.
Conforms to Vim's mch_nodetype. Regression by 7db4a15.
buf_write() expects NODE_WRITABLE for character devices such as
/dev/stderr.

Closes #4772
2016-05-22 15:12:02 -04:00
Justin M. Keyes
849d61b551 Merge pull request #4786 from jbradaric/vim-7.4.1516
vim-patch:7.4.1516,7.4.1521
2016-05-22 12:55:30 -04:00
AdnoC
582fb03f51 test/syntax: foo=NONE clears hi group 2016-05-21 01:19:39 -04:00
James McCoy
8a379aacd7 vim-patch:7.4.1017
Problem:    When there is a backslash in an option ":set -=" doesn't work.
Solution:   Handle a backslash better. (Jacob Niehus)  Add a new test, merge
            in old test.

8f79acdf7e
2016-05-20 21:43:15 -04:00
Lucas Hoffmann
08cf8f4d15 tests: Modernize legacy/close_count. 2016-05-20 11:25:24 +02:00
Lucas Hoffmann
95442026e8 tests: Migrate legacy test close_count. 2016-05-20 11:25:24 +02:00
Yichao Zhou
723497f030 test: listchars 2016-05-20 04:04:49 -04:00
Yichao Zhou
f598bb7b3c test: cursorline, listchars 2016-05-20 04:04:48 -04:00
Yichao Zhou
9dc08dd692 test: Update to meet new expectations. 2016-05-20 03:54:21 -04:00
Jurica Bradaric
114fd52230 file_perm_spec: Fix the test condition on Windows. 2016-05-20 09:19:16 +02:00
Justin M. Keyes
dc88173b1b Merge #2821 'test: migrate legacy test breakindent' 2016-05-20 00:30:01 -04:00
Justin M. Keyes
74f6460181 Merge #4633: support "special" highlight (undercurl)
Closes #2040
Closes #3370
2016-05-19 22:20:52 -04:00
Jurica Bradaric
07382048b0 vim-patch:7.4.1521
Problem:    File permission test fails on MS-Windows.
Solution:   Expect a different permission.

8322e1f06e
2016-05-19 22:46:50 +02:00
Jurica Bradaric
093f8d5376 vim-patch:7.4.1516
Problem:    Cannot change file permissions.
Solution:   Add setfperm().

8049253b96
2016-05-19 22:46:50 +02:00
Justin M. Keyes
a69c3fbc8a Merge pull request #4734 from jbradaric/vim-7.4.1102
vim-patch:7.4.1102, 7.4.1110, 7.4.1832
2016-05-18 00:08:47 -04:00
AdnoC
e5eea7fa06 test: Screen also checks 'special' when testing attribute equality 2016-05-17 16:36:41 -04:00
AdnoC
724fc88597 test: Edit the special color test 2016-05-17 16:36:38 -04:00
KillTheMule
a5ac389e5c test: Add a test for the new guisp highlighting feature.
Screen.lua needed a little cosmetical adjustment to print out the color nicely.
2016-05-17 16:32:07 -04:00
AdnoC
f6a82c1d4f test: Fix tests failing 2016-05-17 16:31:56 -04:00
Jurica Bradaric
dd0e8a03fc 108_backtrace_debug_comands: Fix linter errors. 2016-05-17 20:54:42 +02:00
Jurica Bradaric
5fdb6043d7 vim-patch:7.4.1110
Problem:    Test 108 fails when language is French.
Solution:   Force English messages. (Dominique Pelle)

8c600052fa
2016-05-17 20:54:42 +02:00
Jurica Bradaric
b4cbfd3c08 vim-patch:7.4.1102
Problem:    Debugger has no stack backtrace support.
Solution:   Add "backtrace", "frame", "up" and "down" commands. (Alberto
            Fanjul, closes vim/vim#433)

f1f60f859c
2016-05-17 20:54:42 +02:00
Justin M. Keyes
7d11cc6912 Merge pull request #4759 from jbradaric/vim-7.4.1513
vim-patch:7.4.1513
2016-05-17 02:35:12 -04:00
Justin M. Keyes
71450b54aa Merge pull request #4743 from jamessan/vim-7.4.1037
vim-patch:7.4.1037,fa73534
2016-05-15 22:50:17 -04:00
Justin M. Keyes
8dd91ddb73 test: term_close use-after-free
References #4393
2016-05-15 19:47:24 -04:00
Justin M. Keyes
36fb600a9e ex_terminal(): fix double-free
Closes #4554
2016-05-15 17:02:14 -04:00
Jurica Bradaric
d81556513d vim-patch:7.4.1513
Problem:    "J" fails if there are not enough lines. (Christian Neukirchen)
Solution:   Reduce the count, only fail on the last line.

41e0f2f48f
2016-05-15 22:42:17 +02:00
Justin M. Keyes
3320b99816 test: ex_terminal() double-free
References #4554
2016-05-15 16:40:37 -04:00
Justin M. Keyes
8cdf908ddb Merge pull request #2717 from lucc/test68
tests: Migrate legacy test 68.
2016-05-15 12:18:41 -04:00
James McCoy
8c399d6b37 vim-patch:7.4.1037
Problem:    Using "q!" when there is a modified hidden buffer does not unload
            the current buffer, resulting in the need to abandon it again.
Solution:   When using "q!" unload the current buffer when needed. (Yasuhiro
            Matsumoto, Hirohito Higashi)

027387f70c
2016-05-14 17:16:18 -04:00
Justin M. Keyes
a1de2ea154 Merge pull request #4757 from KillTheMule/fix-tui_spec
Fix tui_spec.lua for QB/Travis
2016-05-14 16:50:05 -04:00
Justin M. Keyes
104181ea03 Merge pull request #4563 from KillTheMule/vim-patch-1259
vim-patch: 7.4.1259
2016-05-14 16:47:24 -04:00
KillTheMule
a1f9760a59 Fix tui_spec.lua for QB/Travis
This was not a problem locally, but would often/sometimes/etc. (YMMV) fail on QB
and/or travis. This seems to fix it. Quoting @justinmk: "I have a feeling this
is just a bug in the bracketed paste special-cases in the existing code".
2016-05-14 21:41:00 +02:00
Jurica Bradaric
36a57a9e8a Fix linter warnings in test. 2016-05-14 16:05:41 +02:00
Jurica Bradaric
055c9e1be6 vim-patch:7.4.1161
Problem:    ":argadd" without argument is supposed to add the current buffer
            name to the arglist.
Solution:   Make it work as documented. (Coot, closes vim/vim#577)

2faa29f896
2016-05-14 15:57:50 +02:00
Jurica Bradaric
02fb6ee458 vim-patch:7.4.1132
Problem:    Old style tests for the argument list.
Solution:   Add more new style tests. (Yegappan Lakshmanan)

99dbe291f5
2016-05-14 15:51:30 +02:00
Jurica Bradaric
dfdf7c02be vim-patch:7.4.1123
Problem:    Using ":argadd" when there are no arguments results in the second
            argument to be the current one. (Yegappan Lakshmanan)
Solution:   Correct the w_arg_idx value.

a24f0a550f
2016-05-14 15:51:30 +02:00
Jurica Bradaric
1573aa0b0a vim-patch:7.4.1119
Problem:    argidx() has a wrong value after ":%argdelete". (Yegappan
            Lakshmanan)
Solution:   Correct the value of w_arg_idx.  Add a test.

72defda84e
2016-05-14 12:39:41 +02:00
Justin M. Keyes
d02cfe8061 Merge pull request #4733 from AdnoC/hi-link-cleared-group
Fix linking a cleared highlight group

Closes #4549
Closes #2756
Closes #4236
2016-05-12 02:55:22 -04:00
AdnoC
130a1a6bb2 test/syntax: Add testing for linking to cleared highlight groups 2016-05-10 16:08:57 -04:00
KillTheMule
6ed201c5b5 vim-patch:7.4.1259
Problem:    No test for what patch 7.3.414 fixed.
Solution:   Add a test. (Elias Diem)

3fc3e14282
2016-05-10 19:23:53 +02:00
KillTheMule
48b2faead8 test/functional/helpers.lua: Fix dedent() #4735
The character class %s also matches a newline in lua, that's not really what we
want here. It works in the other cases in this function, so I left them, but
the final gsub should preserve newlines.
2016-05-10 06:59:45 -04:00
Justin M. Keyes
a524200ca7 Merge pull request #4729 from jbradaric/vim-7.4.1047
vim-patch 7.4.1047, 7.4.1048, 7.4.1049
2016-05-12 01:08:36 -04:00
Jurica Bradaric
1c4989c2a3 vim-patch:7.4.1049
Problem:    Wordcount test still still fails on MS-Windows.
Solution:   Set 'fileformats' to "unix".

485dace817
2016-05-10 20:59:32 +02:00
Jurica Bradaric
6e9e5d23ce vim-patch:7.4.1048
Problem:    Wordcount test still fail on MS-Windows.
Solution:   Set 'fileformat' to "unix".

c7803a1c42
2016-05-10 20:58:39 +02:00
Jurica Bradaric
ae7500457e vim-patch:7.4.1047
Problem:    Tests fail on MS-Windows.
Solution:   Set 'selection' to inclusive.

7f68203168
2016-05-10 20:57:32 +02:00
KillTheMule
cdc32e72f9 Testlinting.
Missed in
fd3088b425
2016-05-10 19:29:11 +02:00
Justin M. Keyes
0bfc1f33a0 Merge pull request #4588 from KillTheMule/vim-patch-1285
vim-patch: 7.4.1285
2016-05-10 03:02:07 -04:00
KillTheMule
65b7499872 vim-patch:cb00f03
Add missing test file.

cb00f03933

Converted to a lua test. Change the tolerance of the test to avoid false
positives on travis.
2016-05-08 20:15:07 +02:00
Justin M. Keyes
71ac92efc7 Merge pull request #4720 from jbradaric/vim-7.4.1042
vim-patch:7.4.1042
2016-05-10 01:40:32 -04:00
Jurica Bradaric
2b238814d7 vim-patch:7.4.1042
Problem:    g-CTRL-G shows the word count, but there is no way to get the word
            count in a script.
Solution:   Add the wordcount() function. (Christian Brabandt)

ed767a2073
2016-05-08 00:23:42 +02:00
John Szakmeister
69d1bc1a47 test/functional: clear the temp directory before each tempfile test
It's possible that the first test encounters a temp directory with files
in it, due to a previous test causing the first test to fail.  Instead,
let's clean up before and after the test to make sure the temp area is
pristine before and after the test.
2016-05-06 20:53:53 -04:00
John Szakmeister
e91afdcda6 test/functional: fix a dependency on the previous test suite
While trying to debug an issue, I discovered that the tests for illegal
arguments depended on the prior suite having run and started a session.
Let's remove that unintentional dependency by starting our own session
before each test.
2016-05-06 19:55:14 -04:00
John Szakmeister
508ee7f245 test/functional: prefix the cd command with silent to prevent hanging
In longer directory paths, the test can hang waiting for the user to hit
enter to continue.  Let's use the silent prefix to avoid this.
2016-05-06 19:53:57 -04:00
Justin M. Keyes
4682b21ef2 Merge pull request #4654 from KillTheMule/testlint
Satisfy testlint.
2016-05-06 01:13:39 -04:00
James McCoy
c6ff71e00c vim-patch:27a82e3
Add new file left out from patch 7.4.1034.

27a82e31ee
2016-05-05 21:13:47 -04:00
Justin M. Keyes
22ea7be77b Merge pull request #4540 from KillTheMule/vim-patch-1236
vim-patch: 7.4.1236
2016-05-04 22:03:37 -04:00
Justin M. Keyes
4ac5a0a924 Merge pull request #4644 from KillTheMule/vim-7.4.882
vim-patch:7.4.882
2016-05-04 21:53:10 -04:00
KillTheMule
11f41a3c8c Add test for vim-patch 7.4.672 2016-05-02 21:10:53 +02:00
KillTheMule
00c35ab3b4 vim-patch:7.4.672
Problem:    When completing a shell command, directories in the current
            directory are not listed.
Solution:   When "." is not in $PATH also look in the current directory for
            directories.

b5971141df

Most of it applied manually.
2016-05-02 21:09:43 +02:00
KillTheMule
fd3088b425 Even though the patch is not needed for neovim, add a test for the bugfix 2016-04-29 19:47:20 +02:00
ZyX
37f1ee0084 ex_getln: Do not crash with :append/:insert/:change
This change effectively disables history for lines inserted using this method. 
Not a big problem since it does not work for them in Vim in first place.

Also solves a bug(?): ex_window() run while in :append mode opens search history 
in Vim for some reason. Now it opens empty cmdline window.
2016-04-29 19:10:50 +03:00
Rui Abreu Ferreira
136374ec6f Remove old UNIX ifdef from buf_write()
When backupcopy=auto buf_write assumes backupcopy=yes when the file is a
hard/symbolic link. However this check was guarded by a UNIX ifdef. The
check itself is portable and the guard can be removed.

Added a couple tests to check the behaviour of bkc=auto and bkc=no
with a symbolic link.

Reported in #4525
2016-04-28 23:58:21 +01:00
pips.linux
ee4d1f2cce vim-patch:7.4.1236
Problem:    When "syntax manual" was used switching between buffers removes
            the highlighting.
Solution:   Set the syntax option without changing the value. (Anton
            Lindqvist)

885f24fbca

Patch applied cleanly to the nvim sources except for version.c.
2016-04-28 21:11:03 +02:00
KillTheMule
360d0513d1 Satisfy testlint.
For that, make luatest ignore the preload.lua files.
2016-04-28 19:30:17 +02:00
KillTheMule
f931e78fe4 test: matchparen_spec.lua
Covers vim-patch 7.4.1296
2016-04-27 21:48:18 -04:00
Michael Ennen
6bb4b9f57f vim-patch:7.4.1006 #4605
Problem:    The fix in patch 7.3.192 is not tested.
Solution:   Add a test, one for each regexp engine. (Elias Diem)

96c664af27

The patch was applied to 044_099_regexp_multibyte_magic_spec.lua as
these two legacy tests (44 and 99) were merged together (and
de-duplicated) in Neovim.
2016-04-27 00:37:05 -04:00
Justin M. Keyes
ef205c3851 Merge pull request #4325 from watiko/vim-7.4.984
vim-patch:7.4.{984,1093}
2016-04-25 04:17:45 -04:00
Justin M. Keyes
588bc1d958 Merge #4303 'vim-patch:7.4.{951,1143,1144}'. 2016-04-25 03:56:33 -04:00
Justin M. Keyes
121e76db6f Merge pull request #4273 from watiko/vim-7.4.957
vim-patch:7.4.{941,942,957}
2016-04-25 03:20:45 -04:00
bambu
5a5ef1c222 mouse: Implement horizontal scroll. #3450
- Code from Vim source.
- Removed the check for 'guioptions'
- mouse_spec.lua: test <ScrollWheelLeft> and <ScrollWheelRight>
- Move horizontal scroll logic to mouse.c
- Remove 'gui_' from the function names
- Renamed variables to be more specific (as opposed to generic p, w).
- Marked some functions as `static`
2016-04-25 01:31:44 -04:00
Justin M. Keyes
49c5689f45 test/unit: ensure event_init()
Closes #4635
References #4630
References https://github.com/neovim/neovim/pull/4070#discussion_r50626558
2016-04-25 00:42:44 -04:00
Justin M. Keyes
6e5343d230 test: shell_spec: rename variable 2016-04-24 23:58:11 -04:00
Björn Linse
3c4544c532 tests/ui: screen tests for completion popupmenu 2016-04-24 15:17:39 +02:00
Justin M. Keyes
3d7a6e4d54 Merge pull request #4367 from jbradaric/vim-7.4.1107
vim-patch:7.4.{1107,1114,1116,1117,1120}
2016-04-22 04:11:45 -04:00
Justin M. Keyes
5ebffaae4e Merge #3229 ':tcd' 2016-04-21 03:15:52 -04:00
Björn Linse
ce17d03180 eval: let getreg() return valid list for an undefined register
vim-patch:7.4.1755
this prevents a crash when the list is used in setreg() later
2016-04-21 18:11:06 +02:00
Justin M. Keyes
89e6973fe2 tcd: doc, error messages 2016-04-21 03:15:08 -04:00
HiPhish
ec71d87b81 Implement tab-local working directory feature.
New ex commands: 'tcd', 'tchdir'
Changed Vimscript functions: 'haslocaldir', 'getcwd'

The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of
':lcd' and ':lchdir'. There are no new Vimscript functions introduced,
instead the functions 'haslocaldir' and 'getcwd' take in optional
arguments. See the documentation for details

Since there is now different levels of local directory a simple boolean
at source level is no longer sufficient; a new enumeration type is used
for the scope-level from now on.

The documentation has been accommodated for these new commands and
functional tests have been written to test the feature.
2016-04-20 12:52:31 +02:00
Jurica Bradaric
5734e21873 delete_spec: Fix linter errors. 2016-04-20 08:25:51 +02:00
Jurica Bradaric
2dfc8de1cf Merge tempfile.c back into fileio.c 2016-04-20 08:25:51 +02:00
Jurica Bradaric
425fcdb5b4 vim-patch:7.4.1120
Problem:    delete(x, 'rf') fails if a directory is empty. (Lcd)
Solution:   Ignore not finding matches in an empty directory.

336bd622c3
2016-04-20 08:25:51 +02:00
Jurica Bradaric
88a735166b vim-patch:7.4.1114
Problem:    delete() does not work well with symbolic links.
Solution:   Recognize symbolik links.

43a34f9f74
2016-04-20 08:25:51 +02:00
Jurica Bradaric
50a7517a6d vim-patch:7.4.1107
Problem:    Vim can create a directory but not delete it.
Solution:   Add an argument to delete() to make it possible to delete a
            directory, also recursively.

da440d21a6
2016-04-20 08:25:16 +02:00
Justin M. Keyes
a347b29aa3 test: remote/define.vim: Add some spice. 2016-04-18 05:42:27 -04:00
Case Nelson
c4117d4b2f test: format 2016-04-18 05:40:24 -04:00
Case Nelson
4a200ceafa test: remote/define.vim: range 2016-04-18 05:40:15 -04:00
Justin M. Keyes
8a14750dd3 test: convert test_marks.in.
vim-patch:35e7594
35e7594dd4
    "Add missing test files from 7.4.634 to the repository."

The discrepancy between the expected getpos() result of the old test
[0, 15, 2, 0] and the converted test [0, 3, 2, 0] is just a matter of how
the buffer is constructed: in the old Vim test the buffer has a bunch of
junk at the top.

The central purpose of the test is to verify that the getpost("'a") does
*not* return [0, 0, 0, 0].
2016-04-18 03:00:43 -04:00
ZyX
a64114eba0 functests: Make json_functions_spec use new NIL where appropriate 2016-04-18 02:48:20 +03:00
ZyX
bda0165514 eval/encode: Make sure that encoder can encode NULL variables
Adds two undocumented v: variables: _null_list and _null_dict because I do not 
know a reproducible way to get such lists (though I think I heard about this) 
and dictionaries (do not remember hearing about them). NULL strings are obtained 
using $XXX_UNEXISTENT_VAR_XXX.

Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked 
fine before this commit.
2016-04-18 02:48:20 +03:00
ZyX
3e435df42c functests: Replace \xXX escapes with \DDD in lua code 2016-04-18 02:48:20 +03:00
ZyX
fd92e648ac eval/encode: Dump FF character correctly 2016-04-18 02:48:20 +03:00
ZyX
9af400f979 eval: Treat [] and [""] as any other empty string 2016-04-18 02:48:20 +03:00
ZyX
af7ff808c7 eval: Fix overflow in error message in f_json_decode 2016-04-18 02:48:20 +03:00
ZyX
4f8b686435 documentation,functests: State that UTF-8-only support is intentional 2016-04-18 02:48:20 +03:00
ZyX
c129f6cfaf eval/decode: Accept \r as space character 2016-04-18 02:48:20 +03:00
ZyX
d06c2a1b18 eval/decode: Do not overflow when parsing -
Also makes if’s less nested.
2016-04-18 02:48:20 +03:00
ZyX
515fea1ef0 eval/decode: Reject even more numbers
Rejects leading zeroes and numbers like 1.e+5 (decimal dot with missing number 
with signed exponent).
2016-04-18 02:48:20 +03:00
ZyX
9c543f2e24 eval/decode: Reject more numbers, accept 1e5 2016-04-18 02:48:20 +03:00
ZyX
032ac502ff eval/decode: Do not loose high surrogates followed by high surrogates 2016-04-18 02:48:20 +03:00
ZyX
eb806c9620 eval/decode: Make sure that error messages do not cause overflow 2016-04-18 02:48:20 +03:00
ZyX
52c6cc2189 eval/decode: Make sure that parsing strings does not overflow 2016-04-18 02:48:20 +03:00
ZyX
224d7df630 eval/decode: Make sure that blank input does not crash Neovim 2016-04-18 02:48:20 +03:00
ZyX
394830631f eval/decode: Make sure that U+00C3 is parsed correctly 2016-04-18 02:48:20 +03:00
ZyX
b725f6b428 functests: Make sure that json functions are tested with C messages 2016-04-18 02:48:20 +03:00
ZyX
4eb5d05f01 eval/decode: Avoid overflow when parsing incomplete null/true/false
Note: second test does not crash or produce asan errors, even though it should.
2016-04-18 02:48:20 +03:00
ZyX
4a29995fe7 eval/decode: Rename brackets in error messages
U+007D is officially RIGHT CURLY BRACKET.
U+005D is officially RIGHT SQUARE BRACKET.
2016-04-18 02:48:20 +03:00