Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 11:02:55 -0400
committerPaul Pazderski2019-05-18 11:02:55 -0400
commit459b64d7f6361b6f114364f8404fc0fed795db17 (patch)
treeff74f302d553cae6629c2d1251b197fb16cab761
parentbd26d4f1c3635d683d078d9352467c7879571d62 (diff)
downloadeclipse.platform.debug-459b64d7f6361b6f114364f8404fc0fed795db17.tar.gz
eclipse.platform.debug-459b64d7f6361b6f114364f8404fc0fed795db17.tar.xz
eclipse.platform.debug-459b64d7f6361b6f114364f8404fc0fed795db17.zip
Explicit set encoding for charset sensitive testI20190518-1800
Change-Id: I76bd8f54134fb15e3bf88d61f99bb4400aae2d15 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java
index bdcc9e618..ff66ca134 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.IProcess;
@@ -117,9 +118,11 @@ public class ProcessConsoleTests extends AbstractDebugTest {
final String input = prefix + String.join("", Collections.nCopies(numTwoByteCharacters, "\u00F8"));
final MockProcess mockProcess = new MockProcess(input.getBytes(StandardCharsets.UTF_8).length, testTimeout);
try {
- final IProcess process = DebugPlugin.newProcess(new Launch(null, ILaunchManager.RUN_MODE, null), mockProcess, "testUtf8Input");
+ final ILaunch launch = new Launch(null, ILaunchManager.RUN_MODE, null);
+ launch.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, StandardCharsets.UTF_8.toString());
+ final IProcess process = DebugPlugin.newProcess(launch, mockProcess, "testUtf8Input");
@SuppressWarnings("restriction")
- final org.eclipse.debug.internal.ui.views.console.ProcessConsole console = new org.eclipse.debug.internal.ui.views.console.ProcessConsole(process, new ConsoleColorProvider());
+ final org.eclipse.debug.internal.ui.views.console.ProcessConsole console = new org.eclipse.debug.internal.ui.views.console.ProcessConsole(process, new ConsoleColorProvider(), StandardCharsets.UTF_8.toString());
try {
console.initialize();
console.getInputStream().appendData(input);

Back to the top