fixed test cases for res.format