codegen: Fix floating reference regression with Variants
[vala-gnome.git] / tests / basic-types / escape-chars.vala
blob0e646148863eefc6bc944cbfc21f44a70f7c5963
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
8 string s1 = "\x9q";
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";
20 s = s.escape ();
21 assert (s == "\\b\\f\\n\\r\\t\\v");
22 assert (s.compress () == "\b\f\n\r\t\v");
25 void main () {
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 ();