diff options
Diffstat (limited to 'test/benchmark/bench_re_freeze_spec.lua')
-rw-r--r-- | test/benchmark/bench_re_freeze_spec.lua | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/test/benchmark/bench_re_freeze_spec.lua b/test/benchmark/bench_re_freeze_spec.lua index 53041b042b..ea41953014 100644 --- a/test/benchmark/bench_re_freeze_spec.lua +++ b/test/benchmark/bench_re_freeze_spec.lua @@ -1,8 +1,8 @@ -- Test for benchmarking RE engine. -local helpers = require('test.functional.helpers') +local helpers = require('test.functional.helpers')(after_each) local insert, source = helpers.insert, helpers.source -local clear, execute, wait = helpers.clear, helpers.execute, helpers.wait +local clear, command = helpers.clear, helpers.command -- Temporary file for gathering benchmarking results for each regexp engine. local result_file = 'benchmark.out' @@ -31,7 +31,7 @@ describe('regexp search', function() clear() source(measure_script) insert('" Benchmark_results:') - execute('write! ' .. result_file) + command('write! ' .. result_file) end) -- At the end of the test run we just print the contents of the result file @@ -46,22 +46,19 @@ describe('regexp search', function() it('is working with regexpengine=0', function() local regexpengine = 0 - execute(string.format(measure_cmd, regexpengine)) - execute('write') - wait() + command(string.format(measure_cmd, regexpengine)) + command('write') end) it('is working with regexpengine=1', function() local regexpengine = 1 - execute(string.format(measure_cmd, regexpengine)) - execute('write') - wait() + command(string.format(measure_cmd, regexpengine)) + command('write') end) it('is working with regexpengine=2', function() local regexpengine = 2 - execute(string.format(measure_cmd, regexpengine)) - execute('write') - wait() + command(string.format(measure_cmd, regexpengine)) + command('write') end) end) |