You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2011/04/20 13:50:26 UTC
svn commit: r1095411 -
/incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java
Author: lcorneliussen
Date: Wed Apr 20 13:50:25 2011
New Revision: 1095411
URL: http://svn.apache.org/viewvc?rev=1095411&view=rev
Log:
[NPANDAY-407] Aborting some Windows-specific tests on non-windows systems
Submitted by Matthias Weßendorf
Modified:
incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java
Modified: incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java?rev=1095411&r1=1095410&r2=1095411&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/test/java/npanday/executable/CommandExecutorTest.java Wed Apr 20 13:50:25 2011
@@ -99,6 +99,11 @@ public class CommandExecutorTest
public void testTooLongCommandName()
throws ExecutionException
{
+ // we are only interested in exectuing this test
+ // on Windows, to catch the "Command line to long" issue for cmd.exe.
+ if (!isWindows())
+ return;
+
params.clear();
cmdExecutor.setLogger( new ConsoleLogger( 0, null ) );
@@ -125,6 +130,11 @@ public class CommandExecutorTest
public void testTooLongCommandName_withSpace()
throws ExecutionException
{
+ // we are only interested in exectuing this test
+ // on Windows, to catch the "Command line to long" issue for cmd.exe.
+ if (!isWindows())
+ return;
+
params.clear();
cmdExecutor.setLogger( new ConsoleLogger( 0, null ) );
@@ -172,4 +182,14 @@ public class CommandExecutorTest
}
return tst;
}
+
+ /**
+ * Simple check if the test is executed on Windows...
+ */
+ private static boolean isWindows()
+ {
+ String osName = System.getProperty("os.name");
+ boolean isWin = (osName.toLowerCase().indexOf("win")) >= 0;
+ return isWin;
+ }
}
\ No newline at end of file