-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix export -o lp (ex beautify) (#816)
- Loading branch information
Showing
3 changed files
with
70 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# Test lp export | ||
|
||
TIMEFORMAT="%E" | ||
root=`pwd` | ||
lambdapi='dune exec -- lambdapi' | ||
|
||
outdir=.tmp | ||
#rm -rf $outdir | ||
mkdir -p "$outdir/OK/a b" | ||
cp -f lambdapi.pkg $outdir | ||
|
||
# translate lp files | ||
translate() { | ||
cd $root | ||
echo translate lp files ... | ||
for f in OK/*.lp 'OK/a b/escape file.lp' | ||
do | ||
out=$outdir/$f | ||
echo "$f --> $out ..." | ||
$lambdapi export -o lp -w -v 0 "$f" > "$out" | ||
if test $? -ne 0; then echo KO; exit 1; fi | ||
done | ||
} | ||
time translate | ||
|
||
# check lp files | ||
check() { | ||
cd $outdir | ||
echo check lp files ... | ||
$lambdapi check -w -v 0 OK/*.lp | ||
if test $? -ne 0; then echo KO; exit 1; fi | ||
} | ||
time check | ||
|
||
cd $root | ||
echo OK |