| 1 | use handlebarsrust-analyzer cargo handlebars 5.1.2 crate/::Handlebarsrust-analyzer cargo handlebars 5.1.2 registry/Registry#; |
| 2 | use serde_jsonrust-analyzer cargo serde_json 1.0.114 crate/::jsonrust-analyzer cargo serde_json 1.0.114 macros/json!; |
| 3 | |
| 4 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 5 | fn test_whitespaces_elisionrust-analyzer cargo handlebars 5.1.2 test_whitespaces_elision().() { |
| 6 | let hbs = Handlebarsrust-analyzer cargo handlebars 5.1.2 registry/Registry#::newrust-analyzer cargo handlebars 5.1.2 registry/impl#[`Registry<'reg>`]new().(); |
| 7 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 8 | "bar", |
| 9 | hbs.render_templaterust-analyzer cargo handlebars 5.1.2 registry/impl#[`Registry<'reg>`]render_template().(" {{~ foo ~}} ", &jsonrust-analyzer cargo serde_json 1.0.114 macros/json!!({"foo": "bar"})) |
| 10 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 11 | ); |
| 12 | |
| 13 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 14 | "<bar/>", |
| 15 | hbs.render_templaterust-analyzer cargo handlebars 5.1.2 registry/impl#[`Registry<'reg>`]render_template().(" {{{~ foo ~}}} ", &jsonrust-analyzer cargo serde_json 1.0.114 macros/json!!({"foo": "<bar/>"})) |
| 16 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 17 | ); |
| 18 | |
| 19 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 20 | "<bar/>", |
| 21 | hbs.render_templaterust-analyzer cargo handlebars 5.1.2 registry/impl#[`Registry<'reg>`]render_template().(" {{~ {foo} ~}} ", &jsonrust-analyzer cargo serde_json 1.0.114 macros/json!!({"foo": "<bar/>"})) |
| 22 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 23 | ); |
| 24 | } |