autfilt: implement %D, %N, %P, %W

* bin/common_aoutput.cc, bin/common_aoutput.hh: Implement.
* tests/core/format.test: Test.
* NEWS: Mention.
This commit is contained in:
Alexandre Duret-Lutz 2016-08-16 19:17:25 +02:00
parent 926ffbf965
commit 825332029c
4 changed files with 53 additions and 9 deletions

View file

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2016 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
@ -50,3 +50,9 @@ genltl --dac --output='ap-%a.ltl2'
for i in 1 2 3 4 5 6; do
cmp ap-$i.ltl ap-$i.ltl2 || exit 1
done
out=`ltl2tgba -f 'GFa' | autfilt --stats='%W,%w' --complement`
test "$out" = "cycle{a},cycle{!a}"
test "0,1,0,1" = "`ltl2tgba FGa | autfilt -D --stats='%D,%d,%P,%p'`"
test "0,0,0,1" = "`ltl2tgba FGa | autfilt -C --stats='%D,%d,%P,%p'`"
test "1,0" = "`ltl2tgba FGa | autfilt -D --stats='%N,%n'`"