Skip to content

Commit

Permalink
[test] ensure json file placeholder can escape json mustache brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
rmannibucau committed Jan 30, 2024
1 parent b331146 commit a564f2a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a564f2a

Please sign in to comment.