Permalink
Browse files

dom: More tests for the phrase setting bug

I cannot see other cases where this may be an issue.
  • Loading branch information...
1 parent 6fd96b8 commit b6a51f3b30f7694715e5a42b89b0088b79256062 @andreww committed Jan 1, 2013
@@ -0,0 +1,24 @@
+program dom
+ use FoX_dom
+ implicit none
+
+ integer :: i
+ type(Node), pointer :: doc, name
+ type(NodeList), pointer :: nameList
+ character(200) :: name_text
+
+ doc => parseFile("test_dom_getTextContent_2.xml_in")
+
+ nameList => getElementsByTagname(doc, "name")
+
+ do i = 0, getLength(nameList) - 1
+ name_text = ''
+ name => item(nameList,i)
+
+ name_text = getTextContent(name)
+
+ write(*,*) trim(name_text)
+ enddo
+
+ call destroy(doc)
+end program dom
@@ -0,0 +1,3 @@
+
+[[_tmp]]:=somecommand(data, 0, 1)
+
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<name>
+[[_tmp]]:=somecommand(data, 0, 1)
+</name>
@@ -0,0 +1,24 @@
+program dom
+ use FoX_dom
+ implicit none
+
+ integer :: i
+ type(Node), pointer :: doc, name
+ type(NodeList), pointer :: nameList
+ character(200) :: name_text
+
+ doc => parseFile("test_dom_getTextContent_3.xml_in")
+
+ nameList => getElementsByTagname(doc, "name")
+
+ do i = 0, getLength(nameList) - 1
+ name_text = ''
+ name => item(nameList,i)
+
+ name_text = getTextContent(name)
+
+ write(*,*) trim(name_text)
+ enddo
+
+ call destroy(doc)
+end program dom
@@ -0,0 +1,3 @@
+
+<[_tmp]>:=somecommand(data, 0, 1)
+
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<name>
+&lt;[_tmp]>:=somecommand(data, 0, 1)
+</name>
@@ -0,0 +1,24 @@
+program dom
+ use FoX_dom
+ implicit none
+
+ integer :: i
+ type(Node), pointer :: doc, name
+ type(NodeList), pointer :: nameList
+ character(200) :: name_text
+
+ doc => parseFile("test_dom_getTextContent_4.xml_in")
+
+ nameList => getElementsByTagname(doc, "name")
+
+ do i = 0, getLength(nameList) - 1
+ name_text = ''
+ name => item(nameList,i)
+
+ name_text = getTextContent(name)
+
+ write(*,*) trim(name_text)
+ enddo
+
+ call destroy(doc)
+end program dom
@@ -0,0 +1,2 @@
+PARSE_ERR
+81 runParser
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<name>
+[_tmp]]>:=somecommand(data, 0, 1)
+</name>
@@ -0,0 +1,24 @@
+program dom
+ use FoX_dom
+ implicit none
+
+ integer :: i
+ type(Node), pointer :: doc, name
+ type(NodeList), pointer :: nameList
+ character(200) :: name_text
+
+ doc => parseFile("test_dom_getTextContent_5.xml_in")
+
+ nameList => getElementsByTagname(doc, "name")
+
+ do i = 0, getLength(nameList) - 1
+ name_text = ''
+ name => item(nameList,i)
+
+ name_text = getTextContent(name)
+
+ write(*,*) trim(name_text)
+ enddo
+
+ call destroy(doc)
+end program dom
@@ -0,0 +1,3 @@
+
+[[[_tmp]]]:=somecommand(data, 0, 1)
+
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<name>
+[[[_tmp]]]:=somecommand(data, 0, 1)
+</name>

0 comments on commit b6a51f3

Please sign in to comment.