diff --git a/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java b/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java index 8eca36ae..094d4584 100644 --- a/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java @@ -4084,4 +4084,39 @@ public void shouldTransformStringToBase64() { ); } + @Test + public void shouldTransformStringToBase64() { + MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList( + "to_var('data.title','testVar')", + "add_field('testResult','This is a $[testVar]')" + ), + i -> { + i.startRecord("1"); + i.startEntity("data"); + i.literal("title", "test"); + i.endEntity(); + i.endRecord(); + i.startRecord("2"); + i.startEntity("data"); + i.literal("title", "another-test"); + i.endEntity(); + i.endRecord(); + }, + o -> { + o.get().startRecord("1"); + o.get().startEntity("data"); + o.get().literal("title", "test"); + o.get().literal("title", "This is a test"); + o.get().endEntity(); + o.get().endRecord(); + o.get().startRecord("2"); + o.get().startEntity("data"); + o.get().literal("title", "second-test"); + o.get().literal("title", "This is a second-test"); + o.get().endEntity(); + o.get().endRecord(); + } + ); + } + }