Commit Graph

10 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
ZyX
8daf756fb6 unittests: Fix linter errors 2017-03-29 10:08:46 +03:00
ZyX
8b9a1fbf7a unittests: Add tests for tv_dict_extend 2017-03-29 10:08:45 +03:00
ZyX
5df35297f8 eval: Remove eval_expr() completely 2017-03-29 10:08:05 +03:00
ZyX
fb146e80aa eval: Split eval.c into smaller files 2017-03-29 10:05:06 +03:00
ZyX
9400466282 unittests: Check core dumps in after_each, like in functests 2017-03-11 23:23:49 +03:00
ZyX
12b062b2c8 unittests: Run all unit tests in their own processes
Used

    sed -r -i -e '/ helpers =/ s/$/\nlocal itp = helpers.gen_itp(it)/; s/^(\s*)it\(/\1itp(/' test/unit/**/*_spec.lua

to alter all tests. Locally they all run fine now.

Reasoning:

1. General: state from one test should not affect other tests.
2. Local: travis build is failing with something which may be an output of
   garbage collector. This should prevent state of the garbage collector from
   interferring as well.
2017-03-11 23:23:30 +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