(t *testing.T)
| 1545 | } |
| 1546 | |
| 1547 | func TestParseAndPrintComplexString4(t *testing.T) { |
| 1548 | src := `<?php |
| 1549 | "test {$foo }" ; |
| 1550 | "test {$foo [ ] }" ; |
| 1551 | "test {$foo [ 1 ] }" ; |
| 1552 | "test {$foo -> bar }" ; |
| 1553 | "test {$foo -> bar ( ) }" ; |
| 1554 | ` |
| 1555 | |
| 1556 | actual := print(parse(src)) |
| 1557 | |
| 1558 | if src != actual { |
| 1559 | t.Errorf("\nexpected: %s\ngot: %s\n", src, actual) |
| 1560 | } |
| 1561 | } |