Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

cargo test doesn't like non english locales #83

Open
@est31

Description

@est31

When I'm doing cargo test, I get the following error output (excerpt):

---- src/assert.rs - assert::Assert::fails_with (line 238) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'Error: CLI assertion failed: `cat non-existing-file` StdErr mismatch: diff:
 
-cat: non-existing-file: No such file or directory
+cat: non-existing-file: Datei oder Verzeichnis nicht gefunden 

', src/assert.rs:406:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', librustdoc/test.rs:324:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- src/assert.rs - assert::Assert::ignore_status (line 260) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'Error: CLI assertion failed: `cat non-existing-file` StdErr mismatch: diff:
 
-cat: non-existing-file: No such file or directory
+cat: non-existing-file: Datei oder Verzeichnis nicht gefunden 

', src/assert.rs:406:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', librustdoc/test.rs:324:17

---- src/assert.rs - assert::Assert::stderr (line 300) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'Error: CLI assertion failed: `cat non-existing-file` StdErr mismatch: diff:
 
-cat: non-existing-file: No such file or directory
+cat: non-existing-file: Datei oder Verzeichnis nicht gefunden 

', src/assert.rs:406:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', librustdoc/test.rs:324:17


failures:
    src/assert.rs - assert::Assert::fails_with (line 238)
    src/assert.rs - assert::Assert::ignore_status (line 260)
    src/assert.rs - assert::Assert::stderr (line 300)

test result: FAILED. 24 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--doc'

As you might see I have a default german locale. It would be nice if cargo test would work smoothly here, e.g. by removing all env vars and then setting LANG=en_US.UTF-8 or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions