This document describes the setup used in esubmit for this lab. The ionput data files are
After compiling Main.java, the script then executes the following commands. The 'echo' command in the following generates output that is fed in to your program (using the | command, known as the pipe) as if the user had typed the words at the console. Your program then generates the appropriate output file, and the od command (short for "octal dump") writes the contents of the file in a way that can be viewed by people. esubmit then captures the whole thing and compares your output against the expected output. The list of commands are as follows (with comments in bold text for futher clarification):
echo "bob.dat out.1 y rev" | java Main
od -c out.1
echo "bob.dat out.2 n rev" | java Main
od -c out.2
echo "boberr.dat out.2.bad y rev" | java Main # wrong length, so fails
cat -v out.2.bad # shouldn't exist, so fails
at bob.dat | tr o X > checksumerr.txt # create file with bad checksum
echo "checksumerr.txt out.3.bad y rev" | java Main # fails
cat -v out.3.bad # shouldn't exist, so fails
echo "bob.xor out.3 y xor what" | java Main
od -c out.3
echo "ceaser.txt out.4 y shift 7" | java Main
od -c out.4
echo "dog.txt out.5 y shift 200" | java Main
od -c out.5
echo "dog-150.dat out.6 n shift 150" | java Main
od -c out.6
echo 'ascii.dat out.7 y xor !#*+,-0123456789:;<=>ABCDefgh{|}~' | java Main
od -c out.7
Full expected output: full-result.txt