Commit Graph

72 Commits

Author SHA1 Message Date
Jan Edmund Lazo
1b0937dd89
test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
2021-05-24 15:25:32 -04:00
Jan Edmund Lazo
486050ebc9
vim-patch:8.2.2875: cancelling inputlist() after a digit does not return zero
Problem:    Cancelling inputlist() after a digit does not return zero.
Solution:   Always return zero when cancelling. (closes vim/vim#8231)
5cf94577cf
2021-05-21 23:01:11 -04:00
Jan Edmund Lazo
39fdb86832
vim-patch:8.2.0946: cannot use "q" to cancel a number prompt
Problem:    Cannot use "q" to cancel a number prompt.
Solution:   Recognize "q" instead of ignoring it.
eebd555733
2021-05-21 23:01:11 -04:00
Jan Edmund Lazo
4dadbe64a0
vim-patch:8.2.1591: using winheight('.') in tests works but is wrong
Problem:    Using winheight('.') in tests works but is wrong.
Solution:   Use winheight(0). (issue vim/vim#6863)
c05d1c043a
2021-05-21 20:04:39 -04:00
Marco Hinz
4ba3d059bf
Revert "vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)"
This reverts commit 4be0e92db0.

Unfortunately, that commit stalled the Windows builds on GHA and likely requires
other patches to work properly.
2021-05-12 00:47:21 +02:00
Shougo
4be0e92db0
vim-patch:8.1.1378: delete() can not handle a file name that looks like a pattern (#12784)
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5
2021-05-07 08:07:13 -04:00
Jan Edmund Lazo
97288e73c2
vim-patch:8.2.2764: memory leak when default function argument is allocated
Problem:    Memory leak when default function argument is allocated.
Solution:   Free the expression result.
b47bed2f7a
2021-04-15 18:30:04 -04:00
Jan Edmund Lazo
423f3bc3e2
test/old: skip Test_strptime() on Windows
POSIX strptime does not exist in Windows.
There is a C++ workaround but I don't know how to use it.
Julia ported BSD's "strptime()" but I can't compile the file
or embed the relevant code into src/nvim/os/time.c

I cannot use "#ifdef" in eval.lua because of function hashing.
"#ifdef" is required to point "strptime()" to NULL
such that "CheckFunction strptime" fails.
2021-03-27 10:58:01 -04:00
Jan Edmund Lazo
a7e0b0edbc
vim-patch:8.2.0949: strptime() does not use DST
Problem:    Strptime() does not use DST.
Solution:   Set the tm_isdst field to -1. (Tomáš Janoušek, closes vim/vim#6230)
ea1233fccf
2021-03-27 10:53:42 -04:00
Jan Edmund Lazo
93e9cf4b6c
vim-patch:8.1.2398: strptime() test fails on Japanese Mac
Problem:    strptime() test fails on Japanese Mac.
Solution:   Use %T instead of %X.
9a838fe543
2021-03-27 10:53:41 -04:00
Jan Edmund Lazo
3261ba98a2
vim-patch:8.1.2326: cannot parse a date/time string
Problem:    Cannot parse a date/time string.
Solution:   Add strptime(). (Stephen Wall, closes #)
10455d43fe

N/A patches for version.c:

vim-patch:8.1.2344: Cygwin: warning for using strptime()

Problem:    Cygwin: warning for using strptime().
Solution:   Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
            closes vim/vim#5265)  Use 700 for _XOPEN_SOURCE for mkdtemp().
6a228c6463
2021-03-27 10:53:41 -04:00
kuuote
0450e155d4
vim-patch:8.2.2233: cannot convert a byte index into a character index (#13978)
Problem:    Cannot convert a byte index into a character index.
Solution:   Add charidx(). (Yegappan Lakshmanan, closes vim/vim#7561)
17793ef23a
2021-02-22 20:13:14 -05:00
Jan Edmund Lazo
8becdec391
vim-patch:8.2.2259: Test_Executable() fails when using chroot (#13907)
Problem:    Test_Executable() fails when using chroot.
Solution:   Ignore the difference between "sbin" and "bin".
a387083b2f

Cherry-pick Test_Executable() changes from patches v8.1.1921, v8.2.1432
to be in sync with Vim.

N/A patches for version.c:

vim-patch:8.1.0509: checking cwd not accessible fails for root

Problem:    Checking cwd not accessible fails for root. (James McCoy)
Solution:   Skip this part of the test for root. (closes vim/vim#3595)
0b38f54730

vim-patch:8.2.2487: terminal shows garbage after double-wide character

Problem:    Terminal shows garbage after double-wide character with a
            combining character. (Kyoichiro Yamada)
Solution:   Libvterm: do not add the width of the combining character to the
            glyph width. (closes vim/vim#7801)
4549dad874

vim-patch:8.2.2488: json_encode() gives generic argument error

Problem:    json_encode() gives generic argument error.
Solution:   Mention the type that can't be encoded. (issue vim/vim#7802)
a853089479
2021-02-08 22:10:43 -05:00
Jan Edmund Lazo
75996a2cdd
vim-patch:8.2.1804: resolve('/') returns an empty string (#13121)
Problem:    resolve('/') returns an empty string.
Solution:   Don't remove single slash. (closes vim/vim#7074)
50c4e9e08f

Cherry-pick the test rename from Test_resolve() to Test_resolve_unix()
from patch 8.1.0894.

N/A patches for version.c:

vim-patch:8.1.0929: no error when requesting ConPTY but it's not available

Problem:    No error when requesting ConPTY but it's not available.
Solution:   Add an error message. (Hirohito Higashi, closes vim/vim#3967)
5acd987258

vim-patch:8.1.1535: popup select test fails on Mac

Problem:    Popup select test fails on Mac.
Solution:   Skip test if clipboard feature not available.
650a63748c

vim-patch:8.1.1536: popup select test still fails on Mac

Problem:    Popup select test still fails on Mac.
Solution:   Set 'clipboard' to "autoselect"
1755ec4278

vim-patch:8.1.1604: popup window scroll test is flaky

Problem:    Popup window scroll test is flaky.
Solution:   Add a delay between scroll events.
13b47c37a6

vim-patch:8.1.1668: popup window test is a bit flaky on some systems

Problem:    Popup window test is a bit flaky on some systems.
Solution:   Clear the command line. (Naruhiko Nishino, closes vim/vim#4656)
8ccabf624e

vim-patch:8.1.1935: test for text property popup window is flaky

Problem:    Test for text property popup window is flaky.
Solution:   Remove the undo message
57441d6fa0

vim-patch:8.1.2347: MacOS: build fails

Problem:    MacOS: build fails.
Solution:   Don't define _XOPEN_SOURCE for Mac.
84f903326d

vim-patch:8.2.0351: terminal in popup test is still a bit flaky

Problem:    Terminal in popup test is still a bit flaky.
Solution:   Clear and redraw before opening the popup.
3e919d2924

vim-patch:8.2.0752: terminal in popup window test is a bit flaky

Problem:    Terminal in popup window test is a bit flaky.
Solution:   Wait for shell job status to be "run".  Mark as flaky test.
e06a28f5e3

vim-patch:8.2.1087: possible memory leak when file expansion fails

Problem:    Possible memory leak when file expansion fails.
Solution:   Clear the grow array when returning FAIL.  Use an error message
            instead of an empty string.
566cc8c72b

vim-patch:8.2.1863: json code not sufficiently tested

Problem:    Json code not sufficiently tested.
Solution:   Add more test cases. (Dominique Pellé, closes vim/vim#7166)
e3c65ce4e5
2020-10-20 09:29:34 -04:00
skippi
8c9d9fa304 vim-patch:8.2.0868: trim() always trims both ends
Problem:    trim() always trims both ends.
Solution:   Add an argument to only trim the beginning or end. (Yegappan
            Lakshmanan, closes vim/vim#6126)
2245ae18e3
2020-10-17 14:07:35 -05:00
Jan Edmund Lazo
e22c15682a
test/old: enable passing tests
Some TODO tests are passing now.

test_override('ALL', 1) clears previous overrides
so it's safe to comment out and execute the test.

Replace test_feedinput() with nvim_input().
Replace test_setmouse with nvim_input_mouse().
Note that test_setmouse is 1-based and nvim_input_mouse is 0-based.
2020-09-26 10:14:50 -04:00
Jan Edmund Lazo
d3e0d29919
vim-patch:8.2.0824: still not enough memory allocated when converting string
Problem:    Still not enough memory allocated when converting string with
            special character.
Solution:   Reserve space for expanding K_SPECIAL. (closes vim/vim#6130)
1919371b2b
2020-09-19 10:57:57 -04:00
Jan Edmund Lazo
ccfb69ab36
vim-patch:8.2.0817: not enough memory allocated when converting string
Problem:    Not enough memory allocated when converting string with special
            character.
Solution:   Reserve space for modifier code. (closes vim/vim#6130)
f7271e8316

Cherry-pick Test_eval(), Test_nr2char() from patch 8.2.0448.
2020-09-19 10:57:57 -04:00
Jan Edmund Lazo
31513a6f2d
vim-patch:8.1.1972: no proper test for getchar()
Problem:    No proper test for getchar().
Solution:   Add a test with special characters.
5d712e4672

N/A patches for version.c:

vim-patch:8.1.0285: compiler warning for conversion

Problem:    Compiler warning for conversion.
Solution:   Add a type cast. (Mike Williams)
d7cc163570

vim-patch:8.1.1782: MS-Windows: system() has temp file error with 'noshelltemp'

Problem:    MS-Windows: system() has temp file error with 'noshelltemp'.
Solution:   Check s_dont_use_vimrun. (Ken Takata, closes vim/vim#4754)
0e6bfb9b2e

vim-patch:8.2.0240: using memory after it was freed

Problem:    Using memory after it was freed. (Dominique Pelle)
Solution:   Do not mix converion buffer with other buffer.
408030e8d0

vim-patch:8.2.1549: "r" fails if 'esckeys' is off and modifyOtherKeys is used

Problem:    The "r" command fails for keys with modifiers if 'esckeys' is off
            and modifyOtherKeys is used. (Lauri Tirkkonen)
Solution:   Temporarily disable bracketed paste and modifyOtherKeys if
            'esckeys' is off. (closes vim/vim#6809)
ca774f6753

vim-patch:8.2.1676: compiler warnings for function typecast

Problem:    Compiler warnings for function typecast.
Solution:   Add an intermediate cast to "void *".
a4224860a4

vim-patch:8.2.1696: unused (duplicate) macros

Problem:    Unused (duplicate) macros.
Solution:   Remove the macros.
2c12f89055
2020-09-19 10:57:35 -04:00
Jan Edmund Lazo
107e50b25e
vim-patch:8.2.1517: cannot easily get the character under the cursor
Problem:    Cannot easily get the character under the cursor.
Solution:   Add the {chars} argument to strpart().
6c53fca023
2020-08-23 18:32:39 -04:00
Hennadii Chernyshchyk
d2766b06c8
vim-patch:8.1.1120: cannot easily get directory entry matches #12222
Problem:    Cannot easily get directory entry matches.
Solution:   Add the readdir() function. (Yasuhiro Matsumoto, closes vim/vim#2439)
543c9b1921

closes #12212
2020-05-05 08:15:45 -07:00
Jan Edmund Lazo
5726272559
vim-patch:8.2.0507: getbufvar() may get the wrong dictionary
Problem:    Getbufvar() may get the wrong dictionary. (David le Blanc)
Solution:   Check for empty name. (closes vim/vim#5878)
5259275347
2020-04-13 12:00:34 -04:00
Jan Edmund Lazo
53fdd76181
vim-patch:8.1.1568: strftime() test fails on MS-Windows
Problem:    Strftime() test fails on MS-Windows.
Solution:   Skip the check for using the $TZ environment variable.
87652a7e3b
2020-03-29 14:17:57 -04:00
Jan Edmund Lazo
10c5434f9c
vim-patch:8.1.1567: localtime_r() does not respond to $TZ changes
Problem:    Localtime_r() does not respond to $TZ changes.
Solution:   If $TZ changes then call tzset(). (Tom Ryder)
db51730df1
2020-03-29 13:17:03 -04:00
Jan Edmund Lazo
d79164c9f9 vim-patch:8.1.0992: :normal resets reg_executing() result #11398
Problem:    A :normal command while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes vim/vim#4066)
cce713ddcc
2019-11-16 00:34:25 -08:00
erw7
9db60b06a1 vim-patch:8.1.0515: reloading a script gives errors for existing functions
Problem:    Reloading a script gives errors for existing functions.
Solution:   Allow redefining a function once when reloading a script.
ded5f1bed7
2019-09-04 13:40:05 +09:00
Marco Hinz
09cbd6769b vim-patch:8.1.1932: ml_get errors after append() #10866
Problem:  Ml_get errors after using append(). (Alex Genco)
Solution: Do not update the cursor twice.

d20070274c

fix #10847
2019-08-27 23:50:55 +02:00
Daniel Hahler
77729b0800 vim-patch:8.1.0811: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
30276f2beb
2019-08-22 05:06:30 +02:00
Daniel Hahler
7adea68c1e
oldtest: windows: revert setting shellslash individually (#10189)
* Revert "oldtests: win: shellslash for cdpath,tags,:find"

This reverts commit 6245b4873d.

* Revert "oldtests: set shellslash for ":cd" test"

This reverts commit eba1ebafe5.

* Revert "oldtests: set shellslash in Test_shellescape()"

This reverts commit e428fc4b52.

* Revert "fixup! vim-patch:8.0.1782: no simple way to label quickfix entries"

This reverts commit ac1fbc2860.

* Revert "test/old: pass Test_statusline on Windows"

This reverts commit 6efa3bff09.

* Revert "oldtests: set shellslash for Test_non_zero_arg"

This reverts commit 42e1e2495c.

* Revert "oldtests: set shellslash in Test_true_false_arg()"

This reverts commit 8bd194f98a.

* Remove unnecessary set shellslash

Since #10679 no longer requires individual set shellslash, it is removed.


Co-Authored-By: erw7 <erw7.github@gmail.com>
2019-08-20 22:01:58 +02:00
Edd Barrett
b7ce589cb8 CI/OpenBSD: run oldtest #10797
- Test_libcall_libcallnr: pass libc name to dlopen.
2019-08-18 12:44:05 +02:00
Daniel Hahler
b8fcf62da9
vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)
Problem:    Exepath() doesn't work for "bin/cat".
Solution:   Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
            closes vim/vim#4710)
d08b8c4c04

Fixes https://github.com/neovim/neovim/issues/10554.
2019-07-24 22:23:00 +02:00
Shougo Matsushita
5f7e0531c1 vim-patch:8.1.1611: bufadd() reuses existing buffer without a name
Problem:    Bufadd() reuses existing buffer without a name.
Solution:   When the name is empty always create a new buffer.
892ae723ab
2019-07-06 17:11:27 +09:00
Shougo Matsushita
3f6346b732 vim-patch:8.1.1610: there is no way to add or load a buffer without side effects
Problem:    There is no way to add or load a buffer without side effects.
Solution:   Add the bufadd() and bufload() functions.
15e248e37f
2019-07-06 17:09:56 +09:00
Jan Edmund Lazo
87d6b1eccb vim-patch:8.1.0347: some tests fail on Solaris
Problem:    Some tests fail on Solaris.
Solution:   Skip writefile test. Fix path to libc.so. Improve test for Turkish
            case change. (Libor Bukata, Bjorn Linse, closes vim/vim#3403)
f1c118be93
2019-06-23 23:20:29 -04:00
Jan Edmund Lazo
d4de2cd7c7 vim-patch:8.1.0086: no tests for libcall() and libcallnr()
Problem:    No tests for libcall() and libcallnr().
Solution:   Add tests. (Dominique Pelle, closes vim/vim#2982)
1ceebb4efc
2019-06-23 23:20:29 -04:00
Jan Edmund Lazo
b2a11515b2 vim-patch:8.1.1077: reg_executing() is reset by calling input()
Problem:    reg_executing() is reset by calling input().
Solution:   Implement a more generic way to save and restore reg_executing.
            (Ozaki Kiichi, closes vim/vim#4192)
9a2c091a74
2019-05-26 20:58:57 -04:00
Jan Edmund Lazo
2393611588 vim-patch:8.1.0995: a getchar() call resets the reg_executing() result
Problem:    A getchar() call while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes vim/vim#406
f0fab3046c
2019-05-26 20:55:44 -04:00
Jan Edmund Lazo
21f160746a vim-patch:8.1.0020: cannot tell whether a register is executing or recording
Problem:    Cannot tell whether a register is being used for executing or
            recording.
Solution:   Add reg_executing() and reg_recording(). (Hirohito Higashi,
            closes vim/vim#2745)  Rename the global variables for consistency.  Store
            the register name in reg_executing.
0b6d911e5d
2019-05-26 20:24:11 -04:00
erw7
3be5aa1a34 test/win: executable(), exepath() #9516 2019-04-01 03:13:11 +02:00
Jan Edmund Lazo
11f03ee3f3 vim-patch:8.1.1095: win: executable() on very long name #9820
Problem:    MS-Windows: executable() fails on very long filename.
Solution:   (Ken Takata, closes vim/vim#4015)
8662189736
2019-03-31 13:29:16 +02:00
Jan Edmund Lazo
6b3775bbe2 vim-patch:8.1.0189: function defined in sandbox not tested
Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
d90a144eda
2019-03-23 01:26:13 -04:00
Jan Edmund Lazo
e428fc4b52 oldtests: set shellslash in Test_shellescape()
Value of "&shell" does not affect "shellescape()".
2019-03-08 02:12:12 -05:00
Justin M. Keyes
3b2d5317a5
vim-patch:8.1.0225: mode() does not indicate using CTRL-O from Insert mode (#9644)
Problem:    Mode() does not indicate using CTRL-O from Insert mode.
Solution:   Add "niI", "niR" and "niV" to mode() result. (closes vim/vim#3000)
612cc3888b
2019-02-24 21:44:31 +01:00
Jan Edmund Lazo
f08869cff2 vim-patch:8.1.0511: ml_get error when calling a function with a range (#9207)
Problem:    ml_get error when calling a function with a range.
Solution:   Don't position the cursor after the last line.
9e353b5265
2018-11-06 13:49:20 +01:00
Jan Edmund Lazo
c64d6702e5 vim-patch:8.1.0459: Test_executable fails when there is a dog in the system
Problem:    Test_executable fails when there is a dog in the system.
Solution:   Rename the dog. (Hirohito Higashi)
a05a0d325c
2018-10-08 16:35:46 -04:00
Jan Edmund Lazo
1892d28c60 oldtests: win: fix executable() assertions
Windows has "Read and execute" permission via ACL
but nvim and libuv do not support ACL.
Windows does not support the executable bit in chmod-style permissions
but it is safe to assume that if the file exists and is readable,
then it is most likely executable.
This means that win.ini and shell32.dll are "executable"
because they exist, are readable, and are in PATH.

PATHEXT does not affect the executable permission of a file;
it exists to run files on the shell while omitting the file extension.
Assume that PATHEXT is intended for cmd.exe only
because powershell can execute powershell files (ie. *.ps1)
without changing PATHEXT or related cmd.exe environment variable.

In the future, nvim should check the outputs of 'assoc' and 'ftype',
cmd.exe internal commands, or check the registry.
Powershell can be used for ACL if C++/C# API is too difficult to use.
2018-10-08 12:34:24 -04:00
Jan Edmund Lazo
f25f42bf03 vim-patch:8.1.0453: MS-Windows: executable() is not reliable
Problem:    MS-Windows: executable() is not reliable.
Solution:   Use $PATHEXT properly. (Yasuhiro Matsumoto, closes vim/vim#3412)
8295666dc2
2018-10-07 10:30:29 -04:00
Jan Edmund Lazo
ab3a4a4896 vim-patch:8.1.0454: resolve() was not tested with a symlink cycle
Problem:    resolve() was not tested with a symlink cycle.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3513)
2610990709
2018-10-06 11:42:15 -04:00
Jan Edmund Lazo
822ae1a81c vim-patch:8.1.0303: line2byte() is wrong for last line with 'noeol'
Problem:    line2byte() is wrong for last line with 'noeol' and 'nofixeol'.
Solution:   Fix off-by-one error. (Shane Harper, closes vim/vim#3351)
c26f7c6053
2018-08-21 10:20:17 -04:00
Jan Edmund Lazo
163680a58e vim-patch:8.0.1630: trimming white space is not that easy
Problem:    Trimming white space is not that easy.
Solution:   Add the trim() function. (Bukn, closes vim/vim#1280)
295ac5ab5e
2018-08-13 12:04:36 -04:00