| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail196.d(38): Error: delimited string must end in `)"` |
| 5 |
fail_compilation/fail196.d(38): Error: implicit string concatenation is error-prone and disallowed in D |
| 6 |
fail_compilation/fail196.d(38): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\n assert(s == " |
| 7 |
fail_compilation/fail196.d(39): Error: semicolon needed to end declaration of `s`, instead of `foo` |
| 8 |
fail_compilation/fail196.d(38): `s` declared here |
| 9 |
fail_compilation/fail196.d(39): Error: found `");\n\n s = q"` when expecting `;` following expression |
| 10 |
fail_compilation/fail196.d(39): expression: `foo(xxx)` |
| 11 |
fail_compilation/fail196.d(41): Error: found `";\n assert(s == "` when expecting `;` following expression |
| 12 |
fail_compilation/fail196.d(41): expression: `[foo[xxx]]` |
| 13 |
fail_compilation/fail196.d(42): Error: found `");\n\n s = q"` when expecting `;` following expression |
| 14 |
fail_compilation/fail196.d(42): expression: `foo[xxx]` |
| 15 |
fail_compilation/fail196.d(44): Error: found `{` when expecting `;` following expression |
| 16 |
fail_compilation/fail196.d(44): expression: `foo` |
| 17 |
fail_compilation/fail196.d(44): Error: found `}` when expecting `;` following expression |
| 18 |
fail_compilation/fail196.d(44): expression: `xxx` |
| 19 |
fail_compilation/fail196.d(45): Error: found `foo` when expecting `;` following expression |
| 20 |
fail_compilation/fail196.d(44): expression: `";\n assert(s == "` |
| 21 |
fail_compilation/fail196.d(45): Error: found `}` when expecting `;` following expression |
| 22 |
fail_compilation/fail196.d(45): expression: `xxx` |
| 23 |
fail_compilation/fail196.d(47): Error: found `<` when expecting `;` following expression |
| 24 |
fail_compilation/fail196.d(45): expression: `");\n\n s = q" < foo` |
| 25 |
fail_compilation/fail196.d(48): Error: found `foo` when expecting `;` following expression |
| 26 |
fail_compilation/fail196.d(47): expression: `xxx >> ";\n assert(s == "` |
| 27 |
fail_compilation/fail196.d(48): Error: found `<` instead of statement |
| 28 |
fail_compilation/fail196.d(54): Error: unterminated string constant starting at fail_compilation/fail196.d(54) |
| 29 |
fail_compilation/fail196.d(56): Error: matching `}` expected following compound statement, not `End of File` |
| 30 |
fail_compilation/fail196.d(45): unmatched `{` |
| 31 |
fail_compilation/fail196.d(56): Error: matching `}` expected following compound statement, not `End of File` |
| 32 |
fail_compilation/fail196.d(37): unmatched `{` |
| 33 |
--- |
| 34 |
*/ |
| 35 |
|
| 36 |
void main() |
| 37 |
{ |
| 38 |
string s = q"(foo(xxx)) "; |
| 39 |
assert(s == "foo(xxx)"); |
| 40 |
|
| 41 |
s = q"[foo[xxx]]"; |
| 42 |
assert(s == "foo[xxx]"); |
| 43 |
|
| 44 |
s = q"{foo{xxx}}"; |
| 45 |
assert(s == "foo{xxx}"); |
| 46 |
|
| 47 |
s = q"<foo<xxx>>"; |
| 48 |
assert(s == "foo<xxx>"); |
| 49 |
|
| 50 |
s = q"[foo(]"; |
| 51 |
assert(s == "foo("); |
| 52 |
|
| 53 |
s = q"/foo]/"; |
| 54 |
assert(s == "foo]"); |
| 55 |
} |