1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0023864: An & symbol is read incorrectly from a XML Ocaf file

A line is uncommented. This line sets the successfully read & symbol.
Correction and adding test cases for issue CR23864
This commit is contained in:
vro 2013-08-15 16:28:11 +04:00 committed by bugmaster
parent d3c5411b48
commit 80cd454f1d
3 changed files with 23 additions and 3 deletions

View File

@ -90,7 +90,7 @@ char * LDOM_CharReference::Decode (char * theSrc, Standard_Integer& theLen)
}
else if (IS_EQUAL(aSrcPtr+1, "amp;")) {
aDstPtr = aSrcPtr - anIncrCount + 1;
// aDstPtr[-1] = '&';
aDstPtr[-1] = '&';
anIncrCount += 4;
aSrcPtr += 5;
}

View File

@ -1,5 +1,3 @@
puts "TODO OCC12345 ALL: OCC170 Error"
puts "========================"
puts "OCC170"
puts "(case 3)"

22
tests/bugs/caf/bug23864 Normal file
View File

@ -0,0 +1,22 @@
puts "============"
puts "OCC23864"
puts "============"
puts ""
###################################################################################################################
# An & symbol is read incorrectly from a XML Ocaf file
###################################################################################################################
#Open an Ocaf XML document
Open [locate_data_file bug23864_testAmp.xml] D
#Get name attribute (containing an & symbol)
GetName D 0:1
#Get an array of strings (containing an & symbol)
set info [GetExtStringArray D 0:1]
if { [regexp "\&" $info] != 1 } {
puts "Error : An \& symbol is read incorrectly from a XML Ocaf file"
} else {
puts "OK : An \& symbol is read correctly from a XML Ocaf file"
}