John Johnson wrote:

> Is it possible to devise unit tests for programs structured like this?
> Should I break my program into more source files?
> Should I have a lot of smaller functions that do what the large function
> does? This seems more susceptible to bugs, since you're throwing more data
> around between functions.

Others have already given you good advice about unit testing itself, and 
so I thought I'd throw in my two cents on this part of your question. 
You might want to check out Martin Fowler's book "Refactoring" for 
strategies on how to restructure your code to improve its readability, 
maintainability and testability.