|
From: Markus B. <mba...@us...> - 2005-10-11 21:13:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17748/src/org/rubypeople/rdt/internal/launching Modified Files: TC_RunnerLaunching.java Log Message: in debug mode the first argument is -r<temporaryParameteFile>, on windows paths are quoted Index: TC_RunnerLaunching.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TC_RunnerLaunching.java 1 Oct 2005 23:10:47 -0000 1.2 --- TC_RunnerLaunching.java 11 Oct 2005 21:13:08 -0000 1.3 *************** *** 15,18 **** --- 15,19 ---- import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; + import org.eclipse.core.runtime.Platform; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; *************** *** 46,49 **** --- 47,52 ---- commandLine.add("-reclipseDebug"); } + // The include paths and the executed ruby file is quoted on windows + String pathQuotation = Platform.getOS().equals(Platform.OS_WIN32) ? "\"" : "" ; if (debug) { String dirOfRubyDebuggerFile = DebuggerRunner.getDirectoryOfRubyDebuggerFile().replace('/', File.separatorChar) ; *************** *** 52,65 **** } commandLine.add("-I"); ! commandLine.add(dirOfRubyDebuggerFile); } commandLine.add("-I"); ! commandLine.add( project.getLocation().toOSString()); commandLine.add("-I"); ! commandLine.add(project.getLocation().toOSString() + File.separator + RUBY_LIB_DIR) ; commandLine.addAll(Arrays.asList(INTERPRETER_ARGUMENTS.split("\\s+"))); commandLine.add("--"); // use always forward slashes for path relative to project dir ! commandLine.add(project.getLocation().toOSString() + "/" + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME); commandLine.add(PROGRAM_ARGUMENTS); return commandLine; --- 55,68 ---- } commandLine.add("-I"); ! commandLine.add(pathQuotation + dirOfRubyDebuggerFile + pathQuotation); } commandLine.add("-I"); ! commandLine.add( pathQuotation + project.getLocation().toOSString() + pathQuotation); commandLine.add("-I"); ! commandLine.add(pathQuotation + project.getLocation().toOSString() + File.separator + RUBY_LIB_DIR + pathQuotation) ; commandLine.addAll(Arrays.asList(INTERPRETER_ARGUMENTS.split("\\s+"))); commandLine.add("--"); // use always forward slashes for path relative to project dir ! commandLine.add(pathQuotation + project.getLocation().toOSString() + "/" + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME + pathQuotation); commandLine.add(PROGRAM_ARGUMENTS); return commandLine; *************** *** 91,95 **** getLaunchManager().getLaunchConfigurationType( RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE); ! launchConfigurationType.getDelegate().launch( configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, --- 94,98 ---- getLaunchManager().getLaunchConfigurationType( RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE); ! launchConfigurationType.getDelegate(debug ? "debug" : "run").launch( configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, *************** *** 100,103 **** --- 103,111 ---- List expected = getCommandLine(project, debug); List actual = interpreter.getArguments(); + if (debug) { + // we must cheat with the first argument, because it is a temporary file which + // contains is different for every call + expected.add(0, actual.get(0)) ; + } assertEquals("Assembled command line.", expected, actual); assertEquals( |