ltlgrind: fix handling of FILENAME/COL

This additionally fixes #107.

* src/bin/ltlgrind.cc: Fix handling for FILEANAME/COL.  Document FORMAT
in --help.  Assume -F for arguments given without options.
* src/tests/ltlgrind.test: Add two tests.
* NEWS: Mention this.
This commit is contained in:
Alexandre Duret-Lutz 2015-10-15 17:08:08 +02:00
parent e3682a2301
commit 0671d62806
3 changed files with 79 additions and 38 deletions

View file

@ -22,13 +22,18 @@
set -e
checkopt()
checkopt_noparse()
{
cat >exp
run 0 ../../bin/ltlgrind --sort "$@" > out
diff exp out
}
checkopt()
{
checkopt_noparse "$@"
# The result must be parsable
../../bin/ltlfilt out
diff exp out
}
checkopt -f 'Xp1 U (p4 | (p3 xor (p4 W p0)))' <<EOF
@ -181,3 +186,14 @@ F({p2[*2][:*]}[]-> Xp2)
F({{1;p0}[:*]}[]-> Xp0)
F({{p2;1}[:*]}[]-> Xp0)
EOF
echo '1,a,3' > input
checkopt_noparse input/2 <<EOF
1,0,3
1,1,3
EOF
checkopt_noparse -F input/2 --format '%<,%f,%>,%F,%L' <<EOF
1,0,3,input,1
1,1,3,input,1
EOF