Skip to content

Commit

Permalink
dom: More tests for the phrase setting bug
Browse files Browse the repository at this point in the history
I cannot see other cases where this may be an issue.
  • Loading branch information
andreww committed Jan 1, 2013
1 parent 6fd96b8 commit b6a51f3
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dom/test/test_dom_getTextContent_2.f90
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions dom/test/test_dom_getTextContent_2.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

[[_tmp]]:=somecommand(data, 0, 1)

5 changes: 5 additions & 0 deletions dom/test/test_dom_getTextContent_2.xml_in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<name>
[[_tmp]]:=somecommand(data, 0, 1)
</name>
24 changes: 24 additions & 0 deletions dom/test/test_dom_getTextContent_3.f90
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions dom/test/test_dom_getTextContent_3.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

<[_tmp]>:=somecommand(data, 0, 1)

5 changes: 5 additions & 0 deletions dom/test/test_dom_getTextContent_3.xml_in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<name>
&lt;[_tmp]>:=somecommand(data, 0, 1)
</name>
24 changes: 24 additions & 0 deletions dom/test/test_dom_getTextContent_4.f90
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions dom/test/test_dom_getTextContent_4.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PARSE_ERR
81 runParser
5 changes: 5 additions & 0 deletions dom/test/test_dom_getTextContent_4.xml_in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<name>
[_tmp]]>:=somecommand(data, 0, 1)
</name>
24 changes: 24 additions & 0 deletions dom/test/test_dom_getTextContent_5.f90
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions dom/test/test_dom_getTextContent_5.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

[[[_tmp]]]:=somecommand(data, 0, 1)

5 changes: 5 additions & 0 deletions dom/test/test_dom_getTextContent_5.xml_in
Original file line number Diff line number Diff line change
@@ -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.