summaryrefslogtreecommitdiff
path: root/tests/ruleset.sh
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2020-10-23 22:29:14 -0400
committerEric S. Raymond <esr@thyrsus.com>2020-10-24 07:10:58 -0400
commit8bec427f3ea3d755dd039f2946340afb30f65a1e (patch)
treeca8dc769b0148e4dff1c2a73555a50f2f807d7c0 /tests/ruleset.sh
parenta5b4a2ee966300982e8a19f17afe8e7ebe99a2e3 (diff)
downloadflex-git-8bec427f3ea3d755dd039f2946340afb30f65a1e.tar.gz
Turn the posixlycorrect test into a ruleset-based one.
Required generating the posixlycorrrect rules with tests/ruleset.sh so all platforms will have them.
Diffstat (limited to 'tests/ruleset.sh')
-rw-r--r--tests/ruleset.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ruleset.sh b/tests/ruleset.sh
index c7bcd5b..5c77dfe 100644
--- a/tests/ruleset.sh
+++ b/tests/ruleset.sh
@@ -43,6 +43,15 @@ EOF
done
done
+for backend in $* ; do
+ case $backend in
+ nr|r|c99) ext="c" ;;
+ *) ext=${backend} ;;
+ esac
+ printf "posixlycorrect_${backend}.${ext}: posixlycorrect_${backend}.l \$(FLEX)\n"
+ printf "\t\$(AM_V_LEX)POSIXLY_CORRECT=1 \$(FLEX) \$(TESTOPTS) -o \$@ \$<\n"
+done
+
printf "# End generated test rules\n"
echo RULESET_TESTS = "${RULESET_TESTS}"