Jonathan de Boyne Pollard
838277e28a
test: fix bashisms ( #6791 )
2017-06-01 00:46:00 +02:00
Justin M. Keyes
4c5398bc40
startup: v:progpath fallback: path_guess_exepath
...
If procfs is missing then libuv cannot find the exe path.
Fallback to path_guess_exepath(), adapted from Vim findYourself().
Closes #6734
2017-05-15 15:01:52 +02:00
ZyX
f4d5d5250a
eval: Refactor get_user_input to support dictionary
2017-05-10 15:52:48 +03:00
ZyX
04e7eb1e29
tests: Add tests for vim_strchr
2017-05-09 14:41:23 +03:00
Justin M. Keyes
8f346a322b
test/fs: sanity check for literal "~" directory ( #6579 )
...
If the CWD contains a directory with the literal name "~" then the tests
will have bogus failures.
2017-04-24 22:45:03 +02:00
ZyX
d463c9e03a
Merge branch 'master' into lazier-arg_errmsg-gettext
2017-04-21 00:33:12 +03:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
b54e5c220f
unittests: Add a test for TV_CSTRING
...
Not using enum{} because SIZE_MAX exceeds integer and I do not really like how
enum definition is described in C99:
1. Even though all values must fit into the chosen type (6.7.2.2, p 4) the type
to choose is still implementation-defined.
2. 6.4.4.3 explicitly states that “an identifier declared as an enumeration
constant has type `int`”. So it looks like “no matter what type was chosen
for enumeration, constants will be integers”. Yet the following simple
program:
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
enum { X=SIZE_MAX };
int main(int argc, char **argv)
{
printf("x:%zu m:%zu t:%zu v:%zu",
sizeof(X), sizeof(SIZE_MAX), sizeof(size_t), (size_t)X);
}
yields one of the following using different compilers:
- clang/gcc/pathcc: `x:8 m:8 t:8 v:18446744073709551615`
- pcc/tcc: `x:4 m:8 t:8 v:1844674407370955161`
If I remove the cast of X to size_t then pcc/tcc both yield `x:4 m:8 t:8
v:4294967295`, other compilers’ output does not change.
All compilers were called with `$compiler -std=c99 -xc -` (feeding program
from echo), except for `tcc` which has missing `-std=c99`. `pcc` seems to
ignore the argument though: it is perfectly fine with `-std=c1000`.
2017-04-14 23:58:47 +03:00
Justin M. Keyes
7c4e5dfd27
win: os_shell_is_cmdexe() + tests
2017-04-12 02:28:43 +02:00
Justin M. Keyes
699e8406b5
Merge #6439 from ZyX-I/fix-gc-failures
...
unittests: Force GC, fix GC failures in typval_spec
2017-04-09 04:05:07 +02:00
ZyX
967fa96eb2
unittests: Fix linter error
2017-04-09 03:39:37 +03:00
ZyX
8990490b50
unittests: Move allocating vimconv_T to a function
2017-04-09 03:36:18 +03:00
ZyX
233e71419e
unittests: Do not GC typval_T which is owned by a di
2017-04-09 03:36:18 +03:00
ZyX
bac870433b
unittests: Do not unref partial which is owned by Callback structure
2017-04-09 03:36:17 +03:00
ZyX
44cd4e63f5
unittests: Use Neovim memory allocation for vimconv_T
...
Not sure whether this is going to fix things though, but core dump does not
contain Neovim functions in stack in this case.
2017-04-09 03:36:17 +03:00
ZyX
94c1af7c41
unittests: Do not gc what is already freed
2017-04-09 03:36:17 +03:00
ZyX
dc9722326e
unittests: Do not alter p_enc in decode unit test
2017-04-08 19:20:41 +03:00
ZyX
a83511d1a1
unittests: Move checking cores to check_child_err
2017-04-08 04:48:58 +03:00
ZyX
654dd15bb8
unittests: Fix testlint failure
2017-04-07 00:46:52 +03:00
ZyX
271df03fa4
unittests: Force GC, fix GC failures in typval_spec
2017-04-06 07:29:15 +03:00
ZyX
dc75766081
tests: Fix testlint errors
2017-04-03 03:07:01 +03:00
ZyX
b10880dadc
eval: Make writefile() able to disable fsync()
2017-04-02 22:11:35 +03:00
Nikolai Aleksandrovich Pavlov
ddfa0359c6
unittests: Make it easier to determine on which _spec line it crashed ( #6424 )
...
Benchmarks:
Before change: 17.78s user 3.48s system 94% cpu 22.525 total
After change: 25.38s user 4.46s system 101% cpu 29.317 total
2017-04-02 13:25:47 +02:00
Justin M. Keyes
518f28f537
Merge #6422 from ZyX-I/fix-6420
...
eval,fileio: Omit additional fsync() call
2017-04-01 22:38:20 +02:00
ZyX
cc4523013f
eval,fileio: Omit additional fsync() call
...
Fixes #6420
2017-04-01 21:15:13 +03:00
ZyX
ac22238b6a
unittests: Replace two environment variables with one TRACE_LEVEL
2017-04-01 20:57:23 +03:00
ZyX
2d158dde02
unittests: Fix linter error
2017-04-01 13:17:25 +03:00
ZyX
708a55ee15
unittests: Disable non-C-calls
...
Some benchmarks:
TRACE_EVERYTHING: 79.45s user 12.68s system 124% cpu 1:13.94 total
(default): 30.26s user 5.30s system 89% cpu 39.663 total
2017-04-01 13:16:25 +03:00
ZyX
9dd0d4f8b9
unittests: Add trace description right to the error message
2017-04-01 12:52:28 +03:00
ZyX
046d6a8dfe
unittests: Collect traces
...
Some benchmarks:
MAIN_CDEFS + NO_TRACE: 3.81s user 1.65s system 33% cpu 16.140 total
MAIN_CDEFS: 73.61s user 10.98s system 154% cpu 54.690 total
NO_TRACE: 18.49s user 4.30s system 73% cpu 30.804 total
(default): 77.11s user 14.74s system 126% cpu 1:12.79 total
2017-04-01 12:25:10 +03:00
ZyX
8f7a48f46a
unittests: Split itp implementation into multiple functions
2017-04-01 11:19:41 +03:00
ZyX
933d60bc23
unittests: Do not hang when error message is too long
2017-04-01 11:07:08 +03:00
Nikolai Aleksandrovich Pavlov
a1c928e70c
ci: Do not hide ci directory ( #6410 )
2017-03-31 14:32:58 +02:00
ZyX
114eaa15f0
eval/typval,api/buffer: Fix review comments
2017-03-29 10:08:46 +03:00
ZyX
58e34e8d99
eval/typval: Allow NULL dict as tv_dict_get_callback() argument
...
Also removes NULL key input: tv_dict_find() does not allow this.
2017-03-29 10:08:46 +03:00
ZyX
8daf756fb6
unittests: Fix linter errors
2017-03-29 10:08:46 +03:00
ZyX
7826ee1c03
unittests: Add tv_get_string* tests
2017-03-29 10:08:46 +03:00
ZyX
e08b27ba4a
unittests: Add tv_get number tests
2017-03-29 10:08:46 +03:00
ZyX
4536c064e4
unittests: Move tv_dict_add* tests to a proper describe() block
2017-03-29 10:08:46 +03:00
ZyX
49195063fd
unittests: Add tv_check… tests
2017-03-29 10:08:46 +03:00
ZyX
389274bef7
unittests: Add tv_equal() tests
2017-03-29 10:08:46 +03:00
ZyX
630ff33dc1
unittests: Test locks section
2017-03-29 10:08:46 +03:00
ZyX
ed4948a933
unittests: Test tv_copy()
2017-03-29 10:08:46 +03:00
ZyX
f0bbd1e825
unittests: Add tests for tv_clear()
2017-03-29 10:08:46 +03:00
ZyX
e43de6bb3e
unittests: Add test for tv_dict_set_keys_readonly
2017-03-29 10:08:45 +03:00
ZyX
368a61c525
unittests: Add tv_dict_copy tests
2017-03-29 10:08:45 +03:00
ZyX
8b9a1fbf7a
unittests: Add tests for tv_dict_extend
2017-03-29 10:08:45 +03:00
ZyX
4987850cac
unittests: Add tv_dict_clear tests
2017-03-29 10:08:45 +03:00
ZyX
270a3889af
unittests: Add tv_dict_add* unit tests
...
Also fixes incorrect location of `tv_dict_add` function and three bugs in other
functions:
1. `tv_dict_add_list` may free list it does not own (vim/vim#1555 ).
2. `tv_dict_add_dict` may free dictionary it does not own (vim/vim#1555 ).
3. `tv_dict_add_dict` ignores `key_len` argument.
2017-03-29 10:08:45 +03:00
ZyX
bc87d23c28
unittests: Add tests for dictionary indexing
2017-03-29 10:08:45 +03:00