Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.
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

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.

Activity

  1. epage commented on Jan 22, 2018

    @epage
    Collaborator

    Thanks for reporting this!

    Improving the project so it can easily be run on any machine seems worthwhile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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