]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1522: tests: still some ANSI escape sequences in test output v9.1.1522
authorChristian Brabandt <cb@256bit.org>
Mon, 7 Jul 2025 18:03:03 +0000 (20:03 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 7 Jul 2025 18:03:03 +0000 (20:03 +0200)
Problem:  tests: still some ANSI escape sequences in test messages output
Solution: update the cleanup regexp to also handle those ANSI escape
          sequences: `<esc>|2h` and `<esc>|31H` like in this log output:

```
2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in   4.739708 seconds<esc>|31H
```

related: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/runtest.vim
src/version.c

index f97c432930b69ccfbaf5189b47acf4ce706f238c..5028a85f677bafdf6a24d5246931acfc0227aea5 100644 (file)
@@ -540,7 +540,7 @@ func FinishTesting()
   split messages
   call append(line('$'), '')
   call append(line('$'), 'From ' . g:testname . ':')
-  call append(line('$'), s:messages->map({_, val -> substitute(val, '\%x1b\[\d\?m', '', 'g')}))
+  call append(line('$'), s:messages->map({_, val -> substitute(val, '\%x1b[[|]\(\d\?\|\d\+\)[hm]', '', 'g')}))
   write
 
   qall!
index e87aa4ecdbf876a80f9afa7e747483a511d19600..ba1034138e5acd8b56a19e6b4ff76117e1af59da 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1522,
 /**/
     1521,
 /**/