mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
execution: (test) Trim trailing spaces in PtyCommandLineTest
For some reason WinPty loses trailing spaces in the argument.
This commit is contained in:
@@ -291,7 +291,7 @@ public class GeneralCommandLineTest {
|
||||
if (argument.trim().isEmpty()) continue; // would report "ECHO is on"
|
||||
GeneralCommandLine commandLine = createCommandLine(ExecUtil.getWindowsShellName(), "/D", "/C", "echo", argument);
|
||||
String output = execAndGetOutput(commandLine);
|
||||
assertEquals(commandLine.getPreparedCommandLine(), argument + "\n", output);
|
||||
assertEquals(commandLine.getPreparedCommandLine(), filterExpectedOutput(argument) + "\n", output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public class GeneralCommandLineTest {
|
||||
for (String argument : ARGUMENTS) {
|
||||
GeneralCommandLine commandLine = createCommandLine(cygwinPrintf.getPath(), "[%s]\\\\n", argument);
|
||||
String output = execAndGetOutput(commandLine);
|
||||
assertEquals(commandLine.getPreparedCommandLine(), filterExpectedOutput("[" + argument + "]\n"), output);
|
||||
assertEquals(commandLine.getPreparedCommandLine(), filterExpectedOutput("[" + argument + "]") + "\n", output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PtyCommandLineTest extends GeneralCommandLineTest {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String filterExpectedOutput(@NotNull String output) {
|
||||
if (SystemInfo.isWindows) output = expandTabs(output, 8);
|
||||
if (SystemInfo.isWindows) output = StringUtil.trimTrailing(expandTabs(output, 8));
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user