Commit Graph

67 Commits

Author SHA1 Message Date
Maxime Coste
019fbc5439 Cleanup and speed up test runner
Add a -end-of-line switch to echo command to make it possible
to use `echo -end-of-line -to-file <file>` to collect env-vars
2023-03-14 09:01:13 +11:00
Sidharth Kshatriya
4d3a057a03 Bug: The enabled test checks, though they exist are never actually run
Fix by copying the `enabled` check file, if it exists to where the tests are being run
2021-12-14 16:53:41 +05:30
Maxime Coste
40e3614cf4 Prevent overwriting existing file in :write <explicit filename>
Add a -force (equivalent to w!) switch that enables overwriting.
2021-07-20 22:30:41 +10:00
Maxime Coste
841ec2e588 Support a DEBUGGER env-var to run tests
Setting it to `gdbserver :12345` makes it easy to debug a test
case with the correct setup.
2021-01-22 17:21:59 +11:00
Maxime Coste
74e3e5efd3 Drain ui-out to avoid deadlock with small pipe buffers 2020-06-10 09:26:32 +10:00
Maxime Coste
65620fb830 Display all failing ui_out in tests instead of just the first one 2020-04-27 17:39:21 +10:00
Maxime Coste
952aa0ed0a Drop trailing EOL in test commands 2020-04-13 13:36:29 +10:00
Maxime Coste
0282cc022e Use %file in the test run script instead of %sh 2020-03-14 13:52:04 +11:00
Maxime Coste
8528dcd621 Fix test/run ui_out diff display 2019-11-24 18:11:29 +11:00
Jason Felice
e888f4341c test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
Jason Felice
2b1ca43328 test: Clear socket correctly when XDG_RUNTIME_DIR is set 2019-10-13 14:56:55 -04:00
Maxime Coste
c9858bb6d1 Fix tests with new opt-in quoting 2019-06-23 12:04:21 +10:00
Alex Leferry 2
25630f4c91 Refactor colorize function away from the test script 2019-03-12 23:22:03 +01:00
Dimitri Merejkowsky
0b9164e7bc Fix wording used in test runner 2019-02-17 11:21:26 +11:00
Frank LENORMAND
0b8899d1d4 src: Rename auto_complete to autocomplete
Removing the underscore seems to make the option name more
in line with the others (even though some do use a separator,
e.g. `disabled_hooks`).
2018-07-19 18:57:33 +03:00
Maxime Coste
bde726d034 Change autoshowcompl to auto_complete with insert|prompt possible values 2018-07-15 11:10:32 +10:00
Maxime Coste
b5dd9f4094 test/run: Fix script post hook behaviour change 2018-07-05 07:54:28 +10:00
Maxime Coste
43b72770ec Fix wrong logic for moving filedescriptors leading to closed stdin
With this fix, tests can now use /dev/null as stdin.

Fixes #2165
2018-06-28 22:56:50 +10:00
Maxime Coste
a64afd7f1a test/run: Support a "ui-in" file containing json-rpc messages
With this "ui-in", tests can execute json-rpc commands from the UI
at startup to set a specific UI state.
2018-05-19 14:15:16 +10:00
Maxime Coste
851494a374 test/run: Rename "display" expected ui output file as "ui-out" 2018-05-19 14:15:16 +10:00
Delapouite
a6a1c34288 Add -lock switch to enter-user-mode command 2018-02-27 19:55:00 +01:00
Maxime Coste
cda1fdafe2 test: fix run script after changes jump list behaviour
source the rc file *after* selecting the target text to ensure
eventual hooks will not interfere.
2018-02-24 20:59:31 +11:00
Maxime Coste
fbe68f375e test: fix run script use of non standard \+ in sed regex 2018-02-07 19:38:13 +11:00
Maxime Coste
1371148588 test: fix support for '(' in initial selected text 2017-12-03 17:12:33 +08:00
Maxime Coste
641acc5943 Do not allow repeating last insert when we are not in normal mode
<a-;>. is not accepted anymore. Note that <a-;> are not repeatable
currently anyway (That could be fixed, athough not trivial).
Fixes #1469
2017-06-27 09:57:10 +01:00
Maxime Coste
8bee02c8bb Use more correct [ -f <file> ] in test runner 2017-06-15 12:44:50 +01:00
Maxime Coste
d0d38da3c5 Refactor test run script 2017-02-21 23:26:39 +00:00
Maxime Coste
a0c787e966 Fix more uses of echo in the test run script 2016-12-17 10:43:02 +00:00
Maxime Coste
f69495ea71 Use printf instead of echo for displaying modified lines
Avoid eventual interpretation of escapes in the line.
2016-12-17 10:36:00 +00:00
Maxime Coste
f200079069 Respect TMPDIR in test run script 2016-12-17 10:26:37 +00:00
Maxime Coste
01417471b9 Change the test session name to avoid hitting the unix socket path length limit
On travis-ci, it seems the combination of a set TMPDIR and long sessions names
makes the test framework hit the path lenght limit.
2016-12-16 19:49:39 +00:00
Maxime Coste
fef37e6a92 Do not preserve registers by default when exec/eval in a non draft context
Fixes #700
2016-06-20 19:40:49 +01:00
Maxime Coste
63ac752916 Improve test script 2016-05-10 13:51:00 +01:00
Maxime Coste
1160c51dc4 Improve test runscript to avoid false positives when an output is not generated 2016-05-10 13:43:19 +01:00
Maxime Coste
39762f0cf0 preserve diff leading whitespaces when displayin them in the test runner 2016-05-10 09:38:47 +01:00
Maxime Coste
d3bcf8c21e Fix handling of expected to fail tests 2016-04-27 09:48:35 +01:00
Maxime Coste
8cae7097f4 Fix test runner use of sed -r 2016-04-27 09:47:49 +01:00
Maxime Coste
544ec7e385 Update test run script, was not writing test name in some cases 2016-03-17 11:37:35 +00:00
Maxime Coste
79782fb903 Do not use echo -n in test runner, -n is not standard 2016-03-08 23:55:15 +00:00
Maxime Coste
ead6865350 Add an initial highlighting test 2016-03-08 13:42:27 +00:00
Maxime Coste
114f9c876d Detect if the debug buffer exists before displaying it in test runner 2016-03-08 00:25:14 +00:00
Maxime Coste
4d4f18a78a Select ui at launch through the -ui <ui_name> switch 2016-03-07 21:44:50 +00:00
Maxime Coste
24d4ee870f Fix test runner to consider Kakoune returning non 0 as a failure 2016-03-03 13:57:46 +00:00
Frank LENORMAND
bc3d04f111 Fix populating the stderr file, strip the coordinates of the error from it 2015-12-15 11:13:04 +03:00
Frank LENORMAND
6129f1b049 Adapt the changes to a smarter way of testing kak for failures 2015-12-14 15:35:23 +03:00
Frank LENORMAND
d63238ed9d Allow unit tests to test for errors. 2015-12-12 12:06:16 +03:00
Enrico Lumetti
62f73b6a7c Display unit tests in alphabetical order 2015-12-07 16:40:18 +01:00
Maxime Coste
20bd4173e2 Support auto disabling of unit tests with an optional enabled script
Restore the unicode test case using that.
2015-11-16 21:17:23 +00:00
Maxime Coste
832e9155fa Code cleanup in the test running script 2015-10-17 11:33:09 +01:00
Maxime Coste
70dfb4ba6b Fix test handling of ' and rotate-content test 2015-06-21 19:36:53 +01:00