diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d new file mode 100644 index 00000000..a62adec3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/d/strings.d @@ -0,0 +1,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"; +} |