mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
tests/parse_util: Check against localized message
This is run in the current locale, without resetting to en_US.UTF-8 like our integration tests do. So if you want to check for a specific message you need to check the localized version.
This commit is contained in:
parent
2cb60bed10
commit
f7b541af99
1 changed files with 2 additions and 1 deletions
|
@ -55,9 +55,10 @@ fn test_error_messages() {
|
|||
($src:expr, $error_text_format:expr) => {
|
||||
let mut errors = vec![];
|
||||
let res = parse_util_detect_errors(L!($src), Some(&mut errors), false);
|
||||
let fmt = wgettext!($error_text_format);
|
||||
assert!(res.is_err());
|
||||
assert!(
|
||||
string_matches_format(&errors[0].text, L!($error_text_format)),
|
||||
string_matches_format(&errors[0].text, fmt),
|
||||
"command '{}' is expected to match error pattern '{}' but is '{}'",
|
||||
$src,
|
||||
$error_text_format,
|
||||
|
|
Loading…
Reference in a new issue