summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d
blob: a62adec32a034c5a0a008d57515ddfdfe6518f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

/* This file goes over all the various string formats for D */

int foo(int bar)
{
   char [] a;
   char b;

   a = r"WYSIWYG";
   a = `WYSIWYG`;
   b = 'c';
   a = x"12 34 5678 90";
   a = "This\nis a \"test\"";
   a = \' ~ \" ~ \? ~ \\ ~ \a ~ \b ~ \f ~ \n ~ \r ~ \t ~ \v;
   a = \x1B ~ \0 ~ \74 ~ \123;
   a = \u1234 ~ \U12345678;
   a = \& ~ 'a';
   a = "Another" " " "Test";

   /+ test back to back EscapeSequences +/
   a = \r\n\xff\&\u1234;

   a = "char"c;
   a = "wchar"w;
   a = "dchar"d;

   /*
    * multi line string
    */
   a = r"Line 1
         line 2";
}