Format enforcement unit test

Fixes #536