From a794349a40f13da676928e5793e823bbb6912234 Mon Sep 17 00:00:00 2001 From: Timon Reinold Date: Fri, 19 Jul 2024 20:20:20 +0200 Subject: filters: add calendar test vector Add a test vector for the builtin "calendar" filter. Use the filter's current output as expected output. My aim is mostly just to run the calendar filter during "make tests", this vector doesn't necessarily cover the most interesting sections of its code. But at least running the filter once on what could be a common input (a meeting PUBLISH) and checking that its output matches what was expected should still be better than testing nothing. Previously, only compiled filters were tested. Testing the calendar filter (which is interpreted, not compiled) necessitated two changes: * Compilation output goes into the project root (filters/test.sh: "$here/../"), but the source code to interpret is in the filters/ subdirectory (filters/test.sh: "$here"/). The executable to invoke is thus in a different location. * .builds/alpine-edge.yml uses $FILTERS_TEST_PREFIX to wrap filters in valgrind, to check that filters written in e.g C don't leak memory. But for the calendar filter, that would check that the Awk interpreter doesn't leak memory, failing the test for at least gawk, mawk and busybox awk. Thus, a $FILTERS_TEST_BIN_PREFIX variable is introduced, which only applies to binary filters. Signed-off-by: Timon Reinold Acked-by: Robin Jarry --- .builds/alpine-edge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.builds') diff --git a/.builds/alpine-edge.yml b/.builds/alpine-edge.yml index f6bc9701..c8dcc6f0 100644 --- a/.builds/alpine-edge.yml +++ b/.builds/alpine-edge.yml @@ -13,7 +13,7 @@ environment: DESTDIR: ./out GOFLAGS: "-tags=notmuch" CC: gcc - FILTERS_TEST_PREFIX: valgrind --leak-check=full --error-exitcode=1 + FILTERS_TEST_BIN_PREFIX: valgrind --leak-check=full --error-exitcode=1 tasks: - validate: | gmake -C aerc validate -- cgit