bin: Ignore empty lines on input.

* src/bin/common_finput.cc: Here.
* src/ltltest/ltlfilt.test: Test it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-05-12 17:32:46 +02:00
parent 9e589422d1
commit 372790a489
3 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -114,7 +114,8 @@ job_processor::process_stream(std::istream& is,
int linenum = 0;
std::string line;
while (!abort_run && std::getline(is, line))
error |= process_string(line, filename, ++linenum);
if (!line.empty())
error |= process_string(line, filename, ++linenum);
return error;
}

View file

@ -31,10 +31,12 @@ checkopt()
diff exp out
}
# The empty lines in the file are meant, we want to make sure that
# they are ignored.
cat >formulas <<EOF
GFa | FGb
F(GFa | Gb)
F(b W GFa)
GFa | Gb
b W GFa
@ -44,6 +46,7 @@ G(a & Xb)
Xa
F(a & !Xa & Xb)
{a & {b|c} }
EOF
checkopt --eventual <<EOF