diff options
| author | Gabriel Kerneis | 2014-05-30 15:50:34 +0100 |
|---|---|---|
| committer | Gabriel Kerneis | 2014-05-30 15:50:34 +0100 |
| commit | 80e22fcc5825200667cb79f46498fbdb1d8fe15d (patch) | |
| tree | c9a1ef159adb652cab33088979dcf2a26b618c81 /src/test | |
| parent | 4007e0eb5328b6ed73c045822da09d1aa73faa3c (diff) | |
Add pretty-printer test (idempotence)
Fails in most cases because of "fresh" variables in type annotations
that cannot be parsed again.
Diffstat (limited to 'src/test')
| -rwxr-xr-x | src/test/idempotence.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/idempotence.sh b/src/test/idempotence.sh new file mode 100755 index 00000000..5527680d --- /dev/null +++ b/src/test/idempotence.sh @@ -0,0 +1,14 @@ +#!/bin/sh -e +input=$1 +sail=../sail.native + +output1=`mktemp --suffix=.sail` +echo Pretty-printing $input +$sail -verbose $input > $output1 + +output2=`mktemp --suffix=.sail` +echo Pretty-printing pretty-printed +$sail -verbose $output1 > $output2 + +diff -u $output1 $output2 && \ + (rm -f $output1 $output2; echo Idempotence: ok) |
