ltlcross: report missing input/output sequence

* src/bin/ltlcross.cc: Fix it.
* src/tgbatest/ltlcross3.test: New file.
* src/tgbatest/Makefile.am: Add it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-11-19 22:45:16 +01:00
parent cf91a23711
commit 686a45484d
4 changed files with 29 additions and 2 deletions

2
NEWS
View file

@ -10,6 +10,8 @@ New in spot 1.2a (not released)
* Bug fixes:
- ltlcross' CSV output now stricly follows RFC 4180.
- ltlcross failed to report missing input or output escape sequences
on all but the first configured translator.
New in spot 1.2 (2013-10-01)

View file

@ -690,14 +690,13 @@ namespace
declare('N', &output);
declare('T', &output);
std::vector<bool> has(256);
size_t s = translators.size();
assert(s);
for (size_t n = 0; n < s; ++n)
{
// Check that each translator uses at least one input and
// one output.
has.clear();
std::vector<bool> has(256);
const translator_spec& t = translators[n];
scan(t.cmd, has);
if (!(has['f'] || has['s'] || has['l'] || has['w']

View file

@ -79,6 +79,7 @@ TESTS = \
eltl2tgba.test \
explicit.test \
explicit2.test \
ltlcross3.test \
taatgba.test \
tgbaread.test \
renault.test \

25
src/tgbatest/ltlcross3.test Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2012, 2013 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
run 2 ../../bin/ltlcross 'ltl2tgba -s %f >%N' 'foo bar' 2>stderr -f a
grep 'ltlcross.*no input.*in.*foo bar' stderr