Author: brett Date: Tue Jun 27 00:45:03 2006 New Revision: 417364 URL: http://svn.apache.org/viewvc?rev=417364&view=rev Log: test filtering overwrites when changed
Modified: maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java Modified: maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java?rev=417364&r1=417363&r2=417364&view=diff ============================================================================== --- maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java (original) +++ maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java Tue Jun 27 00:45:03 2006 @@ -591,6 +591,28 @@ assertEquals( "error in filtering using System properties", "system_property=system-property-value", reader.readLine() ); + + // update property, and generate again + System.setProperty( "system.property", "new-system-property-value" ); + + mojo.execute(); + + // validate filtered file + content = FileUtils.fileRead( expectedResourceWDirFile ); + reader = new BufferedReader( new StringReader( content ) ); + + assertEquals( "error in filtering using filter files", "resource_key=this_is_filtered", reader.readLine() ); + + assertEquals( "error in filtering using System properties", "system_key=" + System.getProperty( "user.dir" ), + reader.readLine() ); + + assertEquals( "error in filtering using project properties", "project_key=i_think_so", reader.readLine() ); + + assertEquals( "error in filtering using project properties", "project_name=Test Project ", reader.readLine() ); + + assertEquals( "error in filtering using System properties", "system_property=new-system-property-value", + reader.readLine() ); + } public void testExplodedWar_WithSourceIncludeExclude()