File: test_replace.kid

package info (click to toggle)
kid 0.6.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 588 kB
  • ctags: 588
  • sloc: python: 2,447; makefile: 5; xml: 4
file content (22 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version='1.0' encoding='utf-8'?>
<?python #

some_xml = "<a><b><c>we'll stop here, thanks..</c></b></a>"

?>
<testdoc xmlns:py="http://purl.org/kid/ns#">
  <test>
    <attempt><p py:replace="'some text'">this should be replaced</p></attempt>
    <expect>some text</expect>
  </test>
  
  <test>
    <attempt><p py:replace="None">Should not say None</p></attempt>
    <expect></expect>
  </test>

  <test>
    <attempt><p py:replace="XML(some_xml)">will be replaced</p></attempt>
    <expect><a><b><c>we'll stop here, thanks..</c></b></a></expect>
  </test>
</testdoc>