#!/bin/sh # This file is part of melmac. See file COPYING for copyright information. # Author: Gergo Barany TERMFILES=example_terms CONFIG='--config src/melmac_config.pl' mkdir -p test_output echo "==================================" echo "Testing Termite -> ALF translation" echo "==================================" for f in $TERMFILES/*.term do echo "-------" echo "testing $f" echo "-------" src/melmac $CONFIG -t $f test_output/`basename $f .term`.alf STATUS=$? if [ $STATUS != 0 ] then exit $STATUS fi done echo echo "Termite -> ALF translation: all tests passed!" echo echo "================================================" echo "Testing syntax of generated ALF files (using -m)" echo "================================================" for a in test_output/*.alf do echo "-------" echo "testing $a" echo "-------" src/melmac $CONFIG -m $a test_output/`basename $a .alf`_copy.alf STATUS=$? if [ $STATUS != 0 ] then rm -f test_output/*_copy.alf exit $STATUS fi done rm -f test_output/*_copy.alf echo echo "ALF syntax checks: all tests passed!"