()
| 560 | |
| 561 | #[test] |
| 562 | fn test_preprocess_verbatim() { |
| 563 | let content = |
| 564 | "@verbatim\n {{ $name }}\n @if(true)\n@endverbatim\n<p>{{ $real }}</p>\n"; |
| 565 | let (php, _) = preprocess(content); |
| 566 | // The {{ $name }} inside verbatim should NOT produce echo |
| 567 | assert!( |
| 568 | !php.contains("$name"), |
| 569 | "verbatim content should be skipped: {}", |
| 570 | php |
| 571 | ); |
| 572 | // The {{ $real }} after @endverbatim should work normally |
| 573 | assert!( |
| 574 | php.contains("$real"), |
| 575 | "content after endverbatim should work: {}", |
| 576 | php |
| 577 | ); |
| 578 | } |
| 579 | |
| 580 | #[test] |
| 581 | fn test_preprocess_verbatim_with_comment_syntax() { |
nothing calls this directly
no test coverage detected