#! /bin/sh
#
#  This is a short shell script to test the hash function.
#
<<EOF /bin/cat | ./snefru >snefruOutput

EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
1
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
12
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
123
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
1234
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
12345
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
123456
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
1234567
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
12345678
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
123456789
EOF
<<EOF /bin/cat | ./snefru >>snefruOutput
The theory of quantum electrodynamics has now lasted for
more than fifty years, and has been tested more and more
accurately over a wider and wider range of conditions.
At the present time I can proudly say that there is no
significant difference between experiment and theory!

Just to give you an idea of how the theory has been put
through the wringer, I'll give you some recent numbers:
experiments have Dirac's number at 1.00115965221 (with
an uncertainty of about five times as much). To give you
a feeling for the accuracy of these numbers, it comes
out something like this:  If you were to measure the
distance from Los Angeles to New York to this accuracy,
it would be exact to the thickness of a human hair.
That's how delicately quantum electrodynamics has, in the
past fifty years, been checked -- both theoretically and
experimentally.
EOF
diff snefruOutput correctSnefruOutput
if [ $? -eq 0 ] ;  then
	/bin/echo Test Passed
else
	/bin/echo Test Failed
fi
