From eda8550f79f7f836a78f5909f1dccc008511d4f8 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 22 Apr 2024 21:27:07 +0200 Subject: Add a test for word breaking --- test/run-tests | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 test/run-tests (limited to 'test/run-tests') diff --git a/test/run-tests b/test/run-tests new file mode 100755 index 0000000..e19b611 --- /dev/null +++ b/test/run-tests @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e +cd "${0%/*}" + +readonly FLAGS=' + -std=c23 -I../include + -Og -ggdb3 + -Wall -Wextra -Wpedantic + -Wno-pointer-sign + -Wno-attributes +' + +(cd ..; ./make) + +./gen-test-data + +for src in *.c +do + dst="${src%.*}" + gcc $FLAGS -o "$dst" "$src" ../libmlib.a +done + +s="$(find . -type f -executable \ + -not -name gen-test-data \ + -not -name run-tests \ + -exec echo rm "*.in" {} +)" +trap "$s" EXIT + +find . -type f -executable \ + -not -name gen-test-data \ + -not -name run-tests \ + -exec {} \; -- cgit v1.2.3