15 lines
548 B
Bash
Executable File
15 lines
548 B
Bash
Executable File
#!/bin/bash
|
|
echo "Compiling..."
|
|
gcc -o Cat Cat.c
|
|
echo "Running difference tests..."
|
|
./Cat Test1.txt Test2.txt Test3.txt > CatOutput.txt
|
|
./Cat -b Test1.txt Test2.txt Test3.txt > CatOutputArguments.txt
|
|
cat Test1.txt Test2.txt Test3.txt > CatSystem.txt
|
|
cat -b Test1.txt Test2.txt Test3.txt > CatSystemArguments.txt
|
|
diff -w CatOutput.txt CatSystem.txt
|
|
diff -w CatOutputArguments.txt CatSystemArguments.txt
|
|
echo "Testing opening fake files..."
|
|
./Cat waoirjewa.txt
|
|
cat waoirjewa.txt
|
|
echo "If above lines match, successfully failed opening fake files."
|