mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37: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:
parent
d3181fa60e
commit
c0be979611
41 changed files with 135 additions and 140 deletions
|
@ -614,7 +614,7 @@ fn test_mv_overwrite_nonempty_dir() {
|
|||
// Not same error as GNU; the error message is a rust builtin
|
||||
// TODO: test (and implement) correct error message (or at least decide whether to do so)
|
||||
// Current: "mv: couldn't rename path (Directory not empty; from=a; to=b)"
|
||||
// GNU: "mv: cannot move ‘a’ to ‘b’: Directory not empty"
|
||||
// GNU: "mv: cannot move 'a' to 'b': Directory not empty"
|
||||
|
||||
// Verbose output for the move should not be shown on failure
|
||||
let result = ucmd.arg("-vT").arg(dir_a).arg(dir_b).fails();
|
||||
|
@ -638,7 +638,7 @@ fn test_mv_backup_dir() {
|
|||
.arg(dir_b)
|
||||
.succeeds()
|
||||
.stdout_only(format!(
|
||||
"‘{}’ -> ‘{}’ (backup: ‘{}~’)\n",
|
||||
"'{}' -> '{}' (backup: '{}~')\n",
|
||||
dir_a, dir_b, dir_b
|
||||
));
|
||||
|
||||
|
@ -672,7 +672,7 @@ fn test_mv_errors() {
|
|||
|
||||
// $ at.touch file && at.mkdir dir
|
||||
// $ mv -T file dir
|
||||
// err == mv: cannot overwrite directory ‘dir’ with non-directory
|
||||
// err == mv: cannot overwrite directory 'dir' with non-directory
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-T")
|
||||
|
@ -680,13 +680,13 @@ fn test_mv_errors() {
|
|||
.arg(dir)
|
||||
.fails()
|
||||
.stderr_is(format!(
|
||||
"mv: cannot overwrite directory ‘{}’ with non-directory\n",
|
||||
"mv: cannot overwrite directory '{}' with non-directory\n",
|
||||
dir
|
||||
));
|
||||
|
||||
// $ at.mkdir dir && at.touch file
|
||||
// $ mv dir file
|
||||
// err == mv: cannot overwrite non-directory ‘file’ with directory ‘dir’
|
||||
// err == mv: cannot overwrite non-directory 'file' with directory 'dir'
|
||||
assert!(!scene
|
||||
.ucmd()
|
||||
.arg(dir)
|
||||
|
@ -713,7 +713,7 @@ fn test_mv_verbose() {
|
|||
.arg(file_a)
|
||||
.arg(file_b)
|
||||
.succeeds()
|
||||
.stdout_only(format!("‘{}’ -> ‘{}’\n", file_a, file_b));
|
||||
.stdout_only(format!("'{}' -> '{}'\n", file_a, file_b));
|
||||
|
||||
at.touch(file_a);
|
||||
scene
|
||||
|
@ -723,7 +723,7 @@ fn test_mv_verbose() {
|
|||
.arg(file_b)
|
||||
.succeeds()
|
||||
.stdout_only(format!(
|
||||
"‘{}’ -> ‘{}’ (backup: ‘{}~’)\n",
|
||||
"'{}' -> '{}' (backup: '{}~')\n",
|
||||
file_a, file_b, file_b
|
||||
));
|
||||
}
|
||||
|
@ -756,5 +756,5 @@ fn test_mv_permission_error() {
|
|||
// -r--r--r-- 1 user user 0 okt 25 11:21 b
|
||||
// $
|
||||
// $ mv -v a b
|
||||
// mv: try to overwrite ‘b’, overriding mode 0444 (r--r--r--)? y
|
||||
// ‘a’ -> ‘b’
|
||||
// mv: try to overwrite 'b', overriding mode 0444 (r--r--r--)? y
|
||||
// 'a' -> 'b'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue