ltlfilt, autfilt: add support for --nth

* bin/autfilt.cc, bin/ltlfilt.cc: Implement it.
* NEWS: Mention it.
* tests/core/genaut.test, tests/core/genltl.test: Add test cases.
This commit is contained in:
Alexandre Duret-Lutz 2020-03-11 11:42:31 +01:00
parent 4e99518da7
commit c3d7e942d3
5 changed files with 48 additions and 7 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017, 2018, 2019 Laboratoire de Recherche et Développement
# Copyright (C) 2017, 2018, 2019, 2020 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -60,3 +60,12 @@ genaut --l-nba='1..3?' 2>err && exit 1
grep 'invalid range.*trailing garbage' err
genaut --l-nba='1..' 2>err && exit 1
grep 'invalid range.*missing end' err
# Tests for autfilt -N/--nth
genaut --ks-nca=1..5 | autfilt -N 2..4 > range1.hoa
genaut --ks-nca=2..4 > range2.hoa
diff range1.hoa range2.hoa
genaut --ks-nca=1..5 | autfilt -v --nth 3..5 > range1.hoa
genaut --ks-nca=1..2 > range2.hoa
diff range1.hoa range2.hoa