You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/11/14 22:23:50 UTC

maven-integration-testing git commit: MNG-5889 check both short -f and long --file options

Repository: maven-integration-testing
Updated Branches:
  refs/heads/master 79b4439ad -> 0bd5bdc2e


MNG-5889 check both short -f and long --file options

Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/0bd5bdc2
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/0bd5bdc2
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/0bd5bdc2

Branch: refs/heads/master
Commit: 0bd5bdc2efa45f6f07fa952c6d3a3e745a22edb3
Parents: 79b4439
Author: Herv� Boutemy <hb...@apache.org>
Authored: Mon Nov 14 23:23:36 2016 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Mon Nov 14 23:23:36 2016 +0100

----------------------------------------------------------------------
 .../it/MavenITmng5889CoreExtensionsTest.java    | 21 ++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/0bd5bdc2/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5889CoreExtensionsTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5889CoreExtensionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5889CoreExtensionsTest.java
index 45303d6..e2df397 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5889CoreExtensionsTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5889CoreExtensionsTest.java
@@ -37,11 +37,28 @@ public class MavenITmng5889CoreExtensionsTest
     {
         super( "[3.4.0,)" );
     }
+
     /**
      * check that <code>.mvn/</code> is found when current dir does not contain <code>pom.xml</code>
      * but path to POM set by <code>--file path/to/pom.xml</code>
      */
-    public void testCoreExtensionFile()
+    public void testCoreExtensionLongOption()
+        throws Exception
+    {
+        runCoreExtensionWithOption( "--file" );
+    }
+
+    /**
+     * check that <code>.mvn/</code> is found when current dir does not contain <code>pom.xml</code>
+     * but path to POM set by <code>-f path/to/pom.xml</code>
+     */
+    public void testCoreExtensionShortOption()
+        throws Exception
+    {
+        runCoreExtensionWithOption( "-f" );
+    }
+
+    private void runCoreExtensionWithOption( String option )
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5771-core-extensions" );
@@ -54,7 +71,7 @@ public class MavenITmng5889CoreExtensionsTest
         verifier.deleteArtifacts( "org.apache.maven.its.it-core-extensions" );
         verifier.getCliOptions().add( "-s" );
         verifier.getCliOptions().add( new File( testDir, "settings.xml" ).getAbsolutePath() );
-        verifier.getCliOptions().add( "-f" ); // --file client/pom.xml
+        verifier.getCliOptions().add( option ); // -f/--file client/pom.xml
         verifier.getCliOptions().add( new File( testDir, "client/pom.xml" ).getAbsolutePath() );
         verifier.setForkJvm( true ); // force forked JVM since we need the shell script to detect .mvn/ location
         verifier.executeGoal( "validate" );