From d54f93508bf29edb9d6b5f655ab9b518f18ecaec Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 12 Aug 2023 11:35:53 +0100 Subject: share: Adapt rust template to pass locations in Signed-off-by: Daniel Silverstone --- share/rust/template/macros.rs.tera | 2 +- share/rust/template/template.rs.tera | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/rust/template/macros.rs.tera b/share/rust/template/macros.rs.tera index 104eb23..cc1d9c4 100644 --- a/share/rust/template/macros.rs.tera +++ b/share/rust/template/macros.rs.tera @@ -27,5 +27,5 @@ ) {% endif -%} {% endfor -%} - .build(format!("{} {}", "{{step.kind | lower}}", base64_decode("{{step.text | base64}}"))) + .build(format!("{} {}", "{{step.kind | lower}}", base64_decode("{{step.text | base64}}")), {{ step.origin | location }}) {%- endmacro builder -%} diff --git a/share/rust/template/template.rs.tera b/share/rust/template/template.rs.tera index 65fb755..447129c 100644 --- a/share/rust/template/template.rs.tera +++ b/share/rust/template/template.rs.tera @@ -30,7 +30,7 @@ lazy_static! { #[test] #[allow(non_snake_case)] fn {{ scenario.title | nameslug }}() { - let mut scenario = Scenario::new(&base64_decode("{{scenario.title | base64}}")); + let mut scenario = Scenario::new(&base64_decode("{{scenario.title | base64}}"), {{ scenario.origin | location }}); {% for step in scenario.steps %} let step = {{ macros::builder(stepfn=step.function, step=step) }}; {%- if step.cleanup %} -- cgit v1.2.1