#!/bin/bash

# Compare current StructuredText.py processing against prior versions.
# You should see no output if there's no discrepancies.

differences=""
for i in *.stx; do
  stx=$i
  base=${i%.stx}
  ref=$base.ref
  new=$base.new
  python ../StructuredText.py $stx > $new
  if cmp $ref $new; then
    :
  else
    differences="$differences $stx"
  fi
done

if [ -n "$differences" ]; then
  echo "Differences encountered processing$differences."
fi
