1 void test_x_escape_chars () {
2 string s
= "Copyright \xc2\xa9";
4 assert (s
== "Copyright ©");
6 // The escape sequence \x has a variable length
7 // with the lower boundary set to 1
9 assert (s1
== "\x09q");
12 void test_u_escape_chars () {
13 string s
= "Copyright \u00a9";
15 assert (s
== "Copyright ©");
18 void test_simple_escape_chars () {
19 string s
= "\b\f\n\r\t\v";
21 assert (s
== "\\b\\f\\n\\r\\t\\v");
22 assert (s
.compress () == "\b\f\n\r\t\v");
26 // Test case for the bug report 704709
27 test_x_escape_chars ();
28 test_u_escape_chars ();
30 // Test case for the bug report 664689
31 test_simple_escape_chars ();