Mercurial > vim
view src/testdir/test_bench_regexp.vim @ 20421:8590a462ad46 v8.2.0765
patch 8.2.0765: In the GUI can't use all the modifiers.
Commit: https://github.com/vim/vim/commit/fd615a3c901f59abddca27c6a09940be552c0f4d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 16 14:01:51 2020 +0200
patch 8.2.0765: In the GUI can't use all the modifiers.
Problem: In the GUI can't use all the modifiers. (Andri M?ll)
Solution: Do not apply Alt/Meta early, do it later like with the terminal.
Avoid the Motif test from crashing.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 May 2020 14:15:05 +0200 |
parents | 16460964c304 |
children |
line wrap: on
line source
" Test for benchmarking the RE engine source check.vim CheckFeature reltime func Measure(file, pattern, arg) for re in range(3) let sstart = reltime() let before = ['set re=' .. re] let after = ['call search("' .. escape(a:pattern, '\\') .. '", "", "", 10000)'] let after += ['quit!'] let args = empty(a:arg) ? '' : a:arg .. ' ' .. a:file call RunVim(before, after, args) let s = 'file: ' .. a:file .. ', re: ' .. re .. \ ', time: ' .. reltimestr(reltime(sstart)) call writefile([s], 'benchmark.out', "a") endfor endfunc func Test_Regex_Benchmark() call Measure('samples/re.freeze.txt', '\s\+\%#\@<!$', '+5') endfunc " vim: shiftwidth=2 sts=2 expandtab