Commit Graph

15 Commits

Author SHA1 Message Date
dundargoc
052498ed42 test: improve test conventions
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
2024-04-23 18:17:04 +02:00
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
Lewis Russell
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
Justin M. Keyes
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
Justin M. Keyes
2c9f22e7e4
refactor(test): cleanup #25614
- unnecessary separate describe() group
- clear() wasn't called in the describe() group
- unnecessary indirection in function parameters
2023-10-12 07:04:16 -07:00
zeertzjq
4eea60939f
test(core/path_spec): don't use fnameescape() (#25593)
Using fnameescape() for the path argument of findfile() and finddir() is
wrong, as fnameescape() is intended to be used for parts of Ex commands,
not function arguments.
2023-10-11 07:24:37 +08:00
Leonardo Mello
81f67b79e8
fix(file_search): path with spaces in finddir() and findfile() (#25493)
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-10 06:08:58 +08:00
Justin M. Keyes
133e2990ef refactor: cleanup 2023-10-06 14:09:21 +02:00
Leonardo Mello
1dd700a8d9 fix: gf fails on "foo/bar.txt:1:2" on Windows
Problem:
On Windows, "gf" fails on a filepath that has a line:column suffix.
Example:

    E447: Can't find file "src/app/core/services/identity/identity.service.ts:64:23"

Solution:
- Remove ":" from 'isfname' on Windows. Colon is not a valid filename
  character (except for the drive-letter).
- Handle drive letters specially in file_name_in_line().

Fixes #25160
2023-10-06 12:59:58 +02:00
Leonardo Mello
1e7e9ee91f
fix(path): accept special characters on Windows (#25424) 2023-10-04 06:04:19 +08:00
dundargoc
5eb5f49488
test: simplify platform detection (#21020)
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.
2022-11-22 08:13:30 +08:00
zeertzjq
cfdb4cbada
fix: find multibyte file name in line (#20519)
And remove unnecessary unsigned casts in fold marker comparison.
2022-10-07 09:43:16 +08:00
Justin M. Keyes
6f7754dfa0 test: avoid extra clear() calls
also: various other cleanup
2017-10-02 01:46:16 +02:00
Ignas Anikevicius
2b133101cf win: vim_FullName(): force backslashes #7287
- Replace obvious cases of '/' literal with PATHSEP. (There are still
  some remaining cases that need closer inspection.)
- Fixup tests: ui/screen_basic

closes #7117
ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
2017-10-02 00:48:30 +02:00