mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0028673: getsourcefile Draw command return different output on Linux and Windows platforms
The method Draw_Interpretor::add() has been corrected so that the command getsourcefile returned the relative path starting with "src" without leading "/" on all platforms.
This commit is contained in:
parent
7c1a9a461b
commit
36cc26194c
@ -311,6 +311,8 @@ void Draw_Interpretor::add (const Standard_CString theCommandName,
|
|||||||
aPath.SetNode ("");
|
aPath.SetNode ("");
|
||||||
TCollection_AsciiString aSrcPath;
|
TCollection_AsciiString aSrcPath;
|
||||||
aPath.SystemName (aSrcPath);
|
aPath.SystemName (aSrcPath);
|
||||||
|
if (aSrcPath.Value(1) == '/')
|
||||||
|
aSrcPath.Remove(1);
|
||||||
Tcl_SetVar2 (myInterp, "Draw_Files", aName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY);
|
Tcl_SetVar2 (myInterp, "Draw_Files", aName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
puts "TODO OCC28773 Windows: Error: command 'getsourcefile pload' returned"
|
|
||||||
|
|
||||||
# test for command getsource
|
# test for command getsource
|
||||||
|
|
||||||
# check that path returned for command pload is as expected
|
# check that path returned for command pload is as expected
|
||||||
if { [checkplatform -windows] } {
|
set expected src/Draw/Draw_PloadCommands.cxx
|
||||||
set expected src/Draw/Draw_PloadCommands.cxx
|
|
||||||
} else {
|
|
||||||
set expected /src/Draw/Draw_PloadCommands.cxx
|
|
||||||
}
|
|
||||||
set path [lindex [getsourcefile pload] 1]
|
set path [lindex [getsourcefile pload] 1]
|
||||||
if { [string compare $path $expected] } {
|
if { [string compare $path $expected] } {
|
||||||
puts "Error: command 'getsourcefile pload' returned '$path' while expected '$expected'"
|
puts "Error: command 'getsourcefile pload' returned '$path' while expected '$expected'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user