java/ant/test/org/apidesign/infra/ant/GrepCopyTest.java
changeset 416 9ed8788a1a4e
parent 268 fb9bf90251e3
     1.1 --- a/java/ant/test/org/apidesign/infra/ant/GrepCopyTest.java	Sun Jul 06 00:12:56 2008 +0200
     1.2 +++ b/java/ant/test/org/apidesign/infra/ant/GrepCopyTest.java	Fri Apr 03 16:32:36 2020 +0200
     1.3 @@ -81,6 +81,31 @@
     1.4          assertEquals("public interface I {\n}\n", r);
     1.5      }
     1.6      
     1.7 +    public void testURLGenerated() throws Exception {
     1.8 +        String c1 =
     1.9 +            "package ahoj;\n" +
    1.10 +            "// BEGIN: xyz\n" +
    1.11 +            "public interface I {\n" +
    1.12 +            "// FINISH: xyz\n" +
    1.13 +            "  public void get();\n" +
    1.14 +            "}" +
    1.15 +            "";
    1.16 +        File src = createFile(1, "I.java", c1);
    1.17 +        
    1.18 +        
    1.19 +        String c2 =
    1.20 +            "@xyz@";
    1.21 +        File txt = createFile(2, "in.txt", c2);
    1.22 +        
    1.23 +        execute(1, 2, "-Dfile1=" + txt, "-Dinclude1=*.java", "-Dout.url=http://xyz/", "url");
    1.24 +        
    1.25 +        String r = readFile("xyz");
    1.26 +        assertEquals("public interface I {\n}\n", r);
    1.27 +
    1.28 +        String u = readFile("xyz.url");
    1.29 +        assertEquals("http://xyz/I.java", u);
    1.30 +    }
    1.31 +    
    1.32      public void testSpacesAtBeginingAreStripped() throws Exception {
    1.33          String c1 =
    1.34              "package ahoj;\n" +