Mercurial > vim
changeset 36237:d3c5036a8e12 v9.1.0757
patch 9.1.0757: tests: messages files contains ANSI escape sequences
Commit: https://github.com/vim/vim/commit/075ab5ab3b8abc55baddce7105e22b6fa1b2e032
Author: Christian Brabandt <cb@256bit.org>
Date: Thu Oct 3 16:38:52 2024 +0200
patch 9.1.0757: tests: messages files contains ANSI escape sequences
Problem: tests: messages files contains ANSI escape sequences
Solution: filter those out in runtests.vim
Also, since we are setting $LC_ALL, we don't need to set $LANG and
$LANGUAGE since those are overridden by $LC_ALL anyhow.
closes: #15788
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 03 Oct 2024 16:45:02 +0200 |
parents | d2c4da2ad98f |
children | 5a6020ca3343 |
files | src/testdir/Makefile src/testdir/runtest.vim src/version.c |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -12,7 +12,7 @@ SCRIPTSOURCE = ../../runtime # Comment out this line to see the verbose output of tests. # # Catches SwapExists to avoid hanging at the ATTENTION prompt. -REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($$0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}' +REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C awk '/Executing Test_/{match($$0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}' # Uncomment this line to use valgrind for memory leaks and extra warnings. # The output goes into a file "valgrind.testN"
--- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -522,11 +522,11 @@ func FinishTesting() " Add SKIPPED messages call extend(s:messages, s:skipped) - " Append messages to the file "messages" + " Append messages to the file "messages", but remove ANSI Escape sequences split messages call append(line('$'), '') call append(line('$'), 'From ' . g:testname . ':') - call append(line('$'), s:messages) + call append(line('$'), s:messages->map({_, val -> substitute(val, '\%x1b\[\d\?m', '', 'g')})) write qall!