From fdfa6dbb0e69742029d53f0e163b8e7e7e6860f5 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 16 Apr 2022 15:13:08 -0500 Subject: rewrite tests (#515) * rewrite tests to work with meson This ports our tests to meson and makes them able to be run in parallel. * add tests to ci * rewrite test/check-trailing-newlines in bash This test was using a GNU sed command which does not work on Alpine Linux. --- test/check-trailing-whitespace.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 test/check-trailing-whitespace.sh (limited to 'test/check-trailing-whitespace.sh') diff --git a/test/check-trailing-whitespace.sh b/test/check-trailing-whitespace.sh new file mode 100755 index 00000000..4aa4af9a --- /dev/null +++ b/test/check-trailing-whitespace.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +top_srcdir=${SOURCE_ROOT:-..} +. ${top_srcdir}/test/setup_env.sh + +ebegin "Checking trailing whitespace in code" +# XXX: Should we check man pages too ? +out=$(cd ${top_srcdir}; find */ \ + '(' -name '*.[ch]' -o -name '*.in' -o -name '*.sh' ')' \ + -exec grep -n -E '[[:space:]]+$' {} +) +[ -z "${out}" ] +eend $? "Trailing whitespace needs to be deleted:"$'\n'"${out}" -- cgit v1.2.3