Test case for string formatting