CMPSC 311, Spring 2013, Project 8, Grading info

50 points total

The basic score is 20 points, for turning it in.  But, if we caught you cheating, the score is 0.

Each of the following is worth some more points as indicated.  All tests were done on Linux.

[10] compile the program
We used the command
    gcc -std=c99 -Wall -Wextra -D_XOPEN_SOURCE=700 -DMTIME=1 -o pr8 *.c
with *.c replaced by specific file names if necessary.

These warnings were ignored - defined but not used, unused parameter, unused variable.
[5] test "pr8 -h", "pr8 -v -h", "pr8 -n -h"
Note that the solution to Project 5 meets this criterion.
[15] test "pr8 -f sample"
Note that the solution to Project 5 meets this criterion, except that the output is wrong for Project 8.
If your -h option said to use the -n option, we tried that, but it wasn't always accepted.



Test 1

The initial conditions:
create input files hakefile, Hakefile, makefile, Makefile, file5, file6.
delete files One, Two, Three, Four, Five.
create files Four, Five.
The input files are all the same, but with slight differences, to make it easy to see which file you actually read.
# file1 - hakefile

One : Two Three
        abc 1A
        abc 1B

Two : Four
        abc 2A
        abc 2B

Three : Five
        abc 3A
        abc 3B
        abc 3C

clean :
        abc 4
The test:
pr8 One < file5
The desired result:
abc 2A
abc 2B
abc 3A
abc 3B
abc 3C
abc 1A
abc 1B
In some cases, files One, Two and Three were actually created, which was not intended.



Test 2

Similar, but using
pr8 -f file6 One < /dev/null



Tests 3, 4 - repeat Tests 1, 2 with the -v option