bin: diagnose empty automata in ltlcross and ltldo
* src/bin/ltlcross.cc, src/bin/ltldo.cc: Make sure the result of hoa_parse() is non-empty. * src/tgbatest/ltlcross3.test, src/tgbatest/ltldo.test: Add test cases.
This commit is contained in:
parent
de935d40ca
commit
08fbe27136
4 changed files with 28 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
|
||||
# Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -140,3 +140,8 @@ grep '"exit_code"' out.csv
|
|||
test `grep 'error:.*aborted' stderr | wc -l` -eq 2
|
||||
test `grep '"aborted",-1' out.csv | wc -l` -eq 2
|
||||
check_csv out.csv
|
||||
|
||||
|
||||
# Diagnose empty automata
|
||||
run 1 ../../bin/ltlcross ': %f >%O' -f a 2>stderr
|
||||
test 2 = `grep -c 'error: empty output.' stderr`
|
||||
|
|
|
|||
|
|
@ -103,3 +103,8 @@ State: 0
|
|||
--END--
|
||||
EOF
|
||||
diff output expected
|
||||
|
||||
$ltldo ': %s; true>%O' -f GFa 2>stderr && exit 1
|
||||
test $? = 2
|
||||
grep 'error: command ".*" produced an empty output.' stderr
|
||||
grep 'ltldo: aborting' stderr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue