genaut: minor fixes and add test case

* bin/genaut.cc: Use RANGE instead of N, and document it.
Output the FORMAT documentation, and fix handling of %F and %L.
* tests/core/genaut.test: New file.
* tests/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2017-04-22 11:00:50 +02:00
parent 3c0aecf4e6
commit e4a5bf8192
3 changed files with 52 additions and 30 deletions

View file

@ -151,6 +151,7 @@ TESTS_tl = \
core/length.test \
core/equals.test \
core/tostring.test \
core/genaut.test \
core/genltl.test \
core/lunabbrev.test \
core/tunabbrev.test \

38
tests/core/genaut.test Normal file
View file

@ -0,0 +1,38 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. ./defs
set -e
# Make sure the name of each pattern is correctly output by %F.
opts=`genaut --help | sed -n '/=RANGE/{
s/^ *//
s/[=[].*/=1/p
}'`
res=`genaut $opts --stats="--%F=%L"`
test "$opts" = "$res"
genaut --ks-cobuchi=..3 --stats=%s,%e,%t,%c,%g >out
cat >expected <<EOF
3,7,16,1,Fin(0)
5,14,32,1,Fin(0)
7,20,48,1,Fin(0)
EOF
diff out expected