summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-29 15:03:01 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-29 15:03:01 +0200
commit45df2a01a79d562b59949383f79625bb8bd89a69 (patch)
tree0c2227209684bbc13c5c79a7c39e49219263dec0 /src
parent9898107f54a330c6d9629976250a393169c698ca (diff)
downloadvim-git-45df2a01a79d562b59949383f79625bb8bd89a69.tar.gz
patch 8.2.1315: MS-Windows: test log contains escape sequencesv8.2.1315
Problem: MS-Windows: test log contains escape sequences. Solution: Do not use t_md and t_me but ANSI escape sequences. (Ken Takata, closes #6559)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/runtest.vim14
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 4 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index e42b0cabd..f3609f851 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -123,6 +123,12 @@ let s:srcdir = expand('%:p:h:h')
if has('win32')
" avoid prompt that is long or contains a line break
let $PROMPT = '$P$G'
+ " On MS-Windows t_md and t_me are Vim specific escape sequences.
+ let s:t_bold = "\x1b[1m"
+ let s:t_normal = "\x1b[m"
+else
+ let s:t_bold = &t_md
+ let s:t_normal = &t_me
endif
" Prepare for calling test_garbagecollect_now().
@@ -239,11 +245,11 @@ func RunTheTest(test)
let message ..= repeat(' ', 50 - len(message))
let time = reltime(func_start)
if has('float') && reltimefloat(time) > 0.1
- let message = &t_md .. message
+ let message = s:t_bold .. message
endif
let message ..= ' in ' .. reltimestr(time) .. ' seconds'
if has('float') && reltimefloat(time) > 0.1
- let message ..= &t_me
+ let message ..= s:t_normal
endif
endif
call add(s:messages, message)
@@ -312,9 +318,9 @@ func FinishTesting()
let message = 'Executed ' . s:done . (s:done > 1 ? ' tests' : ' test')
endif
if s:done > 0 && has('reltime')
- let message = &t_md .. message .. repeat(' ', 40 - len(message))
+ let message = s:t_bold .. message .. repeat(' ', 40 - len(message))
let message ..= ' in ' .. reltimestr(reltime(s:start_time)) .. ' seconds'
- let message ..= &t_me
+ let message ..= s:t_normal
endif
echo message
call add(s:messages, message)
diff --git a/src/version.c b/src/version.c
index b1ed1df4b..127166835 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1315,
+/**/
1314,
/**/
1313,