From 323207ca1d3b7e9b06ffc91b5dff2b059476a325 Mon Sep 17 00:00:00 2001 From: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:55:27 +0100 Subject: [PATCH] Adapt tests for internationalization (#11628) I've noticed that two tests fail on my system when running `toolkit check pr`. The reason for this is that my locale is set to German. `ls` is translated, so checking the error message will only work on systems set to English. I've adapted the test to check the exit code instead. Alternatively, we could set the locale, I am not sure if the `nu!` macro supports that though. --- toolkit.nu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolkit.nu b/toolkit.nu index 12166c1880..8cf2ecb61e 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -251,7 +251,10 @@ export def "check pr" [ --fast # use the "nextext" `cargo` subcommand to speed up the tests (see [`cargo-nextest`](https://nexte.st/) and [`nextest-rs/nextest`](https://github.com/nextest-rs/nextest)) --features: list # the list of features to check the current PR on ] { - $env.NU_TEST_LOCALE_OVERRIDE = 'en_US.utf8'; + $env.NU_TEST_LOCALE_OVERRIDE = 'en_US.utf8' + $env.LANG = 'en_US.UTF-8' + $env.LANGUAGE = 'en' + try { fmt --check --verbose } catch {