test/parser_test.rb in trac-wiki-0.3.23 vs test/parser_test.rb in trac-wiki-0.3.24

- old
+ new

@@ -1011,9 +1011,40 @@ #tc "<p>\u00a0</p>\n", "&nbsp;" #tc "<p>„text“</p>\n", "&bdquo;text&ldquo;" tc "<p>&nbsp;</p>\n", "&nbsp;" tc "<p>&bdquo;text&ldquo;</p>\n", "&bdquo;text&ldquo;" end + it 'should !ifeq' do + tc "<p>ELSE.</p>\n", "{{!ifeq WHAT|C1|A1|C2|A2|C3|A3|ELSE}}." + tc "<p>A1.</p>\n", "{{!ifeq C1|C1|A1|C2|A2|C3|A3|ELSE}}." + tc "<p>A2.</p>\n", "{{!ifeq C2|C1|A1|C2|A2|C3|A3|ELSE}}." + tc "<p>A3.</p>\n", "{{!ifeq C3|C1|A1|C2|A2|C3|A3|ELSE}}." + tc "<p>A1.</p>\n", "{{!ifeq C1|C1|A1|C2|A2|C3|A3}}." + tc "<p>A2.</p>\n", "{{!ifeq C2|C1|A1|C2|A2|C3|A3}}." + tc "<p>A3.</p>\n", "{{!ifeq C3|C1|A1|C2|A2|C3|A3}}." + tc "<p>.</p>\n", "{{!ifeq C4|C1|A1|C2|A2|C3|A3}}." + tc "<p>A1.</p>\n", "{{!ifeq C1|C1|A1 + |C2|A2 + |C3|A3}}." + tc "<p>A2.</p>\n", "{{!ifeq C2|C1|A1 + |C2|A2 + |C3|A3}}." + tc "<p>A3.</p>\n", "{{!ifeq C3|C1|A1 + |C2|A2 + |C3|A3}}." + tc "<p>.</p>\n", "{{!ifeq C4|C1|A1 + |C2|A2 + |C3|A3}}." + tc "<p>ELSE.</p>\n", "{{!ifeq C4|C1|A1 + |C2|A2 + |C3|A3 + |ELSE}}." + tc "<p>A1.</p>\n", "{{!ifeq C1|C1|A1}}." + tc "<p>.</p>\n", "{{!ifeq C4|C1|A1}}." + tc "<p>.</p>\n", "{{!ifeq C1|C1|}}." + tc "<p>C1.</p>\n", "{{!ifeq C1|C1}}." + tc "<p>.</p>\n", "{{!ifeq C1}}." + end it 'should plugin' do tc "<p>AHOJTE!</p>\n", "{{!print AHOJTE}}" tc "<p>test:AHOJTE! AHOJTE! </p>\n", "test:{{!print AHOJTE}}{{!print AHOJTE}}" tc "<p>FALSE</p>\n", "{{ifeqtest JEDNA|DVE}}" tc "<p>TRUE</p>\n", "{{ifeqtest JEDNA|JEDNA}}"