Document and test enumerate functionality.

Also add example executables for the default mode and with debug
enabled.