Commit Graph

34 Commits

Author SHA1 Message Date
Gregory Anders
8957df4f22 test: forward $VIMRUNTIME in child nvim instances 2023-12-07 11:54:22 -08:00
zeertzjq
6c3ddd8c51
test: set 'termguicolors' in outer Nvim instance (#26437)
Currently, the value of $COLORTERM in :terminal in tests depends on
outer environment because of 'notermguicolors'.

If $COLORTERM is not set in :terminal, an inner Nvim instance will try
to detect 'termguicolors' support, which may interfere with tests.

So set 'termguicolors' in outer Nvim instance unless $COLORTERM needs to
be overridden, and unset it in inner Nvim instance when running TUI.
2023-12-07 10:16:00 +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
dundargoc
736c36c02f
test: introduce skip() #21010
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
2022-11-13 05:52:19 -08:00
Andrey Bushev
4bb1d1df79 feat(terminal): recognize underdouble and undercurl 2022-09-26 11:53:20 +08:00
zeertzjq
995e487915
refactor(highlight)!: rename attributes to match Vim (#19159)
Ref: 84f5463630
Rename:
- `underlineline` to `underdouble`
- `underdot` to `underdotted`
- `underdash` to `underdashed`

`underdouble` also now takes higher precedence than `undercurl`.
2022-06-30 16:57:44 +08:00
Justin M. Keyes
f977f9445f refactor(tests): introduce testprg()
Also:
- Add a describe('shell :!') section to system_spec.
- Make the test for #16271 work on systems without powershell.
2022-06-25 08:27:17 -07:00
zeertzjq
6e414b698c
test: unskip tests on Windows (#18600)
Remove the command('qall!') from mksession_spec.lua because it prevents
helpers.rmdir() from retrying.

Allow extra trailing spaces when matching terminal lines.
2022-05-18 12:57:04 +08:00
dundargoc
e63e5d1dbd
docs: typo fixes (#17859)
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
2022-04-15 12:35:06 +02:00
Kirill Chibisov
96bb1784a6
fix(api): highlight attribute for underline
This commit fixes regression introduced in c365de1 when checking for
highlight attribute for underline was returning '0' when it was present

Fixes #17624.
2022-03-06 23:51:25 +03:00
Dundar Göc
82c5a02050 ci: skip tests that fail on windows 2022-02-20 10:22:39 +01:00
Björn Linse
f707a7ef68 terminal: add tests for palette color forwarding 2019-11-03 10:14:58 +01:00
Jaskaran Singh
3afb397407 syntax, TUI: support "strikethrough"
fix #3436

Includes:
vim-patch:8.0.1038: strike-through text not supported
2019-09-13 14:46:19 -07:00
Justin M. Keyes
fd0fd752c8 terminal: swap priority of terminal, editor highlights
closes #9964
2019-05-02 09:56:22 +02:00
Andrew Pyatkov
894f6bee54 :terminal : set topline based on window height #8325
closes #8324
closes #8556
2019-01-29 03:00:48 +01:00
Justin M. Keyes
32a30d90b4
highlight: Fix missing .rgb_sp_color in initializers (#9287)
terminal_get_line_attributes() had this bug for a long time, though it
likely had no effect visible to users.

ref #9028
ref 60f845ca55
2018-11-30 21:13:01 +01:00
erw7
4b1f21de75 win: support :terminal 2017-08-16 09:13:43 +02:00
ZyX
ba7d8bf0c2 functests: Fix terminal/highlight_spec 2017-04-09 03:24:22 +03:00
ZyX
65fb622000 functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:

1. msgpackparse() will show internal error: hash_add() in case of duplicate
   keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
   expected. Test was still functioning somehow though. Currently fixed.
2017-04-09 03:24:08 +03:00
Justin M. Keyes
44e6ee930f build: Target luacheck HEAD.
https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606

> If you really want to use bleeding-edge version you should get the
> rockspec from master branch, not a fixed commit ...
> The correct way to install from a specific commit is cloning that
> commit and running "luarocks make" from project directory. The reason
> is that running "install" or "build" on an scm rockspec fetches
> sources from master but uses build description from the rockspec
> itself, which may be outdated.
2016-11-17 00:55:39 +01:00
Stéphane Campinas
21eee40cdb test: synIDattr returns empty, not -1
- Behavior changed in 7.4.1547
- Also removed N/A specs: nvim does not support ":hi term=..."
2016-09-16 14:02:59 +02:00
Kerem Cakirer
0c536b5d8a syntax.c: Support bg/fg special color-names. #5319
Refresh colors if changing Normal group
2016-09-16 00:45:57 +02:00
Björn Linse
0ade1bb706 Merge pull request #5225 from equalsraf/windows-functionaltests
Enable functional tests in Appveyor
2016-08-31 21:39:42 +02:00
Björn Linse
c41bacc67c api/ui: add tests for popupmenu_external events
update screen.lua to use new style nvim_ui_attach
2016-08-29 10:17:31 +02:00
Rui Abreu Ferreira
39c628d031 Mark some functional tests as pending in Windows 2016-08-26 08:21:41 +01:00
Björn Linse
f332eba16c tests: don't ignore highlights in terminal tests 2016-08-14 21:53:02 +02:00
Justin M. Keyes
abeb2f020f test/highlight_spec: Test "gui" arg of synIDattr().
Also use less "regular" values for cterm colors.
2016-06-18 13:07:59 -04:00
Rom Grk
86b138b25d synIDattr(): return RRGGBB value for [fg|bg|sp]# #4851
add tests for synIDattr() with [fg|bg|sp]#

add tests for synIDattr and various #RGB colors

synIDattr: test for ui_rgb_attached()

test: fix tests for synIDattr fg/bg/sp
2016-06-18 12:25:11 -04:00
ZyX
ff470bb853 functests: Check logs in lua code
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
2016-06-10 21:50:49 +03:00
AdnoC
e5eea7fa06 test: Screen also checks 'special' when testing attribute equality 2016-05-17 16:36:41 -04:00
Marco Hinz
4a69e55f39 test/functional: clean up according to luacheck (part 1) 2015-11-23 13:57:21 +01:00
Marco Hinz
9d876eb037 Test: synIDattr(): true color awareness 2015-07-18 16:55:25 +02:00
Scott Prager
74aef89720 term: use an argument vector for termopen().
Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which
caused the functional tests to fail on some systems due to the process
not "owning" the terminal. Also, it is inconsistent with jobstart().

Modify termopen() so that &shell is not invoked, but maintain the old
behaviour with :terminal. Factor the common code for building the
argument vector from jobstart() and modify the functional tests to call
termopen() instead of :terminal (fixes #2354).

Also:
 * Add a 'name' option for termopen() so that `:terminal {cmd}` produces
   a buffer named "term//{cwd}/{cmd}" and termopen() users can customize
   the name.
 * Update the documentation.
 * Add functional tests for `:terminal` sinse its behaviour now differs
   from termopen(). Add "test/functional/fixtures/shell-test.c" and move
   "test/functional/job/tty-test.c" there, too.

Helped-by: Justin M. Keyes <@justinmk>
2015-05-02 09:47:29 -04:00
Thiago de Arruda
2aa2513b8e test: Add terminal tests
- Modify tty-test to allow easier control over the terminal
- Add a new directory with various terminal tests/specifications
- Remove a pending job/pty test.
- Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish)
- Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to
  deliver signals on OSX. Might be related to the problem fixed by
  @bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe
  to deliver signals to the main thread, which might be blocking in some
  situations)
2015-03-25 18:57:36 -03:00