1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0023570: Command param in DRAW outputs non-readable symbols

Added test case bugs/xde/bug23570
This commit is contained in:
ika 2013-07-18 12:44:08 +04:00
parent a44902efd1
commit 381a6d0e99
2 changed files with 30 additions and 1 deletions

View File

@ -196,7 +196,8 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
def.AssignCat(" , alpha: ");
Dico_IteratorOfDictionaryOfInteger listadd(theeadds);
for (listadd.Start(); listadd.More(); listadd.Next()) {
Standard_CString enva = listadd.Name().ToCString();
TCollection_AsciiString aName = listadd.Name();
Standard_CString enva = aName.ToCString();
if (enva[0] == '?') continue;
Sprintf(mess,":%d ",listadd.Value());
def.AssignCat (enva);

28
tests/bugs/xde/bug23570 Normal file
View File

@ -0,0 +1,28 @@
puts "============"
puts "OCC23570"
puts "============"
puts ""
###########################################################################
# Command param in DRAW outputs non-readable symbols
###########################################################################
set info [param write.surfacecurve.mode]
set result1 [regexp {\-\-\- Type : Enum \[in 0-1\] 0:Off 1:On , alpha: +(.*):0 +(.*):1 +\n\-\-\-} $info full alpha_0 alpha_1]
if { ${result1} == 0 } {
puts "Error: bad message or regexp"
} else {
puts "alpha_0=${alpha_0}"
puts "alpha_1=${alpha_1}"
set result2 [regexp {([^A-Za-z0-9]+)} ${alpha_0} full non_readable_symbols_0]
set result3 [regexp {([^A-Za-z0-9]+)} ${alpha_1} full non_readable_symbols_1]
if { ${result2} == 1 } {
puts "non_readable_symbols_0=${non_readable_symbols_0}"
puts "Error: Command param in DRAW outputs non-readable symbols for enumerated parameters, after \"alpha\"; (0)"
}
if { ${result3} == 1 } {
puts "non_readable_symbols_1=${non_readable_symbols_1}"
puts "Error: Command param in DRAW outputs non-readable symbols for enumerated parameters, after \"alpha\"; (1)"
}
}