Add tests for building the format string