Commit Graph

15 Commits

Author SHA1 Message Date
Lewis Russell
81fc27124b refactor(test): inject after_each differently 2024-04-10 15:53:50 +01:00
dundargoc
7035125b2b test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
2024-04-08 22:51:00 +02:00
Justin M. Keyes
c3836e40a2
build: enable lintlua for test/unit/ dir #26396
Problem:
Not all Lua code is checked by stylua. Automating code-style is an
important mechanism for reducing time spent on accidental
(non-essential) complexity.

Solution:
- Enable lintlua for `test/unit/` directory.
- TODO: only `test/functional/` remains unchecked.

previous: 45fe4d11ad
previous: 517f0cc634
2023-12-04 14:32:39 -08:00
zeertzjq
419819b624
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem:    CTRL-X on 2**64 subtracts two. (James McCoy)
Solution:   Correct computation for large number. (closes vim/vim#12103)

5fb78c3fa5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 09:18:42 +08:00
dundargoc
0b0c4f7dfa
chore: fix typos (#16816)
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-04 11:07:40 -07:00
Sean Dewar
90a4cf92d2
vim-patch:8.2.0886: cannot use octal numbers in scriptversion 4
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes vim/vim#5304)
c17e66c5c0

:scriptversion is N/A.

Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
 - v8.2.2324
 - 2346a63784
 - 11e3c5ba82
 - 82be4849ee

Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.

Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.

This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
2021-09-11 15:36:03 +01:00
Sean Dewar
b6d9e92805
vim-patch:8.1.2036: the str2nr() tests fail
Problem:    The str2nr() tests fail.
Solution:   Add missing part of patch.
1ac90b4fa6

Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the
included ones in this patch are somewhat lacking.
2021-09-11 15:33:20 +01:00
Sean Dewar
34cb087955
vim-patch:8.1.1355: obvious mistakes are accepted as valid expressions
Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes vim/vim#3981)
16e9b85113

Update vim_str2nr_spec.lua to add more tests that use strict = true.
2021-09-11 15:33:19 +01:00
ZyX
fbdc3ac4ef tests: Fix linter errors 2017-12-03 20:22:09 +03:00
ZyX
0b4054e043 unittests: Reduce memory used by vim_str2nr test 2017-11-30 11:48:23 +03:00
ZyX
05a3c12118 unittests: Run vim_str2nr tests with GC enabled 2017-11-19 23:36:40 +03:00
ZyX
64158f2b0b unittests: Populate ARGTYPES in child process only 2017-11-19 22:32:02 +03:00
ZyX
4aebd00a9e *: Fix linter errors 2017-11-06 20:28:37 +03:00
ZyX
42959d0e8f unittests: Add tests for vim_str2nr 2017-11-06 20:15:05 +03:00
ZyX
d98199de9c charset: Refactor vim_str2nr 2017-11-06 01:17:38 +03:00