patch 9.1.0757: tests: messages files contains ANSI escape sequences

Commit: 
https://github.com/vim/vim/commit/075ab5ab3b8abc55baddce7105e22b6fa1b2e032
Author: Christian Brabandt <c...@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 <c...@256bit.org>

diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 7a4c4c484..b6e8c8024 100644
--- 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) "
"; 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) "
"; fflush()}'
 
 # Uncomment this line to use valgrind for memory leaks and extra warnings.
 #   The output goes into a file "valgrind.testN"
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 133993d4f..7ac48455e 100644
--- 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!
diff --git a/src/version.c b/src/version.c
index 633c1e6d5..2f01df8c6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    757,
 /**/
     756,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1swN4g-00944u-NL%40256bit.org.

Raspunde prin e-mail lui