From 80e22fcc5825200667cb79f46498fbdb1d8fe15d Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Fri, 30 May 2014 15:50:34 +0100 Subject: Add pretty-printer test (idempotence) Fails in most cases because of "fresh" variables in type annotations that cannot be parsed again. --- src/test/idempotence.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 src/test/idempotence.sh (limited to 'src/test') 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) -- cgit v1.2.3