Added a test with special chars

This commit is contained in:
Benoît Blanchon
2014-06-26 13:10:52 +02:00
parent 25118ad8c0
commit d12e25bd8a
2 changed files with 25 additions and 6 deletions

View File

@ -39,6 +39,25 @@ void StringBuilder::appendEscaped(const char* s)
append("\\\\");
break;
case '\b':
append("\\b");
break;
case '\f':
append("\\f");
break;
case '\n':
append("\\n");
break;
case '\r':
append("\\r");
break;
case '\t':
append("\\t");
break;
default:
buffer[length++] = *s;