How to test a program which uses external files

All of these are things to think about when using an external file with a program. Not all of them can be detected in beginning programs. In that case, the program may crash. If so, document it! That is a result! If you were supposed to manage it so that the crash didn't happen, then you need to fix your bug. If you were not specified to handle that condition, it is still a case to be documented.

Using an external file for input

Using an external file for output