tests: do not use "author" template keyword to test string functions

I'm going to change the default formatting of empty Signature type, and
these tests should use a non-empty keyword.
This commit is contained in:
Yuya Nishihara 2023-08-26 14:49:30 +09:00
parent a186b5ffce
commit 88b509f857

View file

@ -717,7 +717,7 @@ fn test_templater_concat_function() {
let render = |template| get_colored_template_output(&test_env, &repo_path, "@-", template);
insta::assert_snapshot!(render(r#"concat()"#), @"");
insta::assert_snapshot!(render(r#"concat(author, empty)"#), @"(no name available) <(no email available)>true");
insta::assert_snapshot!(render(r#"concat(hidden, empty)"#), @"falsetrue");
insta::assert_snapshot!(
render(r#"concat(label("error", ""), label("warning", "a"), "b")"#),
@"ab");
@ -767,11 +767,11 @@ fn test_templater_separate_function() {
// Separate keywords
insta::assert_snapshot!(
render(r#"separate(" ", author, description, empty)"#), @"(no name available) <(no email available)> true");
render(r#"separate(" ", hidden, description, empty)"#), @"false true");
// Keyword as separator
insta::assert_snapshot!(
render(r#"separate(author, "X", "Y", "Z")"#), @"X(no name available) <(no email available)>Y(no name available) <(no email available)>Z");
render(r#"separate(hidden, "X", "Y", "Z")"#), @"XfalseYfalseZ");
}
#[test]