Пример #1
0
 def test_cond_markup(s):
     pat = XMLFromPattern(r'<title|\<b\><title> woo\</b\>>')
     s.assertEquals(pat.format(s.a), '<b>Title5 woo</b>')
Пример #2
0
 def test_escape(s):
     pat = XMLFromPattern(r'\<b\>&lt;<xmltest>&gt;\</b\>')
     s.assertEquals(pat.format(s.a), '<b>&lt;&lt;&amp;&gt;&gt;</b>')
Пример #3
0
 def test_markup_passthrough(s):
     pat = XMLFromPattern(r'\<b\>&lt;<title>&gt;\</b\>')
     s.assertEquals(pat.format(s.a), '<b>&lt;Title5&gt;</b>')
     s.assertEquals(pat.format(s.b), '<b>&lt;Title6&gt;</b>')
     s.assertEquals(pat.format(s.c), '<b>&lt;test/subdir&gt;</b>')
Пример #4
0
 def test_cond_markup(s):
     pat = XMLFromPattern(r'<title|\<b\><title> woo\</b\>>')
     s.assertEquals(pat.format(s.a), '<b>Title5 woo</b>')
Пример #5
0
 def test_escape(s):
     pat = XMLFromPattern(r'\<b\>&lt;<xmltest>&gt;\</b\>')
     s.assertEquals(pat.format(s.a), '<b>&lt;&lt;&amp;&gt;&gt;</b>')
Пример #6
0
 def test_markup_passthrough(s):
     pat = XMLFromPattern(r'\<b\>&lt;<title>&gt;\</b\>')
     s.assertEquals(pat.format(s.a), '<b>&lt;Title5&gt;</b>')
     s.assertEquals(pat.format(s.b), '<b>&lt;Title6&gt;</b>')
     s.assertEquals(pat.format(s.c), '<b>&lt;test/subdir&gt;</b>')