aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
authorLibravatar Christian Vallentin <mail@vallentin.dev>2020-12-02 20:46:29 +0100
committerLibravatar GitHub <noreply@github.com>2020-12-02 20:46:29 +0100
commit810d5ad5067085cc5e4be19903b5804b1ff13430 (patch)
tree1f0607e8b590f3733e17136aa77fc12fe8394b6a /testing/tests
parenta199defeca2dfc6aa3e972acca82c96db07f99e9 (diff)
downloadaskama-810d5ad5067085cc5e4be19903b5804b1ff13430.tar.gz
askama-810d5ad5067085cc5e4be19903b5804b1ff13430.tar.bz2
askama-810d5ad5067085cc5e4be19903b5804b1ff13430.zip
Allow paths to start with `::` (#393)
Diffstat (limited to '')
-rw-r--r--testing/tests/simple.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index 7241005..5ef03b1 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -291,6 +291,15 @@ fn test_path_func_call() {
}
#[derive(Template)]
+#[template(source = "{{ ::std::string::ToString::to_string(123) }}", ext = "txt")]
+struct RootPathFunctionTemplate;
+
+#[test]
+fn test_root_path_func_call() {
+ assert_eq!(RootPathFunctionTemplate.render().unwrap(), "123");
+}
+
+#[derive(Template)]
#[template(source = "Hello, {{ Self::world3(self, \"123\", 4) }}!", ext = "txt")]
struct FunctionTemplate;