I'm looking at sample7.q.out, which has the lines that are quoted in the description. As I understand it, the test should check lines of the form 'file:/[directory]/[file]' and verify that the file part (or the last token) is the same as those in the reference test files. But aren't there lines in the test output that begin with 'file:/' that should be ignored completely?
Anyway, assuming that we can look at just the last token of lines that begin with 'file:/', it doesn't seem like there is a way to use only diff to handle this case. The man page for diff does not describe any useful options. I have two ideas
1. Instead of using diff directly, write a script that uses diff + some additional logic to detect this condition. Probably will be a little slower.
2. in mapredWork, add an additional function that would display the last token of the paths. Sort of an ugly idea, but would work with diff in the current form.