File: test_codewriter

package info (click to toggle)
pxp 1.2.9-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,844 kB
  • sloc: ml: 28,666; xml: 2,597; makefile: 822; sh: 691
file content (19 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh

set -e

sample="$1"
echo "Testing $sample:"
./compile -in "$sample" -out "sample.ml" -print -super-root -pis -comments >"out1"
echo "- code written to sample.ml, formatted data to out1"
OCAMLPATH=../../src:../../gensrc:$OCAMLPATH ocamlfind ocamlc -package pxp -a sample.ml -o sample.cma
../create-wrapper sample
echo "- sample.ml compiled to sample"
./sample >out2
echo "- re-read data written to out2"
if cmp out1 out2; then
    echo "- out1 and out2 are identical! OK"
else
    echo "- out1 and out2 differ! FAILURE!"
    exit 1
fi