|
@@ -1,7 +1,7 @@ |
|
|
/* |
|
|
/* |
|
|
* The Apache Software License, Version 1.1 |
|
|
* The Apache Software License, Version 1.1 |
|
|
* |
|
|
* |
|
|
* Copyright (c) 2001 The Apache Software Foundation. All rights |
|
|
|
|
|
|
|
|
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights |
|
|
* reserved. |
|
|
* reserved. |
|
|
* |
|
|
* |
|
|
* Redistribution and use in source and binary forms, with or without |
|
|
* Redistribution and use in source and binary forms, with or without |
|
@@ -54,8 +54,10 @@ |
|
|
package org.apache.tools.ant.taskdefs.optional; |
|
|
package org.apache.tools.ant.taskdefs.optional; |
|
|
|
|
|
|
|
|
import org.apache.tools.ant.BuildFileTest; |
|
|
import org.apache.tools.ant.BuildFileTest; |
|
|
|
|
|
import org.apache.tools.ant.util.FileUtils; |
|
|
|
|
|
|
|
|
import java.util.Properties; |
|
|
import java.util.Properties; |
|
|
|
|
|
import java.io.File; |
|
|
import java.io.FileInputStream; |
|
|
import java.io.FileInputStream; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
@@ -111,4 +113,26 @@ public class ReplaceRegExpTest extends BuildFileTest { |
|
|
assertEquals("AbcDef", after.get("NewProp")); |
|
|
assertEquals("AbcDef", after.get("NewProp")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void testDontAddNewline1() throws IOException { |
|
|
|
|
|
executeTarget("testDontAddNewline1"); |
|
|
|
|
|
assertTrue("Files match", |
|
|
|
|
|
FileUtils.newFileUtils() |
|
|
|
|
|
.contentEquals(new File("src/etc/testcases/taskdefs/optional/test.properties"), |
|
|
|
|
|
new File("src/etc/testcases/taskdefs/optional/replaceregexp2.result.properties"))); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* FIXME |
|
|
|
|
|
* |
|
|
|
|
|
* will be fixed this week, just running out of time and |
|
|
|
|
|
* committing a partly fixed version now -- Stefan |
|
|
|
|
|
public void testDontAddNewline2() throws IOException { |
|
|
|
|
|
executeTarget("testDontAddNewline2"); |
|
|
|
|
|
assertTrue("Files match", |
|
|
|
|
|
FileUtils.newFileUtils() |
|
|
|
|
|
.contentEquals(new File("src/etc/testcases/taskdefs/optional/test.properties"), |
|
|
|
|
|
new File("src/etc/testcases/taskdefs/optional/replaceregexp2.result.properties"))); |
|
|
|
|
|
} |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
}// ReplaceRegExpTest |
|
|
}// ReplaceRegExpTest |