| 672 | | === Scope error |
| 673 | | |
| 674 | | <?for val in sarr ?> |
| 675 | | <?if foo == val ?> |
| 676 | | Key exists. |
| 677 | | <?end if ?> |
| 678 | | <?end for ?> |
| 679 | | |
| 680 | | <?if foo == val ?> |
| 681 | | Failed. |
| 682 | | <?end if?> |
| 683 | | |
| 684 | | --- |
| 685 | | sarr = [:something, :somethingElse, :something] |
| 686 | | template.sarr = sarr |
| 687 | | template.foo = :something |
| 688 | | assert_nothing_raised { rval = template.render } |
| 689 | | assert_match( templateContentRe(/Key exists\./, /Key exists\./), rval ) |
| 690 | | assert_match( /<!--.*ScopeError.*-->/, rval ) |
| 691 | | === |
| 692 | | |
| | 675 | # === Scope error |
| | 676 | # |
| | 677 | # <?for val in sarr ?> |
| | 678 | # <?if foo == val ?> |
| | 679 | # Key exists. |
| | 680 | # <?end if ?> |
| | 681 | # <?end for ?> |
| | 682 | # |
| | 683 | # <?if foo == val ?> |
| | 684 | # Failed. |
| | 685 | # <?end if?> |
| | 686 | # |
| | 687 | # --- |
| | 688 | # sarr = [:something, :somethingElse, :something] |
| | 689 | # template.sarr = sarr |
| | 690 | # template.foo = :something |
| | 691 | # assert_nothing_raised { rval = template.render } |
| | 692 | # assert_match( templateContentRe(/Key exists\./, /Key exists\./), rval ) |
| | 693 | # assert_match( /<!--.*ScopeError.*-->/, rval ) |
| | 694 | # === |
| | 695 | # |