summaryrefslogtreecommitdiff
path: root/src/test/idempotence.sh
blob: 5527680d70500d8c06df7eb6eed34e97a6bc64a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)