1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

fix some issues with locale (replace "LANGUAGE" with "LC_ALL")

`LANGUAGE=C` is not enough, `LC_ALL=C` is needed as the environment
variable that overrides all the other localization settings.

e.g.
```bash
$ LANGUAGE=C id foobar
id: ‘foobar’: no such user

$ LC_ALL=C id foobar
id: 'foobar': no such user
```

* replace `LANGUAGE` with `LC_ALL` as environment variable in the tests
* fix the the date string of affected uutils
* replace `‘` and `’` with `'`
This commit is contained in:
Jan Scheer 2021-06-22 00:22:30 +02:00
parent d3181fa60e
commit c0be979611
41 changed files with 135 additions and 140 deletions

View file

@ -165,7 +165,7 @@ fn test_dangling_string_comparison_is_error() {
.args(&["missing_something", "="])
.run()
.status_code(2)
.stderr_is("test: missing argument after =");
.stderr_is("test: missing argument after '='");
}
#[test]
@ -265,7 +265,7 @@ fn test_float_inequality_is_error() {
.args(&["123.45", "-ge", "6"])
.run()
.status_code(2)
.stderr_is("test: invalid integer 123.45");
.stderr_is("test: invalid integer '123.45'");
}
#[test]
@ -283,7 +283,7 @@ fn test_invalid_utf8_integer_compare() {
cmd.run()
.status_code(2)
.stderr_is("test: invalid integer fo<EFBFBD>o");
.stderr_is("test: invalid integer 'fo<66>o'");
let mut cmd = new_ucmd!();
cmd.raw.arg(arg);
@ -291,7 +291,7 @@ fn test_invalid_utf8_integer_compare() {
cmd.run()
.status_code(2)
.stderr_is("test: invalid integer fo<EFBFBD>o");
.stderr_is("test: invalid integer 'fo<66>o'");
}
#[test]
@ -674,7 +674,7 @@ fn test_erroneous_parenthesized_expression() {
.args(&["a", "!=", "(", "b", "-a", "b", ")", "!=", "c"])
.run()
.status_code(2)
.stderr_is("test: extra argument b");
.stderr_is("test: extra argument 'b'");
}
#[test]