From 719d902b61ad27369a90b4bfdf9a31f651e6fd6e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 10:19:22 -1000 Subject: Decide every unit check skip in the shell Where a standalone Lua had no lpeg, the harness skipped the markdown and man checks itself, behind a note the test library hides, and the test passed on the six checks left. The real luaossl checks were left out the same way. Each now shows as a skip under a prerequisite named for the interpreter, and a misspelt mode fails rather than running the default. --- tests/t0504-email-avatar.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/t0504-email-avatar.sh') diff --git a/tests/t0504-email-avatar.sh b/tests/t0504-email-avatar.sh index 1b82a41..342daee 100755 --- a/tests/t0504-email-avatar.sh +++ b/tests/t0504-email-avatar.sh @@ -16,6 +16,7 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease for lua in ${interpreters:-lua} do + lua_module_prereq "$lua" openssl.digest for script in email-gravatar email-libravatar do test_expect_success STANDALONE_LUA "$script checks under $(lua_version "$lua")" ' @@ -25,12 +26,9 @@ do "$lua" "$EXT_TEST_DIRECTORY/test-email-avatar.lua" "$EXTENSIONS_DIRECTORY/$script.lua" missing ' - if "$lua" -e "require([[openssl.digest]])" >/dev/null 2>&1 - then - test_expect_success STANDALONE_LUA "$script checks with real luaossl under $(lua_version "$lua")" ' - "$lua" "$EXT_TEST_DIRECTORY/test-email-avatar.lua" "$EXTENSIONS_DIRECTORY/$script.lua" real - ' - fi + test_expect_success "STANDALONE_LUA,$lua_prereq" "$script checks with real luaossl under $(lua_version "$lua")" ' + "$lua" "$EXT_TEST_DIRECTORY/test-email-avatar.lua" "$EXTENSIONS_DIRECTORY/$script.lua" real + ' done done -- cgit 2.12.1