aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/path.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/askama_derive/src/path.rs b/askama_derive/src/path.rs
index 9431306..e48f7d7 100644
--- a/askama_derive/src/path.rs
+++ b/askama_derive/src/path.rs
@@ -51,10 +51,15 @@ pub fn get_template_source(tpl_file: &str) -> String {
#[cfg(test)]
mod tests {
- use super::find_template_from_path;
+ use super::{find_template_from_path, get_template_source};
use super::Path;
#[test]
+ fn get_source() {
+ assert_eq!(get_template_source("sub/b.html"), "bar\n");
+ }
+
+ #[test]
fn find_absolute() {
let path = find_template_from_path("sub/b.html", Some("a.html"));
assert_eq!(path, Path::new("sub/b.html"));