#!/bin/sh
echo "Hello World!" > expect
gcc -Wall -Werror -o HelloWorldC HelloWorld.c
./HelloWorldC > HelloWorldC.out
diff expect HelloWorldC.out &> /dev/null && echo "C: Ok." || echo "C: Failed."
g++ -Wall -Werror -o HelloWorldCPP HelloWorld.cpp
./HelloWorldCPP > HelloWorldCPP.out
diff expect HelloWorldCPP.out &> /dev/null && echo "C++: Ok." || echo "C++: Failed."
javac -classpath . edu/du/cs/comp3351/p1/*.java
java -classpath . edu.du.cs.comp3351.p1.HelloWorld > HelloWorldJava.out
diff expect HelloWorldJava.out &> /dev/null && echo "Java: Ok." || echo "Java: Failed."
sml < HelloWorld.sml | tail -3 | head -1 > HelloWorldSML.out
diff expect HelloWorldSML.out &> /dev/null && echo "SML-NJ: Ok." || echo "SML-NJ: Failed."


