diff --git a/src/test/java/com/hubspot/jinjava/EagerTest.java b/src/test/java/com/hubspot/jinjava/EagerTest.java index 76d5f170f..d62d359a2 100644 --- a/src/test/java/com/hubspot/jinjava/EagerTest.java +++ b/src/test/java/com/hubspot/jinjava/EagerTest.java @@ -60,7 +60,7 @@ public String getString( JinjavaInterpreter interpreter ) throws IOException { return Resources.toString( - Resources.getResource(String.format("tags/macrotag/%s", fullName)), + Resources.getResource(fullName), StandardCharsets.UTF_8 ); } @@ -89,7 +89,7 @@ public Optional getLocationResolver() { ); interpreter = new JinjavaInterpreter(parentInterpreter); expectedTemplateInterpreter = - new ExpectedTemplateInterpreter(jinjava, interpreter, "eager"); + ExpectedTemplateInterpreter.withSensibleCurrentPath(jinjava, interpreter, "eager"); localContext = interpreter.getContext(); localContext.put("deferred", DeferredValue.instance()); @@ -494,12 +494,12 @@ public void itMarksVariablesUsedAsMapKeysAsDeferred() { @Test public void itEagerlyDefersSet() { localContext.put("bar", true); - expectedTemplateInterpreter.assertExpectedOutput("eagerly-defers-set"); + expectedTemplateInterpreter.assertExpectedOutput("eagerly-defers-set/test"); } @Test public void itEvaluatesNonEagerSet() { - expectedTemplateInterpreter.assertExpectedOutput("evaluates-non-eager-set"); + expectedTemplateInterpreter.assertExpectedOutput("evaluates-non-eager-set/test"); assertThat( localContext .getDeferredTokens() @@ -520,25 +520,27 @@ public void itEvaluatesNonEagerSet() { @Test public void itDefersOnImmutableMode() { - expectedTemplateInterpreter.assertExpectedOutput("defers-on-immutable-mode"); + expectedTemplateInterpreter.assertExpectedOutput("defers-on-immutable-mode/test"); } @Test public void itDoesntAffectParentFromEagerIf() { expectedTemplateInterpreter.assertExpectedOutput( - "doesnt-affect-parent-from-eager-if" + "doesnt-affect-parent-from-eager-if/test" ); } @Test public void itDefersEagerChildScopedVars() { - expectedTemplateInterpreter.assertExpectedOutput("defers-eager-child-scoped-vars"); + expectedTemplateInterpreter.assertExpectedOutput( + "defers-eager-child-scoped-vars/test" + ); } @Test public void itSetsMultipleVarsDeferredInChild() { expectedTemplateInterpreter.assertExpectedOutput( - "sets-multiple-vars-deferred-in-child" + "sets-multiple-vars-deferred-in-child/test" ); } @@ -546,29 +548,31 @@ public void itSetsMultipleVarsDeferredInChild() { public void itSetsMultipleVarsDeferredInChildSecondPass() { localContext.put("deferred", true); expectedTemplateInterpreter.assertExpectedOutput( - "sets-multiple-vars-deferred-in-child.expected" + "sets-multiple-vars-deferred-in-child/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "sets-multiple-vars-deferred-in-child.expected" + "sets-multiple-vars-deferred-in-child/test.expected" ); } @Test public void itDoesntDoubleAppendInDeferredIfTag() { expectedTemplateInterpreter.assertExpectedOutput( - "doesnt-double-append-in-deferred-if-tag" + "doesnt-double-append-in-deferred-if-tag/test" ); } @Test public void itPrependsSetIfStateChanges() { - expectedTemplateInterpreter.assertExpectedOutput("prepends-set-if-state-changes"); + expectedTemplateInterpreter.assertExpectedOutput( + "prepends-set-if-state-changes/test" + ); } @Test public void itHandlesLoopVarAgainstDeferredInLoop() { expectedTemplateInterpreter.assertExpectedOutput( - "handles-loop-var-against-deferred-in-loop" + "handles-loop-var-against-deferred-in-loop/test" ); } @@ -576,10 +580,10 @@ public void itHandlesLoopVarAgainstDeferredInLoop() { public void itHandlesLoopVarAgainstDeferredInLoopSecondPass() { localContext.put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-loop-var-against-deferred-in-loop.expected" + "handles-loop-var-against-deferred-in-loop/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-loop-var-against-deferred-in-loop.expected" + "handles-loop-var-against-deferred-in-loop/test.expected" ); } @@ -589,7 +593,7 @@ public void itDefersMacroForDoAndPrint() { localContext.put("first", 10); localContext.put("deferred2", DeferredValue.instance()); String deferredOutput = expectedTemplateInterpreter.assertExpectedOutput( - "defers-macro-for-do-and-print" + "defers-macro-for-do-and-print/test" ); Object myList = localContext.get("my_list"); assertThat(myList).isInstanceOf(DeferredValue.class); @@ -614,19 +618,19 @@ public void itDefersMacroForDoAndPrint() { @Test public void itDefersMacroInFor() { localContext.put("my_list", new PyList(new ArrayList<>())); - expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-for"); + expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-for/test"); } @Test public void itDefersMacroInIf() { localContext.put("my_list", new PyList(new ArrayList<>())); - expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-if"); + expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-if/test"); } @Test public void itPutsDeferredImportedMacroInOutput() { expectedTemplateInterpreter.assertExpectedOutput( - "puts-deferred-imported-macro-in-output" + "puts-deferred-imported-macro-in-output/test" ); } @@ -634,17 +638,17 @@ public void itPutsDeferredImportedMacroInOutput() { public void itPutsDeferredImportedMacroInOutputSecondPass() { localContext.put("deferred", 1); expectedTemplateInterpreter.assertExpectedOutput( - "puts-deferred-imported-macro-in-output.expected" + "puts-deferred-imported-macro-in-output/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "puts-deferred-imported-macro-in-output.expected" + "puts-deferred-imported-macro-in-output/test.expected" ); } @Test public void itPutsDeferredFromedMacroInOutput() { expectedTemplateInterpreter.assertExpectedOutput( - "puts-deferred-fromed-macro-in-output" + "puts-deferred-fromed-macro-in-output/test" ); } @@ -652,7 +656,7 @@ public void itPutsDeferredFromedMacroInOutput() { public void itEagerlyDefersMacro() { localContext.put("foo", "I am foo"); localContext.put("bar", "I am bar"); - expectedTemplateInterpreter.assertExpectedOutput("eagerly-defers-macro"); + expectedTemplateInterpreter.assertExpectedOutput("eagerly-defers-macro/test"); } @Test @@ -660,32 +664,36 @@ public void itEagerlyDefersMacroSecondPass() { localContext.put("foo", "I am foo"); localContext.put("bar", "I am bar"); localContext.put("deferred", true); - expectedTemplateInterpreter.assertExpectedOutput("eagerly-defers-macro.expected"); + expectedTemplateInterpreter.assertExpectedOutput( + "eagerly-defers-macro/test.expected" + ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "eagerly-defers-macro.expected" + "eagerly-defers-macro/test.expected" ); } @Test public void itLoadsImportedMacroSyntax() { - expectedTemplateInterpreter.assertExpectedOutput("loads-imported-macro-syntax"); + expectedTemplateInterpreter.assertExpectedOutput("loads-imported-macro-syntax/test"); } @Test public void itDefersCaller() { - expectedTemplateInterpreter.assertExpectedOutput("defers-caller"); + expectedTemplateInterpreter.assertExpectedOutput("defers-caller/test"); } @Test public void itDefersCallerSecondPass() { localContext.put("deferred", "foo"); - expectedTemplateInterpreter.assertExpectedOutput("defers-caller.expected"); - expectedTemplateInterpreter.assertExpectedNonEagerOutput("defers-caller.expected"); + expectedTemplateInterpreter.assertExpectedOutput("defers-caller/test.expected"); + expectedTemplateInterpreter.assertExpectedNonEagerOutput( + "defers-caller/test.expected" + ); } @Test public void itDefersMacroInExpression() { - expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-expression"); + expectedTemplateInterpreter.assertExpectedOutput("defers-macro-in-expression/test"); } @Test @@ -693,73 +701,77 @@ public void itDefersMacroInExpressionSecondPass() { interpreter.resolveELExpression("(range(0,1))", -1); localContext.put("deferred", 5); expectedTemplateInterpreter.assertExpectedOutput( - "defers-macro-in-expression.expected" + "defers-macro-in-expression/test.expected" ); localContext.put("deferred", 5); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "defers-macro-in-expression.expected" + "defers-macro-in-expression/test.expected" ); } @Test public void itHandlesDeferredInIfchanged() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-in-ifchanged"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-deferred-in-ifchanged/test" + ); } @Test public void itDefersIfchanged() { - expectedTemplateInterpreter.assertExpectedOutput("defers-ifchanged"); + expectedTemplateInterpreter.assertExpectedOutput("defers-ifchanged/test"); } @Test public void itHandlesCycleInDeferredFor() { - expectedTemplateInterpreter.assertExpectedOutput("handles-cycle-in-deferred-for"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-cycle-in-deferred-for/test" + ); } @Test public void itHandlesCycleInDeferredForSecondPass() { localContext.put("deferred", new String[] { "foo", "bar", "foobar", "baz" }); expectedTemplateInterpreter.assertExpectedOutput( - "handles-cycle-in-deferred-for.expected" + "handles-cycle-in-deferred-for/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-cycle-in-deferred-for.expected" + "handles-cycle-in-deferred-for/test.expected" ); } @Test public void itHandlesDeferredInCycle() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-in-cycle"); + expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-in-cycle/test"); } @Test public void itHandlesDeferredCycleAs() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-cycle-as"); + expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-cycle-as/test"); } @Test public void itHandlesDeferredCycleAsSecondPass() { localContext.put("deferred", "hello"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-cycle-as.expected" + "handles-deferred-cycle-as/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-deferred-cycle-as.expected" + "handles-deferred-cycle-as/test.expected" ); } @Test public void itHandlesNonDeferringCycles() { - expectedTemplateInterpreter.assertExpectedOutput("handles-non-deferring-cycles"); + expectedTemplateInterpreter.assertExpectedOutput("handles-non-deferring-cycles/test"); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-non-deferring-cycles" + "handles-non-deferring-cycles/test" ); } @Test public void itHandlesAutoEscape() { localContext.put("myvar", "foo < bar"); - expectedTemplateInterpreter.assertExpectedOutput("handles-auto-escape"); + expectedTemplateInterpreter.assertExpectedOutput("handles-auto-escape/test"); } @Test @@ -782,8 +794,9 @@ public void itWrapsCertainOutputInRaw() { JinjavaInterpreter.pushCurrent(noNestedInterpreter); try { - new ExpectedTemplateInterpreter(jinjava, noNestedInterpreter, "eager") - .assertExpectedOutput("wraps-certain-output-in-raw"); + ExpectedTemplateInterpreter + .withSensibleCurrentPath(jinjava, noNestedInterpreter, "eager") + .assertExpectedOutput("wraps-certain-output-in-raw/test"); assertThat(noNestedInterpreter.getErrors()).isEmpty(); } finally { JinjavaInterpreter.popCurrent(); @@ -793,7 +806,7 @@ public void itWrapsCertainOutputInRaw() { @Test public void itHandlesDeferredImportVars() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-deferred-import-vars" + "handles-deferred-import-vars/test" ); } @@ -801,45 +814,49 @@ public void itHandlesDeferredImportVars() { public void itHandlesDeferredImportVarsSecondPass() { localContext.put("deferred", 1); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-import-vars.expected" + "handles-deferred-import-vars/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-deferred-import-vars.expected" + "handles-deferred-import-vars/test.expected" ); } @Test public void itHandlesNonDeferredImportVars() { expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-non-deferred-import-vars" + "handles-non-deferred-import-vars/test" + ); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-non-deferred-import-vars/test" ); - expectedTemplateInterpreter.assertExpectedOutput("handles-non-deferred-import-vars"); } @Test public void itHandlesDeferredFromImportAs() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-from-import-as"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-deferred-from-import-as/test" + ); } @Test public void itHandlesDeferredFromImportAsSecondPass() { localContext.put("deferred", 1); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-from-import-as.expected" + "handles-deferred-from-import-as/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-deferred-from-import-as.expected" + "handles-deferred-from-import-as/test.expected" ); } @Test public void itPreservesValueSetInIf() { - expectedTemplateInterpreter.assertExpectedOutput("preserves-value-set-in-if"); + expectedTemplateInterpreter.assertExpectedOutput("preserves-value-set-in-if/test"); } @Test public void itHandlesCycleWithQuote() { - expectedTemplateInterpreter.assertExpectedOutput("handles-cycle-with-quote"); + expectedTemplateInterpreter.assertExpectedOutput("handles-cycle-with-quote/test"); } @Test @@ -859,16 +876,18 @@ public void itHandlesUnknownFunctionErrors() { ); try { JinjavaInterpreter.pushCurrent(eagerInterpreter); - new ExpectedTemplateInterpreter(jinjava, eagerInterpreter, "eager") - .assertExpectedOutput("handles-unknown-function-errors"); + ExpectedTemplateInterpreter + .withSensibleCurrentPath(jinjava, eagerInterpreter, "eager") + .assertExpectedOutput("handles-unknown-function-errors/test"); } finally { JinjavaInterpreter.popCurrent(); } try { JinjavaInterpreter.pushCurrent(defaultInterpreter); - new ExpectedTemplateInterpreter(jinjava, defaultInterpreter, "eager") - .assertExpectedOutput("handles-unknown-function-errors"); + ExpectedTemplateInterpreter + .withSensibleCurrentPath(jinjava, defaultInterpreter, "eager") + .assertExpectedOutput("handles-unknown-function-errors/test"); } finally { JinjavaInterpreter.popCurrent(); } @@ -878,86 +897,98 @@ public void itHandlesUnknownFunctionErrors() { @Test public void itKeepsMaxMacroRecursionDepth() { - expectedTemplateInterpreter.assertExpectedOutput("keeps-max-macro-recursion-depth"); + expectedTemplateInterpreter.assertExpectedOutput( + "keeps-max-macro-recursion-depth/test" + ); } @Test public void itHandlesComplexRaw() { - expectedTemplateInterpreter.assertExpectedOutput("handles-complex-raw"); + expectedTemplateInterpreter.assertExpectedOutput("handles-complex-raw/test"); } @Test public void itHandlesDeferredInNamespace() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferred-in-namespace"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-deferred-in-namespace/test" + ); } @Test public void itHandlesDeferredInNamespaceSecondPass() { localContext.put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-in-namespace.expected" + "handles-deferred-in-namespace/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-deferred-in-namespace.expected" + "handles-deferred-in-namespace/test.expected" ); } @Test public void itHandlesClashingNameInMacro() { - expectedTemplateInterpreter.assertExpectedOutput("handles-clashing-name-in-macro"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-clashing-name-in-macro/test" + ); } @Test public void itHandlesClashingNameInMacroSecondPass() { localContext.put("deferred", 0); expectedTemplateInterpreter.assertExpectedOutput( - "handles-clashing-name-in-macro.expected" + "handles-clashing-name-in-macro/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-clashing-name-in-macro.expected" + "handles-clashing-name-in-macro/test.expected" ); } @Test public void itHandlesBlockSetInDeferredIf() { - expectedTemplateInterpreter.assertExpectedOutput("handles-block-set-in-deferred-if"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-block-set-in-deferred-if/test" + ); } @Test public void itHandlesBlockSetInDeferredIfSecondPass() { localContext.put("deferred", 1); expectedTemplateInterpreter.assertExpectedOutput( - "handles-block-set-in-deferred-if.expected" + "handles-block-set-in-deferred-if/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-block-set-in-deferred-if.expected" + "handles-block-set-in-deferred-if/test.expected" ); } @Test public void itDoesntOverwriteElif() { - expectedTemplateInterpreter.assertExpectedOutput("doesnt-overwrite-elif"); + expectedTemplateInterpreter.assertExpectedOutput("doesnt-overwrite-elif/test"); } @Test public void itHandlesSetAndModifiedInFor() { - expectedTemplateInterpreter.assertExpectedOutput("handles-set-and-modified-in-for"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-set-and-modified-in-for/test" + ); } @Test public void itHandlesSetInFor() { - expectedTemplateInterpreter.assertExpectedOutput("handles-set-in-for"); + expectedTemplateInterpreter.assertExpectedOutput("handles-set-in-for/test"); } @Test public void itHandlesDeferringLoopVariable() { - expectedTemplateInterpreter.assertExpectedOutput("handles-deferring-loop-variable"); + expectedTemplateInterpreter.assertExpectedOutput( + "handles-deferring-loop-variable/test" + ); } @Test public void itDefersChangesWithinDeferredSetBlock() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "defers-changes-within-deferred-set-block" + "defers-changes-within-deferred-set-block/test" ); } @@ -965,17 +996,17 @@ public void itDefersChangesWithinDeferredSetBlock() { public void itDefersChangesWithinDeferredSetBlockSecondPass() { localContext.put("deferred", 1); expectedTemplateInterpreter.assertExpectedOutput( - "defers-changes-within-deferred-set-block.expected" + "defers-changes-within-deferred-set-block/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "defers-changes-within-deferred-set-block.expected" + "defers-changes-within-deferred-set-block/test.expected" ); } @Test public void itHandlesImportWithMacrosInDeferredIf() { String template = expectedTemplateInterpreter.getFixtureTemplate( - "handles-import-with-macros-in-deferred-if" + "handles-import-with-macros-in-deferred-if/test" ); JinjavaInterpreter.getCurrent().render(template); assertThat(JinjavaInterpreter.getCurrent().getContext().getDeferredNodes()) @@ -985,7 +1016,7 @@ public void itHandlesImportWithMacrosInDeferredIf() { @Test public void itHandlesImportInDeferredIf() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-import-in-deferred-if" + "handles-import-in-deferred-if/test" ); } @@ -994,21 +1025,21 @@ public void itAllowsMetaContextVarOverriding() { interpreter.getContext().addMetaContextVariables(Collections.singleton("meta")); interpreter.getContext().put("meta", "META"); expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "allows-meta-context-var-overriding" + "allows-meta-context-var-overriding/test" ); } @Test public void itHandlesValueModifiedInMacro() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-value-modified-in-macro" + "handles-value-modified-in-macro/test" ); } @Test public void itHandlesDoubleImportModification() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-double-import-modification" + "handles-double-import-modification/test" ); } @@ -1016,17 +1047,17 @@ public void itHandlesDoubleImportModification() { public void itHandlesDoubleImportModificationSecondPass() { interpreter.getContext().put("deferred", false); expectedTemplateInterpreter.assertExpectedOutput( - "handles-double-import-modification.expected" + "handles-double-import-modification/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-double-import-modification.expected" + "handles-double-import-modification/test.expected" ); } @Test public void itHandlesSameNameImportVar() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-same-name-import-var" + "handles-same-name-import-var/test" ); } @@ -1034,52 +1065,54 @@ public void itHandlesSameNameImportVar() { public void itHandlesSameNameImportVarSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-same-name-import-var.expected" + "handles-same-name-import-var/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-same-name-import-var.expected" + "handles-same-name-import-var/test.expected" ); } @Test public void itReconstructsTypesProperly() { - expectedTemplateInterpreter.assertExpectedOutput("reconstructs-types-properly"); + expectedTemplateInterpreter.assertExpectedOutput("reconstructs-types-properly/test"); } @Test public void itRunsForLoopInsideDeferredForLoop() { expectedTemplateInterpreter.assertExpectedOutput( - "runs-for-loop-inside-deferred-for-loop" + "runs-for-loop-inside-deferred-for-loop/test" ); } @Test public void itModifiesVariableInDeferredMacro() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "modifies-variable-in-deferred-macro" + "modifies-variable-in-deferred-macro/test" ); } @Test public void itRevertsSimple() { - expectedTemplateInterpreter.assertExpectedOutput("reverts-simple"); + expectedTemplateInterpreter.assertExpectedOutput("reverts-simple/test"); } @Test public void itScopesResettingBindings() { - expectedTemplateInterpreter.assertExpectedOutput("scopes-resetting-bindings"); + expectedTemplateInterpreter.assertExpectedOutput("scopes-resetting-bindings/test"); } @Test public void itReconstructsWithMultipleLoops() { - expectedTemplateInterpreter.assertExpectedOutput("reconstructs-with-multiple-loops"); + expectedTemplateInterpreter.assertExpectedOutput( + "reconstructs-with-multiple-loops/test" + ); } @Test public void itFullyDefersFilteredMacro() { // Macro and set tag reconstruction are flipped so not exactly idempotent, but functionally identical expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "fully-defers-filtered-macro" + "fully-defers-filtered-macro/test" ); } @@ -1087,60 +1120,62 @@ public void itFullyDefersFilteredMacro() { public void itFullyDefersFilteredMacroSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "fully-defers-filtered-macro.expected" + "fully-defers-filtered-macro/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "fully-defers-filtered-macro.expected" + "fully-defers-filtered-macro/test.expected" ); } @Test public void itDefersLargeLoop() { - expectedTemplateInterpreter.assertExpectedOutput("defers-large-loop"); + expectedTemplateInterpreter.assertExpectedOutput("defers-large-loop/test"); } @Test public void itHandlesSetInInnerScope() { - expectedTemplateInterpreter.assertExpectedOutput("handles-set-in-inner-scope"); + expectedTemplateInterpreter.assertExpectedOutput("handles-set-in-inner-scope/test"); } @Test public void itCorrectlyDefersWithMultipleLoops() { expectedTemplateInterpreter.assertExpectedOutput( - "correctly-defers-with-multiple-loops" + "correctly-defers-with-multiple-loops/test" ); } @Test public void itRevertsModificationWithDeferredLoop() { expectedTemplateInterpreter.assertExpectedOutput( - "reverts-modification-with-deferred-loop" + "reverts-modification-with-deferred-loop/test" ); } @Test public void itReconstructsMapNode() { - expectedTemplateInterpreter.assertExpectedOutput("reconstructs-map-node"); + expectedTemplateInterpreter.assertExpectedOutput("reconstructs-map-node/test"); } @Test public void itReconstructsMapNodeSecondPass() { interpreter.getContext().put("deferred", "resolved"); - expectedTemplateInterpreter.assertExpectedOutput("reconstructs-map-node.expected"); + expectedTemplateInterpreter.assertExpectedOutput( + "reconstructs-map-node/test.expected" + ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "reconstructs-map-node.expected" + "reconstructs-map-node/test.expected" ); } @Test public void itHasProperLineStripping() { - expectedTemplateInterpreter.assertExpectedOutput("has-proper-line-stripping"); + expectedTemplateInterpreter.assertExpectedOutput("has-proper-line-stripping/test"); } @Test public void itDefersCallTagWithDeferredArgument() { expectedTemplateInterpreter.assertExpectedOutput( - "defers-call-tag-with-deferred-argument" + "defers-call-tag-with-deferred-argument/test" ); } @@ -1148,10 +1183,10 @@ public void itDefersCallTagWithDeferredArgument() { public void itDefersCallTagWithDeferredArgumentSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "defers-call-tag-with-deferred-argument.expected" + "defers-call-tag-with-deferred-argument/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "defers-call-tag-with-deferred-argument.expected" + "defers-call-tag-with-deferred-argument/test.expected" ); } @@ -1172,7 +1207,7 @@ public void itHandlesDuplicateVariableReferenceSpeculativeModification() { @Test public void itHandlesHigherScopeReferenceModification() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-higher-scope-reference-modification" + "handles-higher-scope-reference-modification/test" ); } @@ -1180,38 +1215,38 @@ public void itHandlesHigherScopeReferenceModification() { public void itHandlesHigherScopeReferenceModificationSecondPass() { interpreter.getContext().put("deferred", "b"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-higher-scope-reference-modification.expected" + "handles-higher-scope-reference-modification/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-higher-scope-reference-modification.expected" + "handles-higher-scope-reference-modification/test.expected" ); } @Test public void itHandlesReferenceModificationWhenSourceIsLost() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-reference-modification-when-source-is-lost" + "handles-reference-modification-when-source-is-lost/test" ); } @Test public void itDoesNotReferentialDeferForSetVars() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "does-not-referential-defer-for-set-vars" + "does-not-referential-defer-for-set-vars/test" ); } @Test public void itKeepsScopeIsolationFromForLoops() { expectedTemplateInterpreter.assertExpectedOutput( - "keeps-scope-isolation-from-for-loops" + "keeps-scope-isolation-from-for-loops/test" ); } @Test public void itDoesNotOverrideImportModificationInFor() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "does-not-override-import-modification-in-for" + "does-not-override-import-modification-in-for/test" ); } @@ -1219,17 +1254,17 @@ public void itDoesNotOverrideImportModificationInFor() { public void itDoesNotOverrideImportModificationInForSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "does-not-override-import-modification-in-for.expected" + "does-not-override-import-modification-in-for/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "does-not-override-import-modification-in-for.expected" + "does-not-override-import-modification-in-for/test.expected" ); } @Test public void itHandlesDeferredForLoopVarFromMacro() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "handles-deferred-for-loop-var-from-macro" + "handles-deferred-for-loop-var-from-macro/test" ); } @@ -1237,31 +1272,31 @@ public void itHandlesDeferredForLoopVarFromMacro() { public void itHandlesDeferredForLoopVarFromMacroSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-for-loop-var-from-macro.expected" + "handles-deferred-for-loop-var-from-macro/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "handles-deferred-for-loop-var-from-macro.expected" + "handles-deferred-for-loop-var-from-macro/test.expected" ); } @Test public void itReconstructsBlockSetVariablesInForLoop() { expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-block-set-variables-in-for-loop" + "reconstructs-block-set-variables-in-for-loop/test" ); } @Test public void itReconstructsNullVariablesInDeferredCaller() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "reconstructs-null-variables-in-deferred-caller" + "reconstructs-null-variables-in-deferred-caller/test" ); } @Test public void itReconstructsNamespaceForSetTagsUsingPeriod() { expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-namespace-for-set-tags-using-period" + "reconstructs-namespace-for-set-tags-using-period/test" ); } @@ -1269,33 +1304,35 @@ public void itReconstructsNamespaceForSetTagsUsingPeriod() { public void itReconstructsNamespaceForSetTagsUsingPeriodSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-namespace-for-set-tags-using-period.expected" + "reconstructs-namespace-for-set-tags-using-period/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "reconstructs-namespace-for-set-tags-using-period.expected" + "reconstructs-namespace-for-set-tags-using-period/test.expected" ); } @Test public void itUsesUniqueMacroNames() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "uses-unique-macro-names" + "uses-unique-macro-names/test" ); } @Test public void itUsesUniqueMacroNamesSecondPass() { interpreter.getContext().put("deferred", "resolved"); - expectedTemplateInterpreter.assertExpectedOutput("uses-unique-macro-names.expected"); + expectedTemplateInterpreter.assertExpectedOutput( + "uses-unique-macro-names/test.expected" + ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "uses-unique-macro-names.expected" + "uses-unique-macro-names/test.expected" ); } @Test public void itReconstructsWordsFromInsideNestedExpressions() { expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-words-from-inside-nested-expressions" + "reconstructs-words-from-inside-nested-expressions/test" ); } @@ -1303,19 +1340,21 @@ public void itReconstructsWordsFromInsideNestedExpressions() { public void itReconstructsWordsFromInsideNestedExpressionsSecondPass() { interpreter.getContext().put("deferred", new PyList(new ArrayList<>())); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "reconstructs-words-from-inside-nested-expressions.expected" + "reconstructs-words-from-inside-nested-expressions/test.expected" ); } @Test public void itDoesNotReconstructExtraTimes() { - expectedTemplateInterpreter.assertExpectedOutput("does-not-reconstruct-extra-times"); + expectedTemplateInterpreter.assertExpectedOutput( + "does-not-reconstruct-extra-times/test" + ); } @Test public void itAllowsModificationInResolvedForLoop() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "allows-modification-in-resolved-for-loop" + "allows-modification-in-resolved-for-loop/test" ); } @@ -1323,21 +1362,21 @@ public void itAllowsModificationInResolvedForLoop() { @Ignore // Test isn't necessary after https://github.com/HubSpot/jinjava/pull/988 got reverted public void itOnlyDefersLoopItemOnCurrentContext() { expectedTemplateInterpreter.assertExpectedOutput( - "only-defers-loop-item-on-current-context" + "only-defers-loop-item-on-current-context/test" ); } @Test public void itRunsMacroFunctionInDeferredExecutionMode() { expectedTemplateInterpreter.assertExpectedOutput( - "runs-macro-function-in-deferred-execution-mode" + "runs-macro-function-in-deferred-execution-mode/test" ); } @Test public void itKeepsMacroModificationsInScope() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "keeps-macro-modifications-in-scope" + "keeps-macro-modifications-in-scope/test" ); } @@ -1345,17 +1384,17 @@ public void itKeepsMacroModificationsInScope() { public void itKeepsMacroModificationsInScopeSecondPass() { interpreter.getContext().put("deferred", true); expectedTemplateInterpreter.assertExpectedOutput( - "keeps-macro-modifications-in-scope.expected" + "keeps-macro-modifications-in-scope/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "keeps-macro-modifications-in-scope.expected" + "keeps-macro-modifications-in-scope/test.expected" ); } @Test public void itDoesNotReconstructVariableInWrongScope() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "does-not-reconstruct-variable-in-wrong-scope" + "does-not-reconstruct-variable-in-wrong-scope/test" ); } @@ -1363,45 +1402,45 @@ public void itDoesNotReconstructVariableInWrongScope() { public void itDoesNotReconstructVariableInWrongScopeSecondPass() { interpreter.getContext().put("deferred", true); expectedTemplateInterpreter.assertExpectedOutput( - "does-not-reconstruct-variable-in-wrong-scope.expected" + "does-not-reconstruct-variable-in-wrong-scope/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "does-not-reconstruct-variable-in-wrong-scope.expected" + "does-not-reconstruct-variable-in-wrong-scope/test.expected" ); } @Test public void itReconstructsDeferredVariableEventually() { expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-deferred-variable-eventually" + "reconstructs-deferred-variable-eventually/test" ); } @Test public void itDoesntDoubleAppendInDeferredSet() { expectedTemplateInterpreter.assertExpectedOutput( - "doesnt-double-append-in-deferred-set" + "doesnt-double-append-in-deferred-set/test" ); } @Test public void itDoesntDoubleAppendInDeferredMacro() { expectedTemplateInterpreter.assertExpectedOutput( - "doesnt-double-append-in-deferred-macro" + "doesnt-double-append-in-deferred-macro/test" ); } @Test public void itDoesNotReconstructVariableInSetInWrongScope() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "does-not-reconstruct-variable-in-set-in-wrong-scope" + "does-not-reconstruct-variable-in-set-in-wrong-scope/test" ); } @Test public void itRreconstructsValueUsedInDeferredImportedMacro() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "reconstructs-value-used-in-deferred-imported-macro" + "reconstructs-value-used-in-deferred-imported-macro/test" ); } @@ -1409,17 +1448,17 @@ public void itRreconstructsValueUsedInDeferredImportedMacro() { public void itRreconstructsValueUsedInDeferredImportedMacroSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-value-used-in-deferred-imported-macro.expected" + "reconstructs-value-used-in-deferred-imported-macro/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "reconstructs-value-used-in-deferred-imported-macro.expected" + "reconstructs-value-used-in-deferred-imported-macro/test.expected" ); } @Test public void itAllowsDeferredLazyReferenceToGetOverridden() { expectedTemplateInterpreter.assertExpectedOutput( - "allows-deferred-lazy-reference-to-get-overridden" + "allows-deferred-lazy-reference-to-get-overridden/test" ); } @@ -1427,17 +1466,17 @@ public void itAllowsDeferredLazyReferenceToGetOverridden() { public void itAllowsDeferredLazyReferenceToGetOverriddenSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "allows-deferred-lazy-reference-to-get-overridden.expected" + "allows-deferred-lazy-reference-to-get-overridden/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "allows-deferred-lazy-reference-to-get-overridden.expected" + "allows-deferred-lazy-reference-to-get-overridden/test.expected" ); } @Test public void itCommitsVariablesFromDoTagWhenPartiallyResolved() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "commits-variables-from-do-tag-when-partially-resolved" + "commits-variables-from-do-tag-when-partially-resolved/test" ); } @@ -1445,24 +1484,24 @@ public void itCommitsVariablesFromDoTagWhenPartiallyResolved() { public void itCommitsVariablesFromDoTagWhenPartiallyResolvedSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "commits-variables-from-do-tag-when-partially-resolved.expected" + "commits-variables-from-do-tag-when-partially-resolved/test.expected" ); expectedTemplateInterpreter.assertExpectedOutput( - "commits-variables-from-do-tag-when-partially-resolved.expected" + "commits-variables-from-do-tag-when-partially-resolved/test.expected" ); } @Test public void itFindsDeferredWordsInsideReconstructedString() { expectedTemplateInterpreter.assertExpectedOutput( - "finds-deferred-words-inside-reconstructed-string" + "finds-deferred-words-inside-reconstructed-string/test" ); } @Test public void itReconstructsNestedValueInStringRepresentation() { expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-nested-value-in-string-representation" + "reconstructs-nested-value-in-string-representation/test" ); } @@ -1470,10 +1509,10 @@ public void itReconstructsNestedValueInStringRepresentation() { public void itReconstructsNestedValueInStringRepresentationSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-nested-value-in-string-representation.expected" + "reconstructs-nested-value-in-string-representation/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "reconstructs-nested-value-in-string-representation.expected" + "reconstructs-nested-value-in-string-representation/test.expected" ); } @@ -1481,7 +1520,7 @@ public void itReconstructsNestedValueInStringRepresentationSecondPass() { public void itDefersLoopSettingMetaContextVar() { interpreter.getContext().addMetaContextVariables(Collections.singleton("content")); expectedTemplateInterpreter.assertExpectedOutput( - "defers-loop-setting-meta-context-var" + "defers-loop-setting-meta-context-var/test" ); } @@ -1490,24 +1529,24 @@ public void itDefersLoopSettingMetaContextVarSecondPass() { interpreter.getContext().put("deferred", "resolved"); interpreter.getContext().addMetaContextVariables(Collections.singleton("content")); expectedTemplateInterpreter.assertExpectedOutput( - "defers-loop-setting-meta-context-var.expected" + "defers-loop-setting-meta-context-var/test.expected" ); expectedTemplateInterpreter.assertExpectedNonEagerOutput( - "defers-loop-setting-meta-context-var.expected" + "defers-loop-setting-meta-context-var/test.expected" ); } @Test public void itAllowsVariableSharingAliasName() { expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( - "allows-variable-sharing-alias-name" + "allows-variable-sharing-alias-name/test" ); } @Test public void itFailsOnModificationInAliasedMacro() { String input = expectedTemplateInterpreter.getFixtureTemplate( - "fails-on-modification-in-aliased-macro" + "fails-on-modification-in-aliased-macro/test" ); interpreter.render(input); // We don't support this @@ -1517,7 +1556,7 @@ public void itFailsOnModificationInAliasedMacro() { @Test public void itHandlesDeferredModificationInCaller() { expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-modification-in-caller" + "handles-deferred-modification-in-caller/test" ); } @@ -1525,33 +1564,32 @@ public void itHandlesDeferredModificationInCaller() { public void itHandlesDeferredModificationInCallerSecondPass() { interpreter.getContext().put("deferred", "c"); expectedTemplateInterpreter.assertExpectedOutput( - "handles-deferred-modification-in-caller.expected" + "handles-deferred-modification-in-caller/test.expected" ); } @Test public void itPreservesRawInsideDeferredSetBlock() { expectedTemplateInterpreter.assertExpectedOutput( - "preserves-raw-inside-deferred-set-block" + "preserves-raw-inside-deferred-set-block/test" ); } @Test public void itReconstructsAliasedMacro() { - expectedTemplateInterpreter.assertExpectedOutput("reconstructs-aliased-macro"); + expectedTemplateInterpreter.assertExpectedOutput("reconstructs-aliased-macro/test"); } @Test public void itReconstructsAliasedMacroSecondPass() { interpreter.getContext().put("deferred", "resolved"); expectedTemplateInterpreter.assertExpectedOutput( - "reconstructs-aliased-macro.expected" + "reconstructs-aliased-macro/test.expected" ); } @Test public void itReconstructsBlockPathWhenDeferred() { - interpreter.getContext().getCurrentPathStack().push("Child path", 0, 0); expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( "reconstructs-block-path-when-deferred/test" ); @@ -1567,7 +1605,6 @@ public void itReconstructsBlockPathWhenDeferredSecondPass() { @Test public void itReconstructsBlockPathWhenDeferredNested() { - interpreter.getContext().getCurrentPathStack().push("Child path", 0, 0); expectedTemplateInterpreter.assertExpectedOutputNonIdempotent( "reconstructs-block-path-when-deferred-nested/test" ); diff --git a/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.expected.expected.jinja b/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.expected.expected.jinja rename to src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.expected.expected.jinja diff --git a/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.expected.jinja b/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.expected.jinja similarity index 100% rename from src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.expected.jinja rename to src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.expected.jinja diff --git a/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.jinja b/src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.jinja similarity index 100% rename from src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.jinja rename to src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden/test.jinja diff --git a/src/test/resources/eager/allows-meta-context-var-overriding.expected.jinja b/src/test/resources/eager/allows-meta-context-var-overriding/test.expected.jinja similarity index 100% rename from src/test/resources/eager/allows-meta-context-var-overriding.expected.jinja rename to src/test/resources/eager/allows-meta-context-var-overriding/test.expected.jinja diff --git a/src/test/resources/eager/allows-meta-context-var-overriding.jinja b/src/test/resources/eager/allows-meta-context-var-overriding/test.jinja similarity index 100% rename from src/test/resources/eager/allows-meta-context-var-overriding.jinja rename to src/test/resources/eager/allows-meta-context-var-overriding/test.jinja diff --git a/src/test/resources/eager/allows-modification-in-resolved-for-loop.expected.jinja b/src/test/resources/eager/allows-modification-in-resolved-for-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/allows-modification-in-resolved-for-loop.expected.jinja rename to src/test/resources/eager/allows-modification-in-resolved-for-loop/test.expected.jinja diff --git a/src/test/resources/eager/allows-modification-in-resolved-for-loop.jinja b/src/test/resources/eager/allows-modification-in-resolved-for-loop/test.jinja similarity index 100% rename from src/test/resources/eager/allows-modification-in-resolved-for-loop.jinja rename to src/test/resources/eager/allows-modification-in-resolved-for-loop/test.jinja diff --git a/src/test/resources/eager/allows-variable-sharing-alias-name.jinja b/src/test/resources/eager/allows-variable-sharing-alias-name.jinja deleted file mode 100644 index 3b08b9bfb..000000000 --- a/src/test/resources/eager/allows-variable-sharing-alias-name.jinja +++ /dev/null @@ -1,3 +0,0 @@ -{% import 'filters.jinja' as filters %} - -{{ filters }} diff --git a/src/test/resources/tags/macrotag/filters.jinja b/src/test/resources/eager/allows-variable-sharing-alias-name/filters.jinja similarity index 100% rename from src/test/resources/tags/macrotag/filters.jinja rename to src/test/resources/eager/allows-variable-sharing-alias-name/filters.jinja diff --git a/src/test/resources/eager/allows-variable-sharing-alias-name.expected.jinja b/src/test/resources/eager/allows-variable-sharing-alias-name/test.expected.jinja similarity index 63% rename from src/test/resources/eager/allows-variable-sharing-alias-name.expected.jinja rename to src/test/resources/eager/allows-variable-sharing-alias-name/test.expected.jinja index abe4a4a2e..bb8d623e4 100644 --- a/src/test/resources/eager/allows-variable-sharing-alias-name.expected.jinja +++ b/src/test/resources/eager/allows-variable-sharing-alias-name/test.expected.jinja @@ -1,5 +1,5 @@ {% do %}\ -{% set current_path = 'filters.jinja' %}\ +{% set current_path = 'eager/allows-variable-sharing-alias-name/filters.jinja' %}\ {% set __temp_import_alias_854547461__ = {} %}\ {% for __ignored__ in [0] %} {% set bar = deferred %}\ @@ -8,10 +8,10 @@ {% set filters = {} %}\ {% do __temp_import_alias_854547461__.update({'filters': filters}) %}\ {% do filters.update(deferred) %} -{% do __temp_import_alias_854547461__.update({'bar': bar,'foo': 123,'import_resource_path': 'filters.jinja','filters': filters}) %}\ +{% do __temp_import_alias_854547461__.update({'bar': bar,'foo': 123,'import_resource_path': 'eager/allows-variable-sharing-alias-name/filters.jinja','filters': filters}) %}\ {% endfor %}\ {% set filters = __temp_import_alias_854547461__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/allows-variable-sharing-alias-name/test.jinja' %}\ {% enddo %} {{ filters }} diff --git a/src/test/resources/eager/allows-variable-sharing-alias-name/test.jinja b/src/test/resources/eager/allows-variable-sharing-alias-name/test.jinja new file mode 100644 index 000000000..87fd7dc1d --- /dev/null +++ b/src/test/resources/eager/allows-variable-sharing-alias-name/test.jinja @@ -0,0 +1,3 @@ +{% import './filters.jinja' as filters %} + +{{ filters }} diff --git a/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.expected.expected.jinja b/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.expected.expected.jinja rename to src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.expected.expected.jinja diff --git a/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.expected.jinja b/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.expected.jinja similarity index 100% rename from src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.expected.jinja rename to src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.expected.jinja diff --git a/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.jinja b/src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.jinja similarity index 100% rename from src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.jinja rename to src/test/resources/eager/commits-variables-from-do-tag-when-partially-resolved/test.jinja diff --git a/src/test/resources/eager/correctly-defers-with-multiple-loops.expected.jinja b/src/test/resources/eager/correctly-defers-with-multiple-loops/test.expected.jinja similarity index 100% rename from src/test/resources/eager/correctly-defers-with-multiple-loops.expected.jinja rename to src/test/resources/eager/correctly-defers-with-multiple-loops/test.expected.jinja diff --git a/src/test/resources/eager/correctly-defers-with-multiple-loops.jinja b/src/test/resources/eager/correctly-defers-with-multiple-loops/test.jinja similarity index 100% rename from src/test/resources/eager/correctly-defers-with-multiple-loops.jinja rename to src/test/resources/eager/correctly-defers-with-multiple-loops/test.jinja diff --git a/src/test/resources/eager/defers-call-tag-with-deferred-argument.expected.expected.jinja b/src/test/resources/eager/defers-call-tag-with-deferred-argument/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-call-tag-with-deferred-argument.expected.expected.jinja rename to src/test/resources/eager/defers-call-tag-with-deferred-argument/test.expected.expected.jinja diff --git a/src/test/resources/eager/defers-call-tag-with-deferred-argument.expected.jinja b/src/test/resources/eager/defers-call-tag-with-deferred-argument/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-call-tag-with-deferred-argument.expected.jinja rename to src/test/resources/eager/defers-call-tag-with-deferred-argument/test.expected.jinja diff --git a/src/test/resources/eager/defers-call-tag-with-deferred-argument.jinja b/src/test/resources/eager/defers-call-tag-with-deferred-argument/test.jinja similarity index 100% rename from src/test/resources/eager/defers-call-tag-with-deferred-argument.jinja rename to src/test/resources/eager/defers-call-tag-with-deferred-argument/test.jinja diff --git a/src/test/resources/eager/defers-caller.expected.expected.jinja b/src/test/resources/eager/defers-caller/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-caller.expected.expected.jinja rename to src/test/resources/eager/defers-caller/test.expected.expected.jinja diff --git a/src/test/resources/eager/defers-caller.expected.jinja b/src/test/resources/eager/defers-caller/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-caller.expected.jinja rename to src/test/resources/eager/defers-caller/test.expected.jinja diff --git a/src/test/resources/eager/defers-caller.jinja b/src/test/resources/eager/defers-caller/test.jinja similarity index 100% rename from src/test/resources/eager/defers-caller.jinja rename to src/test/resources/eager/defers-caller/test.jinja diff --git a/src/test/resources/eager/defers-changes-within-deferred-set-block.expected.expected.jinja b/src/test/resources/eager/defers-changes-within-deferred-set-block/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-changes-within-deferred-set-block.expected.expected.jinja rename to src/test/resources/eager/defers-changes-within-deferred-set-block/test.expected.expected.jinja diff --git a/src/test/resources/eager/defers-changes-within-deferred-set-block.expected.jinja b/src/test/resources/eager/defers-changes-within-deferred-set-block/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-changes-within-deferred-set-block.expected.jinja rename to src/test/resources/eager/defers-changes-within-deferred-set-block/test.expected.jinja diff --git a/src/test/resources/eager/defers-changes-within-deferred-set-block.jinja b/src/test/resources/eager/defers-changes-within-deferred-set-block/test.jinja similarity index 100% rename from src/test/resources/eager/defers-changes-within-deferred-set-block.jinja rename to src/test/resources/eager/defers-changes-within-deferred-set-block/test.jinja diff --git a/src/test/resources/eager/defers-eager-child-scoped-vars.expected.jinja b/src/test/resources/eager/defers-eager-child-scoped-vars/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-eager-child-scoped-vars.expected.jinja rename to src/test/resources/eager/defers-eager-child-scoped-vars/test.expected.jinja diff --git a/src/test/resources/eager/defers-eager-child-scoped-vars.jinja b/src/test/resources/eager/defers-eager-child-scoped-vars/test.jinja similarity index 100% rename from src/test/resources/eager/defers-eager-child-scoped-vars.jinja rename to src/test/resources/eager/defers-eager-child-scoped-vars/test.jinja diff --git a/src/test/resources/eager/defers-ifchanged.expected.jinja b/src/test/resources/eager/defers-ifchanged/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-ifchanged.expected.jinja rename to src/test/resources/eager/defers-ifchanged/test.expected.jinja diff --git a/src/test/resources/eager/defers-ifchanged.jinja b/src/test/resources/eager/defers-ifchanged/test.jinja similarity index 100% rename from src/test/resources/eager/defers-ifchanged.jinja rename to src/test/resources/eager/defers-ifchanged/test.jinja diff --git a/src/test/resources/eager/defers-large-loop.expected.jinja b/src/test/resources/eager/defers-large-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-large-loop.expected.jinja rename to src/test/resources/eager/defers-large-loop/test.expected.jinja diff --git a/src/test/resources/eager/defers-large-loop.jinja b/src/test/resources/eager/defers-large-loop/test.jinja similarity index 100% rename from src/test/resources/eager/defers-large-loop.jinja rename to src/test/resources/eager/defers-large-loop/test.jinja diff --git a/src/test/resources/eager/defers-loop-setting-meta-context-var.expected.expected.jinja b/src/test/resources/eager/defers-loop-setting-meta-context-var/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-loop-setting-meta-context-var.expected.expected.jinja rename to src/test/resources/eager/defers-loop-setting-meta-context-var/test.expected.expected.jinja diff --git a/src/test/resources/eager/defers-loop-setting-meta-context-var.expected.jinja b/src/test/resources/eager/defers-loop-setting-meta-context-var/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-loop-setting-meta-context-var.expected.jinja rename to src/test/resources/eager/defers-loop-setting-meta-context-var/test.expected.jinja diff --git a/src/test/resources/eager/defers-loop-setting-meta-context-var.jinja b/src/test/resources/eager/defers-loop-setting-meta-context-var/test.jinja similarity index 100% rename from src/test/resources/eager/defers-loop-setting-meta-context-var.jinja rename to src/test/resources/eager/defers-loop-setting-meta-context-var/test.jinja diff --git a/src/test/resources/eager/defers-macro-for-do-and-print.expected.jinja b/src/test/resources/eager/defers-macro-for-do-and-print/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-for-do-and-print.expected.jinja rename to src/test/resources/eager/defers-macro-for-do-and-print/test.expected.jinja diff --git a/src/test/resources/eager/defers-macro-for-do-and-print.jinja b/src/test/resources/eager/defers-macro-for-do-and-print/test.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-for-do-and-print.jinja rename to src/test/resources/eager/defers-macro-for-do-and-print/test.jinja diff --git a/src/test/resources/eager/defers-macro-in-expression.expected.expected.jinja b/src/test/resources/eager/defers-macro-in-expression/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-expression.expected.expected.jinja rename to src/test/resources/eager/defers-macro-in-expression/test.expected.expected.jinja diff --git a/src/test/resources/eager/defers-macro-in-expression.expected.jinja b/src/test/resources/eager/defers-macro-in-expression/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-expression.expected.jinja rename to src/test/resources/eager/defers-macro-in-expression/test.expected.jinja diff --git a/src/test/resources/eager/defers-macro-in-expression.jinja b/src/test/resources/eager/defers-macro-in-expression/test.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-expression.jinja rename to src/test/resources/eager/defers-macro-in-expression/test.jinja diff --git a/src/test/resources/eager/defers-macro-in-for.expected.jinja b/src/test/resources/eager/defers-macro-in-for/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-for.expected.jinja rename to src/test/resources/eager/defers-macro-in-for/test.expected.jinja diff --git a/src/test/resources/eager/defers-macro-in-for.jinja b/src/test/resources/eager/defers-macro-in-for/test.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-for.jinja rename to src/test/resources/eager/defers-macro-in-for/test.jinja diff --git a/src/test/resources/eager/defers-macro-in-if.expected.jinja b/src/test/resources/eager/defers-macro-in-if/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-if.expected.jinja rename to src/test/resources/eager/defers-macro-in-if/test.expected.jinja diff --git a/src/test/resources/eager/defers-macro-in-if.jinja b/src/test/resources/eager/defers-macro-in-if/test.jinja similarity index 100% rename from src/test/resources/eager/defers-macro-in-if.jinja rename to src/test/resources/eager/defers-macro-in-if/test.jinja diff --git a/src/test/resources/eager/defers-on-immutable-mode.expected.jinja b/src/test/resources/eager/defers-on-immutable-mode/test.expected.jinja similarity index 100% rename from src/test/resources/eager/defers-on-immutable-mode.expected.jinja rename to src/test/resources/eager/defers-on-immutable-mode/test.expected.jinja diff --git a/src/test/resources/eager/defers-on-immutable-mode.jinja b/src/test/resources/eager/defers-on-immutable-mode/test.jinja similarity index 100% rename from src/test/resources/eager/defers-on-immutable-mode.jinja rename to src/test/resources/eager/defers-on-immutable-mode/test.jinja diff --git a/src/test/resources/eager/does-not-override-import-modification-in-for.jinja b/src/test/resources/eager/does-not-override-import-modification-in-for.jinja deleted file mode 100644 index 7f488cbb8..000000000 --- a/src/test/resources/eager/does-not-override-import-modification-in-for.jinja +++ /dev/null @@ -1,8 +0,0 @@ -{% set foo = 'start' %} -{% for i in range(2) %} -{% import "deferred-modification.jinja" as bar1 %} -{{ bar1.foo }} -{% import "deferred-modification.jinja" as bar2 %} -{{ bar2.foo }} -{% endfor %} -{{ foo }} diff --git a/src/test/resources/eager/does-not-override-import-modification-in-for.expected.expected.jinja b/src/test/resources/eager/does-not-override-import-modification-in-for/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-override-import-modification-in-for.expected.expected.jinja rename to src/test/resources/eager/does-not-override-import-modification-in-for/test.expected.expected.jinja diff --git a/src/test/resources/eager/does-not-override-import-modification-in-for.expected.jinja b/src/test/resources/eager/does-not-override-import-modification-in-for/test.expected.jinja similarity index 70% rename from src/test/resources/eager/does-not-override-import-modification-in-for.expected.jinja rename to src/test/resources/eager/does-not-override-import-modification-in-for/test.expected.jinja index 1881836c0..3273f7c18 100644 --- a/src/test/resources/eager/does-not-override-import-modification-in-for.expected.jinja +++ b/src/test/resources/eager/does-not-override-import-modification-in-for/test.expected.jinja @@ -1,7 +1,7 @@ {% set foo = 'start' %}\ {% for __ignored__ in [0] %} {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016318__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -13,14 +13,14 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016318__.update({'foo': foo}) %} -{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar1 = __temp_import_alias_3016318__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/does-not-override-import-modification-in-for/test.jinja' %}\ {% enddo %} {{ bar1.foo }} {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016319__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -32,15 +32,15 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016319__.update({'foo': foo}) %} -{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016319__.update({'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar2 = __temp_import_alias_3016319__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/does-not-override-import-modification-in-for/test.jinja' %}\ {% enddo %} {{ bar2.foo }} {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016318__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -52,14 +52,14 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016318__.update({'foo': foo}) %} -{% do __temp_import_alias_3016318__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016318__.update({'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar1 = __temp_import_alias_3016318__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/does-not-override-import-modification-in-for/test.jinja' %}\ {% enddo %} {{ bar1.foo }} {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016319__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -71,10 +71,10 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016319__.update({'foo': foo}) %} -{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016319__.update({'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar2 = __temp_import_alias_3016319__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/does-not-override-import-modification-in-for/test.jinja' %}\ {% enddo %} {{ bar2.foo }} {% endfor %} diff --git a/src/test/resources/eager/does-not-override-import-modification-in-for/test.jinja b/src/test/resources/eager/does-not-override-import-modification-in-for/test.jinja new file mode 100644 index 000000000..e5d54cb53 --- /dev/null +++ b/src/test/resources/eager/does-not-override-import-modification-in-for/test.jinja @@ -0,0 +1,8 @@ +{% set foo = 'start' %} +{% for i in range(2) %} +{% import "../supplements/deferred-modification.jinja" as bar1 %} +{{ bar1.foo }} +{% import "../supplements/deferred-modification.jinja" as bar2 %} +{{ bar2.foo }} +{% endfor %} +{{ foo }} diff --git a/src/test/resources/eager/does-not-reconstruct-extra-times.expected.jinja b/src/test/resources/eager/does-not-reconstruct-extra-times/test.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-extra-times.expected.jinja rename to src/test/resources/eager/does-not-reconstruct-extra-times/test.expected.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-extra-times.jinja b/src/test/resources/eager/does-not-reconstruct-extra-times/test.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-extra-times.jinja rename to src/test/resources/eager/does-not-reconstruct-extra-times/test.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope.expected.jinja b/src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope/test.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope.expected.jinja rename to src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope/test.expected.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope.jinja b/src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope/test.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope.jinja rename to src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope/test.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.expected.expected.jinja b/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.expected.expected.jinja rename to src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.expected.expected.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.expected.jinja b/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.expected.jinja rename to src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.expected.jinja diff --git a/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.jinja b/src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.jinja similarity index 100% rename from src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.jinja rename to src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope/test.jinja diff --git a/src/test/resources/eager/does-not-referential-defer-for-set-vars.expected.jinja b/src/test/resources/eager/does-not-referential-defer-for-set-vars/test.expected.jinja similarity index 100% rename from src/test/resources/eager/does-not-referential-defer-for-set-vars.expected.jinja rename to src/test/resources/eager/does-not-referential-defer-for-set-vars/test.expected.jinja diff --git a/src/test/resources/eager/does-not-referential-defer-for-set-vars.jinja b/src/test/resources/eager/does-not-referential-defer-for-set-vars/test.jinja similarity index 100% rename from src/test/resources/eager/does-not-referential-defer-for-set-vars.jinja rename to src/test/resources/eager/does-not-referential-defer-for-set-vars/test.jinja diff --git a/src/test/resources/eager/doesnt-affect-parent-from-eager-if.expected.jinja b/src/test/resources/eager/doesnt-affect-parent-from-eager-if/test.expected.jinja similarity index 100% rename from src/test/resources/eager/doesnt-affect-parent-from-eager-if.expected.jinja rename to src/test/resources/eager/doesnt-affect-parent-from-eager-if/test.expected.jinja diff --git a/src/test/resources/eager/doesnt-affect-parent-from-eager-if.jinja b/src/test/resources/eager/doesnt-affect-parent-from-eager-if/test.jinja similarity index 100% rename from src/test/resources/eager/doesnt-affect-parent-from-eager-if.jinja rename to src/test/resources/eager/doesnt-affect-parent-from-eager-if/test.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-if-tag.expected.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-if-tag/test.expected.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-if-tag.expected.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-if-tag/test.expected.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-if-tag.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-if-tag/test.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-if-tag.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-if-tag/test.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-macro.expected.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-macro.expected.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-macro/test.expected.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-macro.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-macro/test.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-macro.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-macro/test.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-set.expected.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-set/test.expected.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-set.expected.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-set/test.expected.jinja diff --git a/src/test/resources/eager/doesnt-double-append-in-deferred-set.jinja b/src/test/resources/eager/doesnt-double-append-in-deferred-set/test.jinja similarity index 100% rename from src/test/resources/eager/doesnt-double-append-in-deferred-set.jinja rename to src/test/resources/eager/doesnt-double-append-in-deferred-set/test.jinja diff --git a/src/test/resources/eager/doesnt-overwrite-elif.expected.jinja b/src/test/resources/eager/doesnt-overwrite-elif/test.expected.jinja similarity index 100% rename from src/test/resources/eager/doesnt-overwrite-elif.expected.jinja rename to src/test/resources/eager/doesnt-overwrite-elif/test.expected.jinja diff --git a/src/test/resources/eager/doesnt-overwrite-elif.jinja b/src/test/resources/eager/doesnt-overwrite-elif/test.jinja similarity index 100% rename from src/test/resources/eager/doesnt-overwrite-elif.jinja rename to src/test/resources/eager/doesnt-overwrite-elif/test.jinja diff --git a/src/test/resources/eager/eagerly-defers-macro.expected.expected.jinja b/src/test/resources/eager/eagerly-defers-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/eagerly-defers-macro.expected.expected.jinja rename to src/test/resources/eager/eagerly-defers-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/eagerly-defers-macro.expected.jinja b/src/test/resources/eager/eagerly-defers-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/eagerly-defers-macro.expected.jinja rename to src/test/resources/eager/eagerly-defers-macro/test.expected.jinja diff --git a/src/test/resources/eager/eagerly-defers-macro.jinja b/src/test/resources/eager/eagerly-defers-macro/test.jinja similarity index 100% rename from src/test/resources/eager/eagerly-defers-macro.jinja rename to src/test/resources/eager/eagerly-defers-macro/test.jinja diff --git a/src/test/resources/eager/eagerly-defers-set.expected.jinja b/src/test/resources/eager/eagerly-defers-set/test.expected.jinja similarity index 100% rename from src/test/resources/eager/eagerly-defers-set.expected.jinja rename to src/test/resources/eager/eagerly-defers-set/test.expected.jinja diff --git a/src/test/resources/eager/eagerly-defers-set.jinja b/src/test/resources/eager/eagerly-defers-set/test.jinja similarity index 100% rename from src/test/resources/eager/eagerly-defers-set.jinja rename to src/test/resources/eager/eagerly-defers-set/test.jinja diff --git a/src/test/resources/eager/evaluates-non-eager-set.expected.jinja b/src/test/resources/eager/evaluates-non-eager-set/test.expected.jinja similarity index 100% rename from src/test/resources/eager/evaluates-non-eager-set.expected.jinja rename to src/test/resources/eager/evaluates-non-eager-set/test.expected.jinja diff --git a/src/test/resources/eager/evaluates-non-eager-set.jinja b/src/test/resources/eager/evaluates-non-eager-set/test.jinja similarity index 100% rename from src/test/resources/eager/evaluates-non-eager-set.jinja rename to src/test/resources/eager/evaluates-non-eager-set/test.jinja diff --git a/src/test/resources/tags/macrotag/eager/settings.jinja b/src/test/resources/eager/fails-on-modification-in-aliased-macro/settings.jinja similarity index 100% rename from src/test/resources/tags/macrotag/eager/settings.jinja rename to src/test/resources/eager/fails-on-modification-in-aliased-macro/settings.jinja diff --git a/src/test/resources/eager/fails-on-modification-in-aliased-macro.jinja b/src/test/resources/eager/fails-on-modification-in-aliased-macro/test.jinja similarity index 64% rename from src/test/resources/eager/fails-on-modification-in-aliased-macro.jinja rename to src/test/resources/eager/fails-on-modification-in-aliased-macro/test.jinja index 4d01c9c84..54f2dd54d 100644 --- a/src/test/resources/eager/fails-on-modification-in-aliased-macro.jinja +++ b/src/test/resources/eager/fails-on-modification-in-aliased-macro/test.jinja @@ -1,4 +1,4 @@ -{% import 'eager/settings.jinja' as shared %} +{% import './settings.jinja' as shared %} {% if deferred %} {{ shared.load_settings() }} diff --git a/src/test/resources/eager/finds-deferred-words-inside-reconstructed-string.expected.jinja b/src/test/resources/eager/finds-deferred-words-inside-reconstructed-string/test.expected.jinja similarity index 100% rename from src/test/resources/eager/finds-deferred-words-inside-reconstructed-string.expected.jinja rename to src/test/resources/eager/finds-deferred-words-inside-reconstructed-string/test.expected.jinja diff --git a/src/test/resources/eager/finds-deferred-words-inside-reconstructed-string.jinja b/src/test/resources/eager/finds-deferred-words-inside-reconstructed-string/test.jinja similarity index 100% rename from src/test/resources/eager/finds-deferred-words-inside-reconstructed-string.jinja rename to src/test/resources/eager/finds-deferred-words-inside-reconstructed-string/test.jinja diff --git a/src/test/resources/eager/fully-defers-filtered-macro.expected.expected.jinja b/src/test/resources/eager/fully-defers-filtered-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/fully-defers-filtered-macro.expected.expected.jinja rename to src/test/resources/eager/fully-defers-filtered-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/fully-defers-filtered-macro.expected.jinja b/src/test/resources/eager/fully-defers-filtered-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/fully-defers-filtered-macro.expected.jinja rename to src/test/resources/eager/fully-defers-filtered-macro/test.expected.jinja diff --git a/src/test/resources/eager/fully-defers-filtered-macro.jinja b/src/test/resources/eager/fully-defers-filtered-macro/test.jinja similarity index 100% rename from src/test/resources/eager/fully-defers-filtered-macro.jinja rename to src/test/resources/eager/fully-defers-filtered-macro/test.jinja diff --git a/src/test/resources/eager/handles-auto-escape.expected.jinja b/src/test/resources/eager/handles-auto-escape/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-auto-escape.expected.jinja rename to src/test/resources/eager/handles-auto-escape/test.expected.jinja diff --git a/src/test/resources/eager/handles-auto-escape.jinja b/src/test/resources/eager/handles-auto-escape/test.jinja similarity index 100% rename from src/test/resources/eager/handles-auto-escape.jinja rename to src/test/resources/eager/handles-auto-escape/test.jinja diff --git a/src/test/resources/eager/handles-block-set-in-deferred-if.expected.expected.jinja b/src/test/resources/eager/handles-block-set-in-deferred-if/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-block-set-in-deferred-if.expected.expected.jinja rename to src/test/resources/eager/handles-block-set-in-deferred-if/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-block-set-in-deferred-if.expected.jinja b/src/test/resources/eager/handles-block-set-in-deferred-if/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-block-set-in-deferred-if.expected.jinja rename to src/test/resources/eager/handles-block-set-in-deferred-if/test.expected.jinja diff --git a/src/test/resources/eager/handles-block-set-in-deferred-if.jinja b/src/test/resources/eager/handles-block-set-in-deferred-if/test.jinja similarity index 100% rename from src/test/resources/eager/handles-block-set-in-deferred-if.jinja rename to src/test/resources/eager/handles-block-set-in-deferred-if/test.jinja diff --git a/src/test/resources/eager/handles-clashing-name-in-macro.expected.expected.jinja b/src/test/resources/eager/handles-clashing-name-in-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-clashing-name-in-macro.expected.expected.jinja rename to src/test/resources/eager/handles-clashing-name-in-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-clashing-name-in-macro.expected.jinja b/src/test/resources/eager/handles-clashing-name-in-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-clashing-name-in-macro.expected.jinja rename to src/test/resources/eager/handles-clashing-name-in-macro/test.expected.jinja diff --git a/src/test/resources/eager/handles-clashing-name-in-macro.jinja b/src/test/resources/eager/handles-clashing-name-in-macro/test.jinja similarity index 100% rename from src/test/resources/eager/handles-clashing-name-in-macro.jinja rename to src/test/resources/eager/handles-clashing-name-in-macro/test.jinja diff --git a/src/test/resources/eager/handles-complex-raw.expected.jinja b/src/test/resources/eager/handles-complex-raw/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-complex-raw.expected.jinja rename to src/test/resources/eager/handles-complex-raw/test.expected.jinja diff --git a/src/test/resources/eager/handles-complex-raw.jinja b/src/test/resources/eager/handles-complex-raw/test.jinja similarity index 100% rename from src/test/resources/eager/handles-complex-raw.jinja rename to src/test/resources/eager/handles-complex-raw/test.jinja diff --git a/src/test/resources/eager/handles-cycle-in-deferred-for.expected.expected.jinja b/src/test/resources/eager/handles-cycle-in-deferred-for/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-cycle-in-deferred-for.expected.expected.jinja rename to src/test/resources/eager/handles-cycle-in-deferred-for/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-cycle-in-deferred-for.expected.jinja b/src/test/resources/eager/handles-cycle-in-deferred-for/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-cycle-in-deferred-for.expected.jinja rename to src/test/resources/eager/handles-cycle-in-deferred-for/test.expected.jinja diff --git a/src/test/resources/eager/handles-cycle-in-deferred-for.jinja b/src/test/resources/eager/handles-cycle-in-deferred-for/test.jinja similarity index 100% rename from src/test/resources/eager/handles-cycle-in-deferred-for.jinja rename to src/test/resources/eager/handles-cycle-in-deferred-for/test.jinja diff --git a/src/test/resources/eager/handles-cycle-with-quote.expected.jinja b/src/test/resources/eager/handles-cycle-with-quote/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-cycle-with-quote.expected.jinja rename to src/test/resources/eager/handles-cycle-with-quote/test.expected.jinja diff --git a/src/test/resources/eager/handles-cycle-with-quote.jinja b/src/test/resources/eager/handles-cycle-with-quote/test.jinja similarity index 100% rename from src/test/resources/eager/handles-cycle-with-quote.jinja rename to src/test/resources/eager/handles-cycle-with-quote/test.jinja diff --git a/src/test/resources/eager/handles-deferred-cycle-as.expected.expected.jinja b/src/test/resources/eager/handles-deferred-cycle-as/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-cycle-as.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-cycle-as/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-cycle-as.expected.jinja b/src/test/resources/eager/handles-deferred-cycle-as/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-cycle-as.expected.jinja rename to src/test/resources/eager/handles-deferred-cycle-as/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-cycle-as.jinja b/src/test/resources/eager/handles-deferred-cycle-as/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-cycle-as.jinja rename to src/test/resources/eager/handles-deferred-cycle-as/test.jinja diff --git a/src/test/resources/eager/handles-deferred-for-loop-var-from-macro.expected.expected.jinja b/src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-for-loop-var-from-macro.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-for-loop-var-from-macro.expected.jinja b/src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-for-loop-var-from-macro.expected.jinja rename to src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-for-loop-var-from-macro.jinja b/src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-for-loop-var-from-macro.jinja rename to src/test/resources/eager/handles-deferred-for-loop-var-from-macro/test.jinja diff --git a/src/test/resources/eager/handles-deferred-from-import-as.expected.expected.jinja b/src/test/resources/eager/handles-deferred-from-import-as/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-from-import-as.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-from-import-as/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-from-import-as.expected.jinja b/src/test/resources/eager/handles-deferred-from-import-as/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-from-import-as.expected.jinja rename to src/test/resources/eager/handles-deferred-from-import-as/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-from-import-as.jinja b/src/test/resources/eager/handles-deferred-from-import-as/test.jinja similarity index 50% rename from src/test/resources/eager/handles-deferred-from-import-as.jinja rename to src/test/resources/eager/handles-deferred-from-import-as/test.jinja index 193a3e315..5716196eb 100644 --- a/src/test/resources/eager/handles-deferred-from-import-as.jinja +++ b/src/test/resources/eager/handles-deferred-from-import-as/test.jinja @@ -1,4 +1,4 @@ {%- set myname = deferred + (3 + 4) -%} -{%- from "macro-and-set.jinja" import foo as from_foo, bar as from_bar -%} +{%- from "../supplements/macro-and-set.jinja" import foo as from_foo, bar as from_bar -%} from_foo: {{ from_foo() }} from_bar: {{ from_bar }} diff --git a/src/test/resources/eager/handles-deferred-import-vars.expected.expected.jinja b/src/test/resources/eager/handles-deferred-import-vars/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-import-vars.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-import-vars/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-import-vars.expected.jinja b/src/test/resources/eager/handles-deferred-import-vars/test.expected.jinja similarity index 70% rename from src/test/resources/eager/handles-deferred-import-vars.expected.jinja rename to src/test/resources/eager/handles-deferred-import-vars/test.expected.jinja index b0c1d90af..ec5c2320d 100644 --- a/src/test/resources/eager/handles-deferred-import-vars.expected.jinja +++ b/src/test/resources/eager/handles-deferred-import-vars/test.expected.jinja @@ -8,18 +8,18 @@ bar: {{ bar }} --- {% set myname = deferred + 7 %}\ {% do %}\ -{% set current_path = 'macro-and-set.jinja' %}\ +{% set current_path = 'eager/supplements/macro-and-set.jinja' %}\ {% set __temp_import_alias_902286926__ = {} %}\ {% for __ignored__ in [0] %} {% set bar = myname + 19 %}\ {% do __temp_import_alias_902286926__.update({'bar': bar}) %} Hello {{ myname }} -{% do __temp_import_alias_902286926__.update({'import_resource_path': 'macro-and-set.jinja'}) %}\ +{% do __temp_import_alias_902286926__.update({'import_resource_path': 'eager/supplements/macro-and-set.jinja'}) %}\ {% endfor %}\ {% set simple = __temp_import_alias_902286926__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-deferred-import-vars/test.jinja' %}\ {% enddo %}\ -simple.foo: {% set deferred_import_resource_path = 'macro-and-set.jinja' %}\ +simple.foo: {% set deferred_import_resource_path = 'eager/supplements/macro-and-set.jinja' %}\ {% macro simple.foo() %}\ Hello {{ myname }}\ {% endmacro %}\ diff --git a/src/test/resources/eager/handles-deferred-import-vars.jinja b/src/test/resources/eager/handles-deferred-import-vars/test.jinja similarity index 57% rename from src/test/resources/eager/handles-deferred-import-vars.jinja rename to src/test/resources/eager/handles-deferred-import-vars/test.jinja index 885f2d3f7..303c076aa 100644 --- a/src/test/resources/eager/handles-deferred-import-vars.jinja +++ b/src/test/resources/eager/handles-deferred-import-vars/test.jinja @@ -1,9 +1,9 @@ {%- set myname = deferred + (1 + 2) -%} -{%- from "macro-and-set.jinja" import foo, bar -%} +{%- from "../supplements/macro-and-set.jinja" import foo, bar -%} foo: {{ foo() }} bar: {{ bar }} --- {% set myname = deferred + (3 + 4) -%} -{%- import "macro-and-set.jinja" as simple -%} +{%- import "../supplements/macro-and-set.jinja" as simple -%} simple.foo: {{ simple.foo() }} simple.bar: {{ simple.bar }} diff --git a/src/test/resources/eager/handles-deferred-in-cycle.expected.jinja b/src/test/resources/eager/handles-deferred-in-cycle/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-cycle.expected.jinja rename to src/test/resources/eager/handles-deferred-in-cycle/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-in-cycle.jinja b/src/test/resources/eager/handles-deferred-in-cycle/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-cycle.jinja rename to src/test/resources/eager/handles-deferred-in-cycle/test.jinja diff --git a/src/test/resources/eager/handles-deferred-in-ifchanged.expected.jinja b/src/test/resources/eager/handles-deferred-in-ifchanged/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-ifchanged.expected.jinja rename to src/test/resources/eager/handles-deferred-in-ifchanged/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-in-ifchanged.jinja b/src/test/resources/eager/handles-deferred-in-ifchanged/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-ifchanged.jinja rename to src/test/resources/eager/handles-deferred-in-ifchanged/test.jinja diff --git a/src/test/resources/eager/handles-deferred-in-namespace.expected.expected.jinja b/src/test/resources/eager/handles-deferred-in-namespace/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-namespace.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-in-namespace/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-in-namespace.expected.jinja b/src/test/resources/eager/handles-deferred-in-namespace/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-namespace.expected.jinja rename to src/test/resources/eager/handles-deferred-in-namespace/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-in-namespace.jinja b/src/test/resources/eager/handles-deferred-in-namespace/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-in-namespace.jinja rename to src/test/resources/eager/handles-deferred-in-namespace/test.jinja diff --git a/src/test/resources/eager/handles-deferred-modification-in-caller.expected.expected.jinja b/src/test/resources/eager/handles-deferred-modification-in-caller/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-modification-in-caller.expected.expected.jinja rename to src/test/resources/eager/handles-deferred-modification-in-caller/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-modification-in-caller.expected.jinja b/src/test/resources/eager/handles-deferred-modification-in-caller/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-modification-in-caller.expected.jinja rename to src/test/resources/eager/handles-deferred-modification-in-caller/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferred-modification-in-caller.jinja b/src/test/resources/eager/handles-deferred-modification-in-caller/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferred-modification-in-caller.jinja rename to src/test/resources/eager/handles-deferred-modification-in-caller/test.jinja diff --git a/src/test/resources/eager/handles-deferring-loop-variable.expected.jinja b/src/test/resources/eager/handles-deferring-loop-variable/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-deferring-loop-variable.expected.jinja rename to src/test/resources/eager/handles-deferring-loop-variable/test.expected.jinja diff --git a/src/test/resources/eager/handles-deferring-loop-variable.jinja b/src/test/resources/eager/handles-deferring-loop-variable/test.jinja similarity index 100% rename from src/test/resources/eager/handles-deferring-loop-variable.jinja rename to src/test/resources/eager/handles-deferring-loop-variable/test.jinja diff --git a/src/test/resources/eager/handles-double-import-modification.jinja b/src/test/resources/eager/handles-double-import-modification.jinja deleted file mode 100644 index f43bdf282..000000000 --- a/src/test/resources/eager/handles-double-import-modification.jinja +++ /dev/null @@ -1,6 +0,0 @@ -{% import "deferred-modification.jinja" as bar1 %} ---- -{% import "deferred-modification.jinja" as bar2 %} ---- -{{ bar1.foo }} -{{ bar2.foo }} diff --git a/src/test/resources/eager/handles-double-import-modification.expected.expected.jinja b/src/test/resources/eager/handles-double-import-modification/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-double-import-modification.expected.expected.jinja rename to src/test/resources/eager/handles-double-import-modification/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-double-import-modification.expected.jinja b/src/test/resources/eager/handles-double-import-modification/test.expected.jinja similarity index 67% rename from src/test/resources/eager/handles-double-import-modification.expected.jinja rename to src/test/resources/eager/handles-double-import-modification/test.expected.jinja index 1030e1895..9cb830dff 100644 --- a/src/test/resources/eager/handles-double-import-modification.expected.jinja +++ b/src/test/resources/eager/handles-double-import-modification/test.expected.jinja @@ -1,5 +1,5 @@ {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016318__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -11,14 +11,14 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016318__.update({'foo': foo}) %} -{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar1 = __temp_import_alias_3016318__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-double-import-modification/test.jinja' %}\ {% enddo %} --- {% do %}\ -{% set current_path = 'deferred-modification.jinja' %}\ +{% set current_path = 'eager/supplements/deferred-modification.jinja' %}\ {% set __temp_import_alias_3016319__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -30,11 +30,11 @@ {% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ {% do __temp_import_alias_3016319__.update({'foo': foo}) %} -{% do __temp_import_alias_3016319__.update({'foo': foo,'import_resource_path': 'deferred-modification.jinja'}) %}\ +{% do __temp_import_alias_3016319__.update({'foo': foo,'import_resource_path': 'eager/supplements/deferred-modification.jinja'}) %}\ {% endfor %}\ {% set bar2 = __temp_import_alias_3016319__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-double-import-modification/test.jinja' %}\ {% enddo %} --- {{ bar1.foo }} -{{ bar2.foo }} \ No newline at end of file +{{ bar2.foo }} diff --git a/src/test/resources/eager/handles-double-import-modification/test.jinja b/src/test/resources/eager/handles-double-import-modification/test.jinja new file mode 100644 index 000000000..ba3e60e62 --- /dev/null +++ b/src/test/resources/eager/handles-double-import-modification/test.jinja @@ -0,0 +1,6 @@ +{% import "../supplements/deferred-modification.jinja" as bar1 %} +--- +{% import "../supplements/deferred-modification.jinja" as bar2 %} +--- +{{ bar1.foo }} +{{ bar2.foo }} diff --git a/src/test/resources/eager/handles-eager-print-and-do.expected.jinja b/src/test/resources/eager/handles-eager-print-and-do/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-eager-print-and-do.expected.jinja rename to src/test/resources/eager/handles-eager-print-and-do/test.expected.jinja diff --git a/src/test/resources/eager/handles-eager-print-and-do.jinja b/src/test/resources/eager/handles-eager-print-and-do/test.jinja similarity index 100% rename from src/test/resources/eager/handles-eager-print-and-do.jinja rename to src/test/resources/eager/handles-eager-print-and-do/test.jinja diff --git a/src/test/resources/eager/handles-higher-scope-reference-modification.expected.expected.jinja b/src/test/resources/eager/handles-higher-scope-reference-modification/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-higher-scope-reference-modification.expected.expected.jinja rename to src/test/resources/eager/handles-higher-scope-reference-modification/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-higher-scope-reference-modification.expected.jinja b/src/test/resources/eager/handles-higher-scope-reference-modification/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-higher-scope-reference-modification.expected.jinja rename to src/test/resources/eager/handles-higher-scope-reference-modification/test.expected.jinja diff --git a/src/test/resources/eager/handles-higher-scope-reference-modification.jinja b/src/test/resources/eager/handles-higher-scope-reference-modification/test.jinja similarity index 100% rename from src/test/resources/eager/handles-higher-scope-reference-modification.jinja rename to src/test/resources/eager/handles-higher-scope-reference-modification/test.jinja diff --git a/src/test/resources/eager/handles-import-in-deferred-if.expected.jinja b/src/test/resources/eager/handles-import-in-deferred-if/test.expected.jinja similarity index 65% rename from src/test/resources/eager/handles-import-in-deferred-if.expected.jinja rename to src/test/resources/eager/handles-import-in-deferred-if/test.expected.jinja index 0659605a1..7d1cd45a0 100644 --- a/src/test/resources/eager/handles-import-in-deferred-if.expected.jinja +++ b/src/test/resources/eager/handles-import-in-deferred-if/test.expected.jinja @@ -1,21 +1,21 @@ {% set primary_line_height = 100 %}\ {% if deferred %} {% do %}\ -{% set current_path = '../settag/set-val.jinja' %}\ +{% set current_path = 'eager/supplements/set-val.jinja' %}\ {% set __temp_import_alias_902286926__ = {} %}\ {% for __ignored__ in [0] %}\ {% set primary_line_height = 42 %}\ {% do __temp_import_alias_902286926__.update({'primary_line_height': primary_line_height}) %}\ -{% do __temp_import_alias_902286926__.update({'primary_line_height': 42,'import_resource_path': '../settag/set-val.jinja'}) %}\ +{% do __temp_import_alias_902286926__.update({'primary_line_height': 42,'import_resource_path': 'eager/supplements/set-val.jinja'}) %}\ {% endfor %}\ {% set simple = __temp_import_alias_902286926__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-import-in-deferred-if/test.jinja' %}\ {% enddo %} {% else %} {% do %}\ -{% set current_path = '../settag/set-val.jinja' %}\ +{% set current_path = 'eager/supplements/set-val.jinja' %}\ {% set primary_line_height = 42 %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-import-in-deferred-if/test.jinja' %}\ {% enddo %} {% endif %} simple.primary_line_height (deferred): {{ simple.primary_line_height }} diff --git a/src/test/resources/eager/handles-import-in-deferred-if.jinja b/src/test/resources/eager/handles-import-in-deferred-if/test.jinja similarity index 75% rename from src/test/resources/eager/handles-import-in-deferred-if.jinja rename to src/test/resources/eager/handles-import-in-deferred-if/test.jinja index 8ed6f36be..5cb4cb5da 100644 --- a/src/test/resources/eager/handles-import-in-deferred-if.jinja +++ b/src/test/resources/eager/handles-import-in-deferred-if/test.jinja @@ -1,9 +1,9 @@ {% set primary_line_height = 100 %} {% set secondary_line_height = 200 %} {% if deferred %} -{% import "../settag/set-val.jinja" as simple %} +{% import "../supplements/set-val.jinja" as simple %} {% else %} -{% import "../settag/set-val.jinja" %} +{% import "../supplements/set-val.jinja" %} {% endif %} simple.primary_line_height (deferred): {{ simple.primary_line_height }} primary_line_height (deferred): {{ primary_line_height }} diff --git a/src/test/resources/eager/handles-import-with-macros-in-deferred-if.jinja b/src/test/resources/eager/handles-import-with-macros-in-deferred-if/test.jinja similarity index 50% rename from src/test/resources/eager/handles-import-with-macros-in-deferred-if.jinja rename to src/test/resources/eager/handles-import-with-macros-in-deferred-if/test.jinja index 4bbe1af62..956af0381 100644 --- a/src/test/resources/eager/handles-import-with-macros-in-deferred-if.jinja +++ b/src/test/resources/eager/handles-import-with-macros-in-deferred-if/test.jinja @@ -1,8 +1,8 @@ {% set myname = 'person' %} {% if deferred %} -{%- import "macro-and-set.jinja" as simple -%} +{%- import "../supplements/macro-and-set.jinja" as simple -%} {% else %} -{%- import "macro-and-set.jinja" as simple -%} +{%- import "../supplements/macro-and-set.jinja" as simple -%} {% endif %} simple.foo: {{ simple.foo() }} simple.bar: {{ simple.bar }} diff --git a/src/test/resources/eager/handles-loop-var-against-deferred-in-loop.expected.expected.jinja b/src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-loop-var-against-deferred-in-loop.expected.expected.jinja rename to src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.expected.expected.jinja diff --git a/src/test/resources/eager/handles-loop-var-against-deferred-in-loop.expected.jinja b/src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-loop-var-against-deferred-in-loop.expected.jinja rename to src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.expected.jinja diff --git a/src/test/resources/eager/handles-loop-var-against-deferred-in-loop.jinja b/src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.jinja similarity index 100% rename from src/test/resources/eager/handles-loop-var-against-deferred-in-loop.jinja rename to src/test/resources/eager/handles-loop-var-against-deferred-in-loop/test.jinja diff --git a/src/test/resources/eager/handles-non-deferred-import-vars.expected.jinja b/src/test/resources/eager/handles-non-deferred-import-vars/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-non-deferred-import-vars.expected.jinja rename to src/test/resources/eager/handles-non-deferred-import-vars/test.expected.jinja diff --git a/src/test/resources/eager/handles-non-deferred-import-vars.jinja b/src/test/resources/eager/handles-non-deferred-import-vars/test.jinja similarity index 54% rename from src/test/resources/eager/handles-non-deferred-import-vars.jinja rename to src/test/resources/eager/handles-non-deferred-import-vars/test.jinja index 6d6a99c62..37982ee09 100644 --- a/src/test/resources/eager/handles-non-deferred-import-vars.jinja +++ b/src/test/resources/eager/handles-non-deferred-import-vars/test.jinja @@ -1,9 +1,9 @@ {%- set myname = (1 + 2) -%} -{%- from "macro-and-set.jinja" import foo, bar -%} +{%- from "../supplements/macro-and-set.jinja" import foo, bar -%} foo: {{ foo() }} bar: {{ bar }} --- {% set myname = (3 + 4) -%} -{%- import "macro-and-set.jinja" as simple -%} +{%- import "../supplements/macro-and-set.jinja" as simple -%} simple.foo: {{ simple.foo() }} simple.bar: {{ simple.bar }} diff --git a/src/test/resources/eager/handles-non-deferring-cycles.expected.jinja b/src/test/resources/eager/handles-non-deferring-cycles/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-non-deferring-cycles.expected.jinja rename to src/test/resources/eager/handles-non-deferring-cycles/test.expected.jinja diff --git a/src/test/resources/eager/handles-non-deferring-cycles.jinja b/src/test/resources/eager/handles-non-deferring-cycles/test.jinja similarity index 100% rename from src/test/resources/eager/handles-non-deferring-cycles.jinja rename to src/test/resources/eager/handles-non-deferring-cycles/test.jinja diff --git a/src/test/resources/eager/handles-reference-modification-when-source-is-lost.expected.jinja b/src/test/resources/eager/handles-reference-modification-when-source-is-lost/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-reference-modification-when-source-is-lost.expected.jinja rename to src/test/resources/eager/handles-reference-modification-when-source-is-lost/test.expected.jinja diff --git a/src/test/resources/eager/handles-reference-modification-when-source-is-lost.jinja b/src/test/resources/eager/handles-reference-modification-when-source-is-lost/test.jinja similarity index 100% rename from src/test/resources/eager/handles-reference-modification-when-source-is-lost.jinja rename to src/test/resources/eager/handles-reference-modification-when-source-is-lost/test.jinja diff --git a/src/test/resources/eager/handles-same-name-import-var.expected.expected.jinja b/src/test/resources/eager/handles-same-name-import-var.expected.expected.jinja deleted file mode 100644 index 95ad60b2c..000000000 --- a/src/test/resources/eager/handles-same-name-import-var.expected.expected.jinja +++ /dev/null @@ -1 +0,0 @@ -[fn:map_entry('import_resource_path', '../settag/set-var-and-deferred.jinja'), fn:map_entry('my_var', {'my_var': {'foo': 'bar'} , 'value': 'resolved', 'import_resource_path': '../settag/set-var-and-deferred.jinja'} ), fn:map_entry('path', ''), fn:map_entry('value', 'resolved')] diff --git a/src/test/resources/eager/handles-same-name-import-var/set-var-and-deferred.jinja b/src/test/resources/eager/handles-same-name-import-var/set-var-and-deferred.jinja new file mode 100644 index 000000000..74989f05e --- /dev/null +++ b/src/test/resources/eager/handles-same-name-import-var/set-var-and-deferred.jinja @@ -0,0 +1,6 @@ +{% if deferred %} +{% do %}{% set path = 'eager/handles-same-name-import-var/set-var-and-deferred.jinja' %}{% set value = null %}{% set my_var = {} %}{% set my_var = {'foo': 'bar'} %}{% set my_var = {'my_var': my_var} %} +{% set value = deferred %}{% do my_var.update({"value": value}) %} +{% do my_var.update({'import_resource_path': 'eager/handles-same-name-import-var/set-var-and-deferred.jinja','value': value}) %}{% set path = '' %}{% enddo %} +{{ my_var }} +{% endif %} diff --git a/src/test/resources/eager/handles-same-name-import-var/test.expected.expected.jinja b/src/test/resources/eager/handles-same-name-import-var/test.expected.expected.jinja new file mode 100644 index 000000000..1baae9e13 --- /dev/null +++ b/src/test/resources/eager/handles-same-name-import-var/test.expected.expected.jinja @@ -0,0 +1 @@ +[fn:map_entry('import_resource_path', 'eager/handles-same-name-import-var/set-var-and-deferred.jinja'), fn:map_entry('my_var', {'my_var': {'foo': 'bar'} , 'value': 'resolved', 'import_resource_path': 'eager/handles-same-name-import-var/set-var-and-deferred.jinja'} ), fn:map_entry('path', ''), fn:map_entry('value', 'resolved')] \ No newline at end of file diff --git a/src/test/resources/eager/handles-same-name-import-var.expected.jinja b/src/test/resources/eager/handles-same-name-import-var/test.expected.jinja similarity index 74% rename from src/test/resources/eager/handles-same-name-import-var.expected.jinja rename to src/test/resources/eager/handles-same-name-import-var/test.expected.jinja index 1899f2a94..7db97c471 100644 --- a/src/test/resources/eager/handles-same-name-import-var.expected.jinja +++ b/src/test/resources/eager/handles-same-name-import-var/test.expected.jinja @@ -1,6 +1,6 @@ {% if deferred %} {% do %}\ -{% set current_path = '../settag/set-var-and-deferred.jinja' %}\ +{% set current_path = 'eager/handles-same-name-import-var/set-var-and-deferred.jinja' %}\ {% set __temp_import_alias_1059697132__ = {} %}\ {% for __ignored__ in [0] %}\ {% if deferred %} @@ -9,7 +9,7 @@ {% do __temp_import_alias_1059697132__.update({'path': path}) %}\ {% set my_var = {'my_var': {'foo': 'bar'} } %}\ {% do __temp_import_alias_1059697132__.update({'my_var': my_var}) %}\ -{% set path = '../settag/set-var-and-deferred.jinja' %}\ +{% set path = 'eager/handles-same-name-import-var/set-var-and-deferred.jinja' %}\ {% do __temp_import_alias_1059697132__.update({'path': path}) %}\ {% set value = null %}\ {% do __temp_import_alias_1059697132__.update({'value': value}) %}\ @@ -24,16 +24,16 @@ {% set my_var = {'my_var': {'foo': 'bar'} } %}\ {% do __temp_import_alias_1059697132__.update({'my_var': my_var}) %}\ {% do my_var.update({'value': value}) %} -{% do my_var.update({'import_resource_path': '../settag/set-var-and-deferred.jinja', 'value': value}) %}\ +{% do my_var.update({'import_resource_path': 'eager/handles-same-name-import-var/set-var-and-deferred.jinja', 'value': value}) %}\ {% set path = '' %}\ {% do __temp_import_alias_1059697132__.update({'path': path}) %}\ {% enddo %} {{ my_var }} {% endif %} -{% do __temp_import_alias_1059697132__.update({'path': path,'import_resource_path': '../settag/set-var-and-deferred.jinja','value': value}) %}\ +{% do __temp_import_alias_1059697132__.update({'path': path,'import_resource_path': 'eager/handles-same-name-import-var/set-var-and-deferred.jinja','value': value}) %}\ {% endfor %}\ {% set my_var = __temp_import_alias_1059697132__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/handles-same-name-import-var/test.jinja' %}\ {% enddo %} {{ filter:dictsort.filter(my_var, ____int3rpr3t3r____, false, 'key') }} {% endif %} diff --git a/src/test/resources/eager/handles-same-name-import-var.jinja b/src/test/resources/eager/handles-same-name-import-var/test.jinja similarity index 51% rename from src/test/resources/eager/handles-same-name-import-var.jinja rename to src/test/resources/eager/handles-same-name-import-var/test.jinja index 13f595b67..efdfeed46 100644 --- a/src/test/resources/eager/handles-same-name-import-var.jinja +++ b/src/test/resources/eager/handles-same-name-import-var/test.jinja @@ -1,4 +1,4 @@ {% if deferred %} -{% import '../settag/set-var-and-deferred.jinja' as my_var %} +{% import './set-var-and-deferred.jinja' as my_var %} {{ my_var|dictsort(false, 'key') }} {% endif %} diff --git a/src/test/resources/eager/handles-set-and-modified-in-for.expected.jinja b/src/test/resources/eager/handles-set-and-modified-in-for/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-set-and-modified-in-for.expected.jinja rename to src/test/resources/eager/handles-set-and-modified-in-for/test.expected.jinja diff --git a/src/test/resources/eager/handles-set-and-modified-in-for.jinja b/src/test/resources/eager/handles-set-and-modified-in-for/test.jinja similarity index 100% rename from src/test/resources/eager/handles-set-and-modified-in-for.jinja rename to src/test/resources/eager/handles-set-and-modified-in-for/test.jinja diff --git a/src/test/resources/eager/handles-set-in-for.expected.jinja b/src/test/resources/eager/handles-set-in-for/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-set-in-for.expected.jinja rename to src/test/resources/eager/handles-set-in-for/test.expected.jinja diff --git a/src/test/resources/eager/handles-set-in-for.jinja b/src/test/resources/eager/handles-set-in-for/test.jinja similarity index 100% rename from src/test/resources/eager/handles-set-in-for.jinja rename to src/test/resources/eager/handles-set-in-for/test.jinja diff --git a/src/test/resources/eager/handles-set-in-inner-scope.expected.jinja b/src/test/resources/eager/handles-set-in-inner-scope/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-set-in-inner-scope.expected.jinja rename to src/test/resources/eager/handles-set-in-inner-scope/test.expected.jinja diff --git a/src/test/resources/eager/handles-set-in-inner-scope.jinja b/src/test/resources/eager/handles-set-in-inner-scope/test.jinja similarity index 100% rename from src/test/resources/eager/handles-set-in-inner-scope.jinja rename to src/test/resources/eager/handles-set-in-inner-scope/test.jinja diff --git a/src/test/resources/eager/handles-unknown-function-errors.expected.jinja b/src/test/resources/eager/handles-unknown-function-errors/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-unknown-function-errors.expected.jinja rename to src/test/resources/eager/handles-unknown-function-errors/test.expected.jinja diff --git a/src/test/resources/eager/handles-unknown-function-errors.jinja b/src/test/resources/eager/handles-unknown-function-errors/test.jinja similarity index 100% rename from src/test/resources/eager/handles-unknown-function-errors.jinja rename to src/test/resources/eager/handles-unknown-function-errors/test.jinja diff --git a/src/test/resources/eager/handles-value-modified-in-macro.expected.jinja b/src/test/resources/eager/handles-value-modified-in-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/handles-value-modified-in-macro.expected.jinja rename to src/test/resources/eager/handles-value-modified-in-macro/test.expected.jinja diff --git a/src/test/resources/eager/handles-value-modified-in-macro.jinja b/src/test/resources/eager/handles-value-modified-in-macro/test.jinja similarity index 100% rename from src/test/resources/eager/handles-value-modified-in-macro.jinja rename to src/test/resources/eager/handles-value-modified-in-macro/test.jinja diff --git a/src/test/resources/eager/has-proper-line-stripping.expected.jinja b/src/test/resources/eager/has-proper-line-stripping/test.expected.jinja similarity index 100% rename from src/test/resources/eager/has-proper-line-stripping.expected.jinja rename to src/test/resources/eager/has-proper-line-stripping/test.expected.jinja diff --git a/src/test/resources/eager/has-proper-line-stripping.jinja b/src/test/resources/eager/has-proper-line-stripping/test.jinja similarity index 100% rename from src/test/resources/eager/has-proper-line-stripping.jinja rename to src/test/resources/eager/has-proper-line-stripping/test.jinja diff --git a/src/test/resources/eager/keeps-macro-modifications-in-scope.expected.expected.jinja b/src/test/resources/eager/keeps-macro-modifications-in-scope/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/keeps-macro-modifications-in-scope.expected.expected.jinja rename to src/test/resources/eager/keeps-macro-modifications-in-scope/test.expected.expected.jinja diff --git a/src/test/resources/eager/keeps-macro-modifications-in-scope.expected.jinja b/src/test/resources/eager/keeps-macro-modifications-in-scope/test.expected.jinja similarity index 100% rename from src/test/resources/eager/keeps-macro-modifications-in-scope.expected.jinja rename to src/test/resources/eager/keeps-macro-modifications-in-scope/test.expected.jinja diff --git a/src/test/resources/eager/keeps-macro-modifications-in-scope.jinja b/src/test/resources/eager/keeps-macro-modifications-in-scope/test.jinja similarity index 100% rename from src/test/resources/eager/keeps-macro-modifications-in-scope.jinja rename to src/test/resources/eager/keeps-macro-modifications-in-scope/test.jinja diff --git a/src/test/resources/eager/keeps-max-macro-recursion-depth.expected.jinja b/src/test/resources/eager/keeps-max-macro-recursion-depth/test.expected.jinja similarity index 100% rename from src/test/resources/eager/keeps-max-macro-recursion-depth.expected.jinja rename to src/test/resources/eager/keeps-max-macro-recursion-depth/test.expected.jinja diff --git a/src/test/resources/eager/keeps-max-macro-recursion-depth.jinja b/src/test/resources/eager/keeps-max-macro-recursion-depth/test.jinja similarity index 100% rename from src/test/resources/eager/keeps-max-macro-recursion-depth.jinja rename to src/test/resources/eager/keeps-max-macro-recursion-depth/test.jinja diff --git a/src/test/resources/eager/keeps-scope-isolation-from-for-loops.expected.jinja b/src/test/resources/eager/keeps-scope-isolation-from-for-loops/test.expected.jinja similarity index 100% rename from src/test/resources/eager/keeps-scope-isolation-from-for-loops.expected.jinja rename to src/test/resources/eager/keeps-scope-isolation-from-for-loops/test.expected.jinja diff --git a/src/test/resources/eager/keeps-scope-isolation-from-for-loops.jinja b/src/test/resources/eager/keeps-scope-isolation-from-for-loops/test.jinja similarity index 100% rename from src/test/resources/eager/keeps-scope-isolation-from-for-loops.jinja rename to src/test/resources/eager/keeps-scope-isolation-from-for-loops/test.jinja diff --git a/src/test/resources/eager/loads-imported-macro-syntax.expected.jinja b/src/test/resources/eager/loads-imported-macro-syntax/test.expected.jinja similarity index 100% rename from src/test/resources/eager/loads-imported-macro-syntax.expected.jinja rename to src/test/resources/eager/loads-imported-macro-syntax/test.expected.jinja diff --git a/src/test/resources/eager/loads-imported-macro-syntax.jinja b/src/test/resources/eager/loads-imported-macro-syntax/test.jinja similarity index 100% rename from src/test/resources/eager/loads-imported-macro-syntax.jinja rename to src/test/resources/eager/loads-imported-macro-syntax/test.jinja diff --git a/src/test/resources/eager/modifies-variable-in-deferred-macro.expected.jinja b/src/test/resources/eager/modifies-variable-in-deferred-macro/test.expected.jinja similarity index 100% rename from src/test/resources/eager/modifies-variable-in-deferred-macro.expected.jinja rename to src/test/resources/eager/modifies-variable-in-deferred-macro/test.expected.jinja diff --git a/src/test/resources/eager/modifies-variable-in-deferred-macro.jinja b/src/test/resources/eager/modifies-variable-in-deferred-macro/test.jinja similarity index 100% rename from src/test/resources/eager/modifies-variable-in-deferred-macro.jinja rename to src/test/resources/eager/modifies-variable-in-deferred-macro/test.jinja diff --git a/src/test/resources/eager/only-defers-loop-item-on-current-context.expected.jinja b/src/test/resources/eager/only-defers-loop-item-on-current-context/test.expected.jinja similarity index 100% rename from src/test/resources/eager/only-defers-loop-item-on-current-context.expected.jinja rename to src/test/resources/eager/only-defers-loop-item-on-current-context/test.expected.jinja diff --git a/src/test/resources/eager/only-defers-loop-item-on-current-context.jinja b/src/test/resources/eager/only-defers-loop-item-on-current-context/test.jinja similarity index 100% rename from src/test/resources/eager/only-defers-loop-item-on-current-context.jinja rename to src/test/resources/eager/only-defers-loop-item-on-current-context/test.jinja diff --git a/src/test/resources/eager/partially-resolves-eager-set.jinja b/src/test/resources/eager/partially-resolves-eager-set/test.jinja similarity index 100% rename from src/test/resources/eager/partially-resolves-eager-set.jinja rename to src/test/resources/eager/partially-resolves-eager-set/test.jinja diff --git a/src/test/resources/eager/prepends-set-if-state-changes.expected.jinja b/src/test/resources/eager/prepends-set-if-state-changes/test.expected.jinja similarity index 100% rename from src/test/resources/eager/prepends-set-if-state-changes.expected.jinja rename to src/test/resources/eager/prepends-set-if-state-changes/test.expected.jinja diff --git a/src/test/resources/eager/prepends-set-if-state-changes.jinja b/src/test/resources/eager/prepends-set-if-state-changes/test.jinja similarity index 100% rename from src/test/resources/eager/prepends-set-if-state-changes.jinja rename to src/test/resources/eager/prepends-set-if-state-changes/test.jinja diff --git a/src/test/resources/eager/preserves-raw-inside-deferred-set-block.expected.jinja b/src/test/resources/eager/preserves-raw-inside-deferred-set-block/test.expected.jinja similarity index 100% rename from src/test/resources/eager/preserves-raw-inside-deferred-set-block.expected.jinja rename to src/test/resources/eager/preserves-raw-inside-deferred-set-block/test.expected.jinja diff --git a/src/test/resources/eager/preserves-raw-inside-deferred-set-block.jinja b/src/test/resources/eager/preserves-raw-inside-deferred-set-block/test.jinja similarity index 100% rename from src/test/resources/eager/preserves-raw-inside-deferred-set-block.jinja rename to src/test/resources/eager/preserves-raw-inside-deferred-set-block/test.jinja diff --git a/src/test/resources/eager/preserves-value-set-in-if.expected.jinja b/src/test/resources/eager/preserves-value-set-in-if/test.expected.jinja similarity index 100% rename from src/test/resources/eager/preserves-value-set-in-if.expected.jinja rename to src/test/resources/eager/preserves-value-set-in-if/test.expected.jinja diff --git a/src/test/resources/eager/preserves-value-set-in-if.jinja b/src/test/resources/eager/preserves-value-set-in-if/test.jinja similarity index 100% rename from src/test/resources/eager/preserves-value-set-in-if.jinja rename to src/test/resources/eager/preserves-value-set-in-if/test.jinja diff --git a/src/test/resources/eager/puts-deferred-fromed-macro-in-output.expected.jinja b/src/test/resources/eager/puts-deferred-fromed-macro-in-output.expected.jinja deleted file mode 100644 index f0d83460d..000000000 --- a/src/test/resources/eager/puts-deferred-fromed-macro-in-output.expected.jinja +++ /dev/null @@ -1,5 +0,0 @@ -{% set myname = deferred + 3 %}\ -{% set __macro_getPath_331491059_temp_variable_1__ %}\ -Hello {{ myname }}\ -{% endset %}\ -{% print __macro_getPath_331491059_temp_variable_1__ %} \ No newline at end of file diff --git a/src/test/resources/eager/puts-deferred-fromed-macro-in-output.jinja b/src/test/resources/eager/puts-deferred-fromed-macro-in-output.jinja deleted file mode 100644 index 9f40335c0..000000000 --- a/src/test/resources/eager/puts-deferred-fromed-macro-in-output.jinja +++ /dev/null @@ -1,3 +0,0 @@ -{%- from "simple-with-call.jinja" import getPath -%} -{%- set myname = deferred + (1 + 2) -%} -{% print getPath() %} diff --git a/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.expected.jinja b/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.expected.jinja new file mode 100644 index 000000000..571f118c8 --- /dev/null +++ b/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.expected.jinja @@ -0,0 +1,5 @@ +{% set myname = deferred + 3 %}\ +{% set __macro_getPath_1519775617_temp_variable_1__ %}\ +Hello {{ myname }}\ +{% endset %}\ +{% print __macro_getPath_1519775617_temp_variable_1__ %} diff --git a/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.jinja b/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.jinja new file mode 100644 index 000000000..4f01f9dbf --- /dev/null +++ b/src/test/resources/eager/puts-deferred-fromed-macro-in-output/test.jinja @@ -0,0 +1,3 @@ +{%- from "../supplements/simple-with-call.jinja" import getPath -%} +{%- set myname = deferred + (1 + 2) -%} +{% print getPath() %} diff --git a/src/test/resources/eager/puts-deferred-imported-macro-in-output.expected.jinja b/src/test/resources/eager/puts-deferred-imported-macro-in-output.expected.jinja deleted file mode 100644 index f0d83460d..000000000 --- a/src/test/resources/eager/puts-deferred-imported-macro-in-output.expected.jinja +++ /dev/null @@ -1,5 +0,0 @@ -{% set myname = deferred + 3 %}\ -{% set __macro_getPath_331491059_temp_variable_1__ %}\ -Hello {{ myname }}\ -{% endset %}\ -{% print __macro_getPath_331491059_temp_variable_1__ %} \ No newline at end of file diff --git a/src/test/resources/eager/puts-deferred-imported-macro-in-output.expected.expected.jinja b/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/puts-deferred-imported-macro-in-output.expected.expected.jinja rename to src/test/resources/eager/puts-deferred-imported-macro-in-output/test.expected.expected.jinja diff --git a/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.expected.jinja b/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.expected.jinja new file mode 100644 index 000000000..571f118c8 --- /dev/null +++ b/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.expected.jinja @@ -0,0 +1,5 @@ +{% set myname = deferred + 3 %}\ +{% set __macro_getPath_1519775617_temp_variable_1__ %}\ +Hello {{ myname }}\ +{% endset %}\ +{% print __macro_getPath_1519775617_temp_variable_1__ %} diff --git a/src/test/resources/eager/puts-deferred-imported-macro-in-output.jinja b/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.jinja similarity index 51% rename from src/test/resources/eager/puts-deferred-imported-macro-in-output.jinja rename to src/test/resources/eager/puts-deferred-imported-macro-in-output/test.jinja index d3bd9e447..63415185d 100644 --- a/src/test/resources/eager/puts-deferred-imported-macro-in-output.jinja +++ b/src/test/resources/eager/puts-deferred-imported-macro-in-output/test.jinja @@ -1,3 +1,3 @@ -{%- import "simple-with-call.jinja" as simple -%} +{%- import "../supplements/simple-with-call.jinja" as simple -%} {%- set myname = deferred + (1 + 2) -%} {% print simple.getPath() %} diff --git a/src/test/resources/tags/macrotag/eager/takes-param.jinja b/src/test/resources/eager/reconstructs-aliased-macro/takes-param.jinja similarity index 100% rename from src/test/resources/tags/macrotag/eager/takes-param.jinja rename to src/test/resources/eager/reconstructs-aliased-macro/takes-param.jinja diff --git a/src/test/resources/eager/reconstructs-aliased-macro.expected.expected.jinja b/src/test/resources/eager/reconstructs-aliased-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-aliased-macro.expected.expected.jinja rename to src/test/resources/eager/reconstructs-aliased-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-aliased-macro.expected.jinja b/src/test/resources/eager/reconstructs-aliased-macro/test.expected.jinja similarity index 70% rename from src/test/resources/eager/reconstructs-aliased-macro.expected.jinja rename to src/test/resources/eager/reconstructs-aliased-macro/test.expected.jinja index e0c07bb04..43d9267c9 100644 --- a/src/test/resources/eager/reconstructs-aliased-macro.expected.jinja +++ b/src/test/resources/eager/reconstructs-aliased-macro/test.expected.jinja @@ -1,5 +1,5 @@ {% set myname = deferred + 3 %}\ -{% set deferred_import_resource_path = 'eager/takes-param.jinja' %}\ +{% set deferred_import_resource_path = 'eager/reconstructs-aliased-macro/takes-param.jinja' %}\ {% macro macros.takes_param(foo) %}\ {% set bar = 'bar' %} {% print foo %} diff --git a/src/test/resources/eager/reconstructs-aliased-macro.jinja b/src/test/resources/eager/reconstructs-aliased-macro/test.jinja similarity index 66% rename from src/test/resources/eager/reconstructs-aliased-macro.jinja rename to src/test/resources/eager/reconstructs-aliased-macro/test.jinja index 3930ca760..a1326a645 100644 --- a/src/test/resources/eager/reconstructs-aliased-macro.jinja +++ b/src/test/resources/eager/reconstructs-aliased-macro/test.jinja @@ -1,4 +1,4 @@ -{%- import "eager/takes-param.jinja" as macros -%} +{%- import "./takes-param.jinja" as macros -%} {%- set myname = deferred + (1 + 2) -%} {% set answer = macros.takes_param(myname) %} {{ answer }} diff --git a/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.expected.jinja b/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.expected.jinja index 3f039fd06..ba93542f5 100644 --- a/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.expected.jinja +++ b/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.expected.jinja @@ -1,10 +1,10 @@ -Parent's current path is: ../../eager/reconstructs-block-path-when-deferred-nested/base.jinja +Parent's current path is: eager/reconstructs-block-path-when-deferred-nested/base.jinja -----Pre-First----- -Child's first current path is: Child path +Child's first current path is: eager/reconstructs-block-path-when-deferred-nested/test.jinja -----Post-First----- -----Pre-Second----- -Middle's second current path is: ../../eager/reconstructs-block-path-when-deferred-nested/middle.jinja +Middle's second current path is: eager/reconstructs-block-path-when-deferred-nested/middle.jinja -----Post-Second----- -Parent's current path is: ../../eager/reconstructs-block-path-when-deferred-nested/base.jinja +Parent's current path is: eager/reconstructs-block-path-when-deferred-nested/base.jinja \ No newline at end of file diff --git a/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.jinja b/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.jinja index 18b8cc558..b4dfa0702 100644 --- a/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.jinja +++ b/src/test/resources/eager/reconstructs-block-path-when-deferred-nested/test.expected.jinja @@ -1,22 +1,22 @@ -{% set current_path = '../../eager/reconstructs-block-path-when-deferred-nested/base.jinja' %}\ +{% set current_path = 'eager/reconstructs-block-path-when-deferred-nested/base.jinja' %}\ {% set prefix = deferred ? 'current' : 'current' %} Parent's current path is: {{ '{{' + prefix + '_path }}\ ' }} -----Pre-First----- -{% set temp_current_path_586961858 = current_path %}\ -{% set current_path = 'Child path' %}\ +{% set temp_current_path_995476186 = current_path %}\ +{% set current_path = 'eager/reconstructs-block-path-when-deferred-nested/test.jinja' %}\ {% set prefix = deferred ? 'current' : 'current' %}\ Child's first current path is: {{ '{{' + prefix + '_path }}\ ' }} -{% set current_path = temp_current_path_586961858 %} +{% set current_path = temp_current_path_995476186 %} -----Post-First----- -----Pre-Second----- -{% set temp_current_path_435835221 = current_path %}\ -{% set current_path = '../../eager/reconstructs-block-path-when-deferred-nested/middle.jinja' %}\ +{% set temp_current_path_751498149 = current_path %}\ +{% set current_path = 'eager/reconstructs-block-path-when-deferred-nested/middle.jinja' %}\ {% set prefix = deferred ? 'current' : 'current' %}\ Middle's second current path is: {{ '{{' + prefix + '_path }}\ ' }} -{% set current_path = temp_current_path_435835221 %} +{% set current_path = temp_current_path_751498149 %} -----Post-Second----- Parent's current path is: {{ '{{' + prefix + '_path }}\ -' }} +' }} \ No newline at end of file diff --git a/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.expected.jinja b/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.expected.jinja index 8654d516c..8cd850b99 100644 --- a/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.expected.jinja +++ b/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.expected.jinja @@ -1,6 +1,6 @@ -Parent's current path is: ../../eager/reconstructs-block-path-when-deferred/base.jinja +Parent's current path is: eager/reconstructs-block-path-when-deferred/base.jinja -----Pre-Block----- -Block's current path is: Child path +Block's current path is: eager/reconstructs-block-path-when-deferred/test.jinja -----Post-Block----- -Parent's current path is: ../../eager/reconstructs-block-path-when-deferred/base.jinja +Parent's current path is: eager/reconstructs-block-path-when-deferred/base.jinja diff --git a/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.jinja b/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.jinja index 76c8c8db2..6d7c5946f 100644 --- a/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.jinja +++ b/src/test/resources/eager/reconstructs-block-path-when-deferred/test.expected.jinja @@ -1,14 +1,14 @@ -{% set current_path = '../../eager/reconstructs-block-path-when-deferred/base.jinja' %}\ +{% set current_path = 'eager/reconstructs-block-path-when-deferred/base.jinja' %}\ {% set prefix = deferred ? 'current' : 'current' %} Parent's current path is: {{ '{{' + prefix + '_path }}\ ' }} -----Pre-Block----- -{% set temp_current_path_586961858 = current_path %}\ -{% set current_path = 'Child path' %}\ +{% set temp_current_path_802878910 = current_path %}\ +{% set current_path = 'eager/reconstructs-block-path-when-deferred/test.jinja' %}\ {% set prefix = deferred ? 'current' : 'current' %}\ Block's current path is: {{ '{{' + prefix + '_path }}\ ' }} -{% set current_path = temp_current_path_586961858 %} +{% set current_path = temp_current_path_802878910 %} -----Post-Block----- Parent's current path is: {{ '{{' + prefix + '_path }}\ ' }} diff --git a/src/test/resources/eager/reconstructs-block-set-variables-in-for-loop.expected.jinja b/src/test/resources/eager/reconstructs-block-set-variables-in-for-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-block-set-variables-in-for-loop.expected.jinja rename to src/test/resources/eager/reconstructs-block-set-variables-in-for-loop/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-block-set-variables-in-for-loop.jinja b/src/test/resources/eager/reconstructs-block-set-variables-in-for-loop/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-block-set-variables-in-for-loop.jinja rename to src/test/resources/eager/reconstructs-block-set-variables-in-for-loop/test.jinja diff --git a/src/test/resources/eager/reconstructs-deferred-variable-eventually.expected.jinja b/src/test/resources/eager/reconstructs-deferred-variable-eventually/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-deferred-variable-eventually.expected.jinja rename to src/test/resources/eager/reconstructs-deferred-variable-eventually/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-deferred-variable-eventually.jinja b/src/test/resources/eager/reconstructs-deferred-variable-eventually/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-deferred-variable-eventually.jinja rename to src/test/resources/eager/reconstructs-deferred-variable-eventually/test.jinja diff --git a/src/test/resources/eager/reconstructs-map-node.expected.expected.jinja b/src/test/resources/eager/reconstructs-map-node/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-map-node.expected.expected.jinja rename to src/test/resources/eager/reconstructs-map-node/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-map-node.expected.jinja b/src/test/resources/eager/reconstructs-map-node/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-map-node.expected.jinja rename to src/test/resources/eager/reconstructs-map-node/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-map-node.jinja b/src/test/resources/eager/reconstructs-map-node/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-map-node.jinja rename to src/test/resources/eager/reconstructs-map-node/test.jinja diff --git a/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.expected.expected.jinja b/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.expected.expected.jinja rename to src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.expected.jinja b/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.expected.jinja rename to src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.jinja b/src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period.jinja rename to src/test/resources/eager/reconstructs-namespace-for-set-tags-using-period/test.jinja diff --git a/src/test/resources/eager/reconstructs-nested-value-in-string-representation.expected.expected.jinja b/src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-nested-value-in-string-representation.expected.expected.jinja rename to src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-nested-value-in-string-representation.expected.jinja b/src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-nested-value-in-string-representation.expected.jinja rename to src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-nested-value-in-string-representation.jinja b/src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-nested-value-in-string-representation.jinja rename to src/test/resources/eager/reconstructs-nested-value-in-string-representation/test.jinja diff --git a/src/test/resources/eager/reconstructs-null-variables-in-deferred-caller.expected.jinja b/src/test/resources/eager/reconstructs-null-variables-in-deferred-caller/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-null-variables-in-deferred-caller.expected.jinja rename to src/test/resources/eager/reconstructs-null-variables-in-deferred-caller/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-null-variables-in-deferred-caller.jinja b/src/test/resources/eager/reconstructs-null-variables-in-deferred-caller/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-null-variables-in-deferred-caller.jinja rename to src/test/resources/eager/reconstructs-null-variables-in-deferred-caller/test.jinja diff --git a/src/test/resources/eager/reconstructs-types-properly.expected.jinja b/src/test/resources/eager/reconstructs-types-properly/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-types-properly.expected.jinja rename to src/test/resources/eager/reconstructs-types-properly/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-types-properly.jinja b/src/test/resources/eager/reconstructs-types-properly/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-types-properly.jinja rename to src/test/resources/eager/reconstructs-types-properly/test.jinja diff --git a/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.expected.expected.jinja b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.expected.expected.jinja rename to src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.expected.jinja b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.expected.jinja similarity index 53% rename from src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.expected.jinja rename to src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.expected.jinja index 1246685cd..81bb1b50f 100644 --- a/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.expected.jinja +++ b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.expected.jinja @@ -1,24 +1,24 @@ {% do %}\ -{% set current_path = 'uses-deferred-value-in-macro.jinja' %}\ +{% set current_path = 'eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja' %}\ {% set __temp_import_alias_1081745881__ = {} %}\ {% for __ignored__ in [0] %}\ {% set value = deferred %}\ {% do __temp_import_alias_1081745881__.update({'value': value}) %} -{% do __temp_import_alias_1081745881__.update({'import_resource_path': 'uses-deferred-value-in-macro.jinja','value': value}) %}\ +{% do __temp_import_alias_1081745881__.update({'import_resource_path': 'eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja','value': value}) %}\ {% endfor %}\ {% set macros = __temp_import_alias_1081745881__ %}\ -{% set current_path = '' %}\ +{% set current_path = 'eager/reconstructs-value-used-in-deferred-imported-macro/test.jinja' %}\ {% enddo %} -{% set deferred_import_resource_path = 'uses-deferred-value-in-macro.jinja' %}\ +{% set deferred_import_resource_path = 'eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja' %}\ {% macro macros.getValueAnd(other) %}\ {% set value = macros.value %} {{ value ~ ' ' ~ other }} {% endmacro %}\ {% set deferred_import_resource_path = null %}\ {{ macros.getValueAnd(1) }} -{% set deferred_import_resource_path = 'uses-deferred-value-in-macro.jinja' %}\ +{% set deferred_import_resource_path = 'eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja' %}\ {% macro macros.getValueAnd(other) %}\ {% set value = macros.value %} {{ value ~ ' ' ~ other }} diff --git a/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.jinja b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.jinja similarity index 50% rename from src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.jinja rename to src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.jinja index d335a751b..d5c0b0b63 100644 --- a/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro.jinja +++ b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/test.jinja @@ -1,4 +1,4 @@ -{% import 'uses-deferred-value-in-macro.jinja' as macros %} +{% import './uses-deferred-value-in-macro.jinja' as macros %} {{ macros.getValueAnd(1) }} {{ macros.getValueAnd(deferred) }} diff --git a/src/test/resources/tags/macrotag/uses-deferred-value-in-macro.jinja b/src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja similarity index 100% rename from src/test/resources/tags/macrotag/uses-deferred-value-in-macro.jinja rename to src/test/resources/eager/reconstructs-value-used-in-deferred-imported-macro/uses-deferred-value-in-macro.jinja diff --git a/src/test/resources/eager/reconstructs-with-multiple-loops.expected.jinja b/src/test/resources/eager/reconstructs-with-multiple-loops/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-with-multiple-loops.expected.jinja rename to src/test/resources/eager/reconstructs-with-multiple-loops/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-with-multiple-loops.jinja b/src/test/resources/eager/reconstructs-with-multiple-loops/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-with-multiple-loops.jinja rename to src/test/resources/eager/reconstructs-with-multiple-loops/test.jinja diff --git a/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.expected.expected.jinja b/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.expected.expected.jinja rename to src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.expected.expected.jinja diff --git a/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.expected.jinja b/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.expected.jinja rename to src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.expected.jinja diff --git a/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.jinja b/src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.jinja similarity index 100% rename from src/test/resources/eager/reconstructs-words-from-inside-nested-expressions.jinja rename to src/test/resources/eager/reconstructs-words-from-inside-nested-expressions/test.jinja diff --git a/src/test/resources/eager/reverts-modification-with-deferred-loop.expected.jinja b/src/test/resources/eager/reverts-modification-with-deferred-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reverts-modification-with-deferred-loop.expected.jinja rename to src/test/resources/eager/reverts-modification-with-deferred-loop/test.expected.jinja diff --git a/src/test/resources/eager/reverts-modification-with-deferred-loop.jinja b/src/test/resources/eager/reverts-modification-with-deferred-loop/test.jinja similarity index 100% rename from src/test/resources/eager/reverts-modification-with-deferred-loop.jinja rename to src/test/resources/eager/reverts-modification-with-deferred-loop/test.jinja diff --git a/src/test/resources/eager/reverts-simple.expected.jinja b/src/test/resources/eager/reverts-simple/test.expected.jinja similarity index 100% rename from src/test/resources/eager/reverts-simple.expected.jinja rename to src/test/resources/eager/reverts-simple/test.expected.jinja diff --git a/src/test/resources/eager/reverts-simple.jinja b/src/test/resources/eager/reverts-simple/test.jinja similarity index 100% rename from src/test/resources/eager/reverts-simple.jinja rename to src/test/resources/eager/reverts-simple/test.jinja diff --git a/src/test/resources/eager/runs-for-loop-inside-deferred-for-loop.expected.jinja b/src/test/resources/eager/runs-for-loop-inside-deferred-for-loop/test.expected.jinja similarity index 100% rename from src/test/resources/eager/runs-for-loop-inside-deferred-for-loop.expected.jinja rename to src/test/resources/eager/runs-for-loop-inside-deferred-for-loop/test.expected.jinja diff --git a/src/test/resources/eager/runs-for-loop-inside-deferred-for-loop.jinja b/src/test/resources/eager/runs-for-loop-inside-deferred-for-loop/test.jinja similarity index 100% rename from src/test/resources/eager/runs-for-loop-inside-deferred-for-loop.jinja rename to src/test/resources/eager/runs-for-loop-inside-deferred-for-loop/test.jinja diff --git a/src/test/resources/eager/runs-macro-function-in-deferred-execution-mode.expected.jinja b/src/test/resources/eager/runs-macro-function-in-deferred-execution-mode/test.expected.jinja similarity index 100% rename from src/test/resources/eager/runs-macro-function-in-deferred-execution-mode.expected.jinja rename to src/test/resources/eager/runs-macro-function-in-deferred-execution-mode/test.expected.jinja diff --git a/src/test/resources/eager/runs-macro-function-in-deferred-execution-mode.jinja b/src/test/resources/eager/runs-macro-function-in-deferred-execution-mode/test.jinja similarity index 100% rename from src/test/resources/eager/runs-macro-function-in-deferred-execution-mode.jinja rename to src/test/resources/eager/runs-macro-function-in-deferred-execution-mode/test.jinja diff --git a/src/test/resources/eager/scopes-resetting-bindings.expected.jinja b/src/test/resources/eager/scopes-resetting-bindings/test.expected.jinja similarity index 100% rename from src/test/resources/eager/scopes-resetting-bindings.expected.jinja rename to src/test/resources/eager/scopes-resetting-bindings/test.expected.jinja diff --git a/src/test/resources/eager/scopes-resetting-bindings.jinja b/src/test/resources/eager/scopes-resetting-bindings/test.jinja similarity index 100% rename from src/test/resources/eager/scopes-resetting-bindings.jinja rename to src/test/resources/eager/scopes-resetting-bindings/test.jinja diff --git a/src/test/resources/eager/sets-multiple-vars-deferred-in-child.expected.expected.jinja b/src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/sets-multiple-vars-deferred-in-child.expected.expected.jinja rename to src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.expected.expected.jinja diff --git a/src/test/resources/eager/sets-multiple-vars-deferred-in-child.expected.jinja b/src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.expected.jinja similarity index 100% rename from src/test/resources/eager/sets-multiple-vars-deferred-in-child.expected.jinja rename to src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.expected.jinja diff --git a/src/test/resources/eager/sets-multiple-vars-deferred-in-child.jinja b/src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.jinja similarity index 100% rename from src/test/resources/eager/sets-multiple-vars-deferred-in-child.jinja rename to src/test/resources/eager/sets-multiple-vars-deferred-in-child/test.jinja diff --git a/src/test/resources/tags/macrotag/deferred-modification.jinja b/src/test/resources/eager/supplements/deferred-modification.jinja similarity index 100% rename from src/test/resources/tags/macrotag/deferred-modification.jinja rename to src/test/resources/eager/supplements/deferred-modification.jinja diff --git a/src/test/resources/tags/macrotag/macro-and-set.jinja b/src/test/resources/eager/supplements/macro-and-set.jinja similarity index 100% rename from src/test/resources/tags/macrotag/macro-and-set.jinja rename to src/test/resources/eager/supplements/macro-and-set.jinja diff --git a/src/test/resources/eager/supplements/set-val.jinja b/src/test/resources/eager/supplements/set-val.jinja new file mode 100644 index 000000000..381648d46 --- /dev/null +++ b/src/test/resources/eager/supplements/set-val.jinja @@ -0,0 +1 @@ +{% set primary_line_height = 42 %} \ No newline at end of file diff --git a/src/test/resources/eager/supplements/simple-with-call.jinja b/src/test/resources/eager/supplements/simple-with-call.jinja new file mode 100644 index 000000000..243ecf68a --- /dev/null +++ b/src/test/resources/eager/supplements/simple-with-call.jinja @@ -0,0 +1,5 @@ +{% macro getPath() -%} + Hello {{ myname }} +{%- endmacro %} + +{{ getPath() }} diff --git a/src/test/resources/eager/uses-unique-macro-names.expected.jinja b/src/test/resources/eager/uses-unique-macro-names.expected.jinja deleted file mode 100644 index fa1a2c30a..000000000 --- a/src/test/resources/eager/uses-unique-macro-names.expected.jinja +++ /dev/null @@ -1,16 +0,0 @@ -{% set myname = deferred %} - -{% set __macro_foo_97643642_temp_variable_0__ %} -Goodbye {{ myname }} -{% endset %}\ -{% set a = filter:upper.filter(__macro_foo_97643642_temp_variable_0__, ____int3rpr3t3r____) %} -{% do %}\ -{% set current_path = 'macro-with-filter.jinja' %} -{% set __macro_foo_927217348_temp_variable_0__ %}\ -Hello {{ myname }}\ -{% endset %}\ -{% set b = filter:upper.filter(__macro_foo_927217348_temp_variable_0__, ____int3rpr3t3r____) %} -{% set current_path = '' %}\ -{% enddo %} -{{ a }} -{{ b }} diff --git a/src/test/resources/tags/macrotag/macro-with-filter.jinja b/src/test/resources/eager/uses-unique-macro-names/macro-with-filter.jinja similarity index 100% rename from src/test/resources/tags/macrotag/macro-with-filter.jinja rename to src/test/resources/eager/uses-unique-macro-names/macro-with-filter.jinja diff --git a/src/test/resources/eager/uses-unique-macro-names.expected.expected.jinja b/src/test/resources/eager/uses-unique-macro-names/test.expected.expected.jinja similarity index 100% rename from src/test/resources/eager/uses-unique-macro-names.expected.expected.jinja rename to src/test/resources/eager/uses-unique-macro-names/test.expected.expected.jinja diff --git a/src/test/resources/eager/uses-unique-macro-names/test.expected.jinja b/src/test/resources/eager/uses-unique-macro-names/test.expected.jinja new file mode 100644 index 000000000..2d3e064a5 --- /dev/null +++ b/src/test/resources/eager/uses-unique-macro-names/test.expected.jinja @@ -0,0 +1,16 @@ +{% set myname = deferred %} + +{% set __macro_foo_97643642_temp_variable_0__ %} +Goodbye {{ myname }} +{% endset %}\ +{% set a = filter:upper.filter(__macro_foo_97643642_temp_variable_0__, ____int3rpr3t3r____) %} +{% do %}\ +{% set current_path = 'eager/uses-unique-macro-names/macro-with-filter.jinja' %} +{% set __macro_foo_1717337666_temp_variable_0__ %}\ +Hello {{ myname }}\ +{% endset %}\ +{% set b = filter:upper.filter(__macro_foo_1717337666_temp_variable_0__, ____int3rpr3t3r____) %} +{% set current_path = 'eager/uses-unique-macro-names/test.jinja' %}\ +{% enddo %} +{{ a }} +{{ b }} diff --git a/src/test/resources/eager/uses-unique-macro-names.jinja b/src/test/resources/eager/uses-unique-macro-names/test.jinja similarity index 75% rename from src/test/resources/eager/uses-unique-macro-names.jinja rename to src/test/resources/eager/uses-unique-macro-names/test.jinja index 88d437614..c5c123857 100644 --- a/src/test/resources/eager/uses-unique-macro-names.jinja +++ b/src/test/resources/eager/uses-unique-macro-names/test.jinja @@ -3,6 +3,6 @@ Goodbye {{ myname }} {% endmacro %} {% set a = foo()|upper %} -{% import 'macro-with-filter.jinja' %} +{% import './macro-with-filter.jinja' %} {{ a }} {{ b }} diff --git a/src/test/resources/eager/wraps-certain-output-in-raw.expected.jinja b/src/test/resources/eager/wraps-certain-output-in-raw/test.expected.jinja similarity index 100% rename from src/test/resources/eager/wraps-certain-output-in-raw.expected.jinja rename to src/test/resources/eager/wraps-certain-output-in-raw/test.expected.jinja diff --git a/src/test/resources/eager/wraps-certain-output-in-raw.jinja b/src/test/resources/eager/wraps-certain-output-in-raw/test.jinja similarity index 100% rename from src/test/resources/eager/wraps-certain-output-in-raw.jinja rename to src/test/resources/eager/wraps-certain-output-in-raw/test.jinja diff --git a/src/test/resources/tags/settag/set-var-and-deferred.jinja b/src/test/resources/tags/settag/set-var-and-deferred.jinja deleted file mode 100644 index b93a83613..000000000 --- a/src/test/resources/tags/settag/set-var-and-deferred.jinja +++ /dev/null @@ -1,6 +0,0 @@ -{% if deferred %} -{% do %}{% set path = '../settag/set-var-and-deferred.jinja' %}{% set value = null %}{% set my_var = {} %}{% set my_var = {'foo': 'bar'} %}{% set my_var = {'my_var': my_var} %} -{% set value = deferred %}{% do my_var.update({"value": value}) %} -{% do my_var.update({'import_resource_path': '../settag/set-var-and-deferred.jinja','value': value}) %}{% set path = '' %}{% enddo %} -{{ my_var }} -{% endif %}