-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Krause (enthus1ast) <[email protected]>
- Loading branch information
David Krause (enthus1ast)
committed
Aug 12, 2024
1 parent
7ef34bd
commit aa7a0df
Showing
9 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- proc foo(): string = -%}foo{%- endmacro -%} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- importnimja procmodule/importInChild/macros.nimja -%} | ||
{%- block cont -%}{%- endblock cont -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% extends procmodule/importInChild/master_template.nimja %} | ||
{%- importnimja procmodule/importInChild/macros.nimja -%} | ||
{%- block cont -%} | ||
{{- foo() -}} | ||
{%- endblock cont -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- proc foo(): string = -%}foo{%- endmacro -%} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- importnimja procmodule/importInMaster/macros.nimja -%} | ||
{%- block cont -%}{%- endblock cont -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- extends procmodule/importInMaster/master_template.nimja -%} | ||
{%- block cont -%}{{- foo() -}}{%- endblock cont -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% block cont %}{% endblock cont %} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
discard """ | ||
joinable: false | ||
""" | ||
import ../../src/nimja | ||
import unittest | ||
import strutils | ||
|
||
test "import proc module in master": | ||
proc tchild(): string = | ||
compileTemplateFile("procmodule/importInMaster/template_child.nimja", baseDir = getScriptDir()) | ||
check "foo" == tchild() | ||
|
||
test "import proc module in child": | ||
proc tchild(): string = | ||
compileTemplateFile("procmodule/importInChild/template_child.nimja", baseDir = getScriptDir()) | ||
check "foo" == tchild() | ||
|
||
|