aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2025-02-21 23:37:15 +0000
committerGitHub <noreply@github.com>2025-02-22 07:37:15 +0800
commitdb2c3d1143fb5888602a2cee84578bd8a9c88bd7 (patch)
tree7badff95a8228eb333f688bc5dcc83f1d74b3c10
parent59b672fda2c98185a7d8b7740453635b8a40f2ff (diff)
downloadrneovim-db2c3d1143fb5888602a2cee84578bd8a9c88bd7.tar.gz
rneovim-db2c3d1143fb5888602a2cee84578bd8a9c88bd7.tar.bz2
rneovim-db2c3d1143fb5888602a2cee84578bd8a9c88bd7.zip
fix(tests): filter out lines with __typeof__ keyword (#32524)
Problem: On 32-bit architectures, musl libc makes heavy use of __typeof__ as part of its __REDIR macro for optional backwards compatibility with 32-bit time_t values. Unfortunately, the __typeof__ keyword is not supported by the LuaJIT C parser. Solution: Filter out the keyword in filter_complex_blocks.
-rw-r--r--test/unit/testutil.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/testutil.lua b/test/unit/testutil.lua
index 7fe27ad735..7fd0e73b47 100644
--- a/test/unit/testutil.lua
+++ b/test/unit/testutil.lua
@@ -146,6 +146,8 @@ local function filter_complex_blocks(body)
or string.find(line, 'value_init_')
or string.find(line, 'UUID_NULL') -- static const uuid_t UUID_NULL = {...}
or string.find(line, 'inline _Bool')
+ -- used by musl libc headers on 32-bit arches via __REDIR marco
+ or string.find(line, '__typeof__')
-- used by macOS headers
or string.find(line, 'typedef enum : ')
or string.find(line, 'mach_vm_range_recipe')