Add tests for DFAs.

And, apparently, you can't access a function that is inside of another
function from a different scope. Whoops... :-/

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>