#!/bin/bash
# gringo+lpconvert: ground and exit in 0
# Author: Thomas Krennwallner <tkren@kr.tuwien.ac.at>
# Date: 2018-02-04

set -o pipefail

diff -y <(gringo <<<'a :- not b. b :- not a.' | lpconvert) - <<EOF
1 2 1 1 3
1 3 1 1 2
0
2 a
3 b
0
B+
0
B-
1
0
1
EOF

result=$?
test $result -eq 0
