Test for checking valid format string.