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.
This commit is contained in:
19
test/check-trailing-newlines.sh
Executable file
19
test/check-trailing-newlines.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
top_srcdir=${SOURCE_ROOT:-..}
|
||||
. ${top_srcdir}/test/setup_env.sh
|
||||
|
||||
ebegin "Checking trailing newlines in code"
|
||||
out=$(cd ${top_srcdir};
|
||||
for f in $(find */ -name '*.[ch]') ; do
|
||||
while read -r line; do
|
||||
if [ -n "${line}" ]; then
|
||||
blankline=
|
||||
else
|
||||
blankline=1
|
||||
fi
|
||||
done < "${f}"
|
||||
[ -n "${blankline}" ] && printf "%s\n" "${f}"
|
||||
done)
|
||||
[ -z "${out}" ]
|
||||
eend $? "Trailing newlines need to be deleted:"$'\n'"${out}"
|
Reference in New Issue
Block a user