diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
commit | a0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch) | |
tree | fc451898ccaf445814e26b46664d78702178101d /vendor/handlebars/tests/helper_macro.rs | |
parent | Adding debian version 1.71.1+dfsg1-2. (diff) | |
download | rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/handlebars/tests/helper_macro.rs')
-rw-r--r-- | vendor/handlebars/tests/helper_macro.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/handlebars/tests/helper_macro.rs b/vendor/handlebars/tests/helper_macro.rs index cc5ed914b..f40ab778a 100644 --- a/vendor/handlebars/tests/helper_macro.rs +++ b/vendor/handlebars/tests/helper_macro.rs @@ -86,4 +86,24 @@ fn test_macro_helper() { .unwrap(), "2015-02-18" ); + + assert_eq!( + hbs.render_template("{{eq image.link null}}", &json!({"image": {"link": null}})) + .unwrap(), + "true" + ); + + assert_eq!( + hbs.render_template( + "{{eq image.link null}}", + &json!({"image": {"link": "https://url"}}) + ) + .unwrap(), + "false" + ); + + assert_eq!( + hbs.render_template("{{tag 'html'}}", &()).unwrap(), + "<html>" + ); } |