From 54807231c03495d6a322885d3ae7061e47cac490 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 2 Jul 2023 08:05:02 +0800 Subject: [PATCH] test: check for ASAN properly (#24224) Follow-up to #24195. --- test/functional/legacy/memory_usage_spec.lua | 2 +- test/old/testdir/check.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/legacy/memory_usage_spec.lua b/test/functional/legacy/memory_usage_spec.lua index 59839157ea..bf37315914 100644 --- a/test/functional/legacy/memory_usage_spec.lua +++ b/test/functional/legacy/memory_usage_spec.lua @@ -13,7 +13,7 @@ local is_os = helpers.is_os local is_ci = helpers.is_ci local function isasan() - local version = eval('execute("version")') + local version = eval('execute("verbose version")') return version:match('-fsanitize=[a-z,]*address') end diff --git a/test/old/testdir/check.vim b/test/old/testdir/check.vim index 680a59006b..281514db17 100644 --- a/test/old/testdir/check.vim +++ b/test/old/testdir/check.vim @@ -168,7 +168,7 @@ endfunc " Command to check for not running under ASAN command CheckNotAsan call CheckNotAsan() func CheckNotAsan() - if execute('version') =~# '-fsanitize=[a-z,]*\' + if execute('verbose version') =~# '-fsanitize=[a-z,]*\' throw 'Skipped: does not work with ASAN' endif endfunc