diff --git a/bundlebee-core/src/test/java/io/yupiik/bundlebee/core/lang/SubstitutorProducerTest.java b/bundlebee-core/src/test/java/io/yupiik/bundlebee/core/lang/SubstitutorProducerTest.java index a5d46e21..03e81333 100644 --- a/bundlebee-core/src/test/java/io/yupiik/bundlebee/core/lang/SubstitutorProducerTest.java +++ b/bundlebee-core/src/test/java/io/yupiik/bundlebee/core/lang/SubstitutorProducerTest.java @@ -283,6 +283,15 @@ void jsonFileFromFile(@TempDir final Path root) throws IOException { substitutor.getOrDefault("bundlebee-json-inline-file:" + file, "failed")); } + @Test + void jsonFileFromFileWithEscaping(@TempDir final Path root) throws IOException { + final var file = root.resolve("test.txt"); + Files.writeString(file, "{\"foo\":\\{{dontescape}}}"); + assertEquals( + "{\\\"foo\\\":{{dontescape}}}", + substitutor.getOrDefault("bundlebee-json-inline-file:" + file, "failed")); + } + @Test void jsonFileFromResource() { assertEquals(