diff -r 37ad459579bc -r 913732a84aa3 ko/archetype-test/src/test/java/org/apidesign/bck2brwsr/ko/archetype/test/VerifyArchetypeTest.java --- a/ko/archetype-test/src/test/java/org/apidesign/bck2brwsr/ko/archetype/test/VerifyArchetypeTest.java Mon Sep 09 17:34:30 2013 +0200 +++ b/ko/archetype-test/src/test/java/org/apidesign/bck2brwsr/ko/archetype/test/VerifyArchetypeTest.java Mon Sep 09 20:33:52 2013 +0200 @@ -18,11 +18,15 @@ package org.apidesign.bck2brwsr.ko.archetype.test; import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.Properties; +import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.apache.maven.it.Verifier; import org.testng.annotations.Test; import static org.testng.Assert.*; +import org.testng.reporters.Files; /** * @@ -87,8 +91,18 @@ assertTrue(zip.isFile(), "Zip file with website was created"); ZipFile zf = new ZipFile(zip); - assertNotNull(zf.getEntry("public_html/index.html"), "index.html found"); + final ZipEntry index = zf.getEntry("public_html/index.html"); + assertNotNull(index, "index.html found"); + String txt = readText(zf.getInputStream(index)); + final int beg = txt.indexOf("${"); + if (beg >= 0) { + int end = txt.indexOf("}", beg); + if (end < beg) { + end = txt.length(); + } + fail("No substitutions in index.html. Found: " + txt.substring(beg, end)); + } } private Verifier generateFromArchetype(final File dir, String... params) throws Exception { @@ -112,4 +126,8 @@ v.verifyErrorFreeLog(); return v; } + + private static String readText(InputStream is) throws IOException { + return Files.readFile(is); + } }