Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: rename coalesce(x,y) alias in test_templater [NFC] #3392

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions cli/tests/test_templater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn test_templater_alias() {
'recurse1' = 'recurse2()'
'recurse2()' = 'recurse'
'identity(x)' = 'x'
'coalesce(x, y)' = 'if(x, x, y)'
'if_non_null(x, y)' = 'if(x, x, y)'
"###,
);

Expand Down Expand Up @@ -259,19 +259,19 @@ fn test_templater_alias() {
= Function "identity": Expected 1 arguments
"###);

insta::assert_snapshot!(render_err(r#"coalesce(label("x", "not boolean"), "")"#), @r###"
Error: Failed to parse template: Alias "coalesce()" cannot be expanded
insta::assert_snapshot!(render_err(r#"if_non_null(label("x", "not boolean"), "")"#), @r###"
Error: Failed to parse template: Alias "if_non_null()" cannot be expanded
Caused by:
1: --> 1:1
|
1 | coalesce(label("x", "not boolean"), "")
| ^-------------------------------------^
1 | if_non_null(label("x", "not boolean"), "")
| ^----------------------------------------^
|
= Alias "coalesce()" cannot be expanded
2: --> 1:10
= Alias "if_non_null()" cannot be expanded
2: --> 1:13
|
1 | coalesce(label("x", "not boolean"), "")
| ^-----------------------^
1 | if_non_null(label("x", "not boolean"), "")
| ^-----------------------^
|
= Expected expression of type "Boolean"
"###);
Expand Down