@@ -0,0 +1,2620 @@
+/**%0A * Copyright (C) 2015 digitalfondue (info@digitalfondue.ch)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage ch.digitalfondue.stampo;%0A%0Aimport static java.nio.file.Files.write;%0A%0Aimport java.io.IOException;%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.nio.file.Files;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport ch.digitalfondue.stampo.TestUtils.InputOutputDirs;%0A%0Apublic class StampoMultiLocalesTest %7B%0A%0A%0A  @Test%0A  public void testMultipleLocales() throws IOException %7B%0A    try (InputOutputDirs iod = TestUtils.get()) %7B%0A      %0A      write(iod.inputDir.resolve(%22content/index.html.peb%22),%0A          %22%3Ch1%3EHello World %7B%7Blocale%7D%7D%3C/h1%3E%22.getBytes(StandardCharsets.UTF_8));%0A      %0A      Files.createDirectories(iod.inputDir.resolve(%22content/post%22));%0A      %0A      write(iod.inputDir.resolve(%22content/post/first.html%22),%0A          %22%3Ch1%3EFirst %7B%7Blocale%7D%7D%3C/h1%3E%22.getBytes(StandardCharsets.UTF_8));%0A      %0A      write(iod.inputDir.resolve(%22content/post/second.html%22),%0A          %22%3Ch1%3ESecond %7B%7Blocale%7D%7D%3C/h1%3E%22.getBytes(StandardCharsets.UTF_8));%0A      %0A      write(iod.inputDir.resolve(%22configuration.yaml%22), %22locales: %5B'en', 'de','fr'%5D%22.getBytes(StandardCharsets.UTF_8));%0A      %0A      Stampo stampo = new Stampo(iod.inputDir, iod.outputDir);%0A      %0A      stampo.build();%0A      %0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22en/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22de/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22fr/index.html%22)));%0A      %0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22en/post/first/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22de/post/first/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22fr/post/first/index.html%22)));%0A      %0A      %0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22en/post/second/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22de/post/second/index.html%22)));%0A      Assert.assertTrue(Files.exists(iod.outputDir.resolve(%22fr/post/second/index.html%22)));%0A    %7D%0A  %7D%0A%7D%0A

add initial multi locale test