You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/04/11 12:09:16 UTC
[maven-release] 01/01: adjust expected test result to account for
different operating systems
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch windows
in repository https://gitbox.apache.org/repos/asf/maven-release.git
commit 1f46d56894c99f080494369bdf5d403151e02078
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sat Apr 11 08:08:56 2020 -0400
adjust expected test result to account for different operating systems
---
.../org/apache/maven/shared/release/exec/CommandLineFactoryTest.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java
index 762eaf4..f7c750a 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java
@@ -22,6 +22,8 @@ package org.apache.maven.shared.release.exec;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.util.cli.Commandline;
+import java.util.Locale;
+
/**
* Test the command line factory.
*
@@ -46,7 +48,8 @@ public class CommandLineFactoryTest
{
Commandline cl = factory.createCommandLine( "exec" );
- assertEquals( "Check executable", "'exec'", cl.getExecutable() );
+ String expected = System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win") ? "exec" : "'exec'";
+ assertEquals( "Check executable", expected, cl.getExecutable() );
assertNotNull( "Check environment", cl.getEnvironmentVariables() );
assertFalse( "Check environment", cl.getEnvironmentVariables().length == 0 );
}