explprod.test 1.4 KB
Newer Older
1
#!/bin/sh
2 3 4
# -*- coding: utf-8 -*-
# Copyright (C) 2008, 2009, 2013, 2014 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
Guillaume Sadegh's avatar
Guillaume Sadegh committed
5
# Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
6 7
# Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
# Université Pierre et Marie Curie.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
8 9 10 11 12
#
# 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
13
# the Free Software Foundation; either version 3 of the License, or
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
14 15 16 17 18 19 20 21
# (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
22
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
23

24 25 26 27 28 29

. ./defs

set -e

cat >input1 <<EOF
30
acc = p1;
31
s1, s3, "a", p1;
32
s1, s2, "b", p1;
33 34
s2, s1, "!a", p1;
s2, s3, "c", p1;
35 36 37
EOF

cat >input2 <<EOF
38
acc=p2 p3;
39 40
s1, s2, "b", p2;
s2, s1, "a", p3;
41 42 43
EOF

cat >expected <<EOF
44
acc = "p3" "p2" "p1";
45 46 47
"0 * 0", "1 * 1", "a & b", "p2" "p1";
"0 * 0", "2 * 1", "b", "p2" "p1";
"2 * 1", "1 * 0", "a & c", "p3" "p1";
48 49
EOF

50
run 0 ../explprod input1 input2 | tee stdout
51 52
diff stdout expected
rm input1 input2 stdout expected