Commit graph

16 commits

Author SHA1 Message Date
Jan Scheer
c0be979611 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 `'`
2021-06-23 11:30:28 +02:00
Roy Ivy III
3f35e0a421 refactor ~ cargo make format 2021-05-31 08:23:58 -05:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Jan Scheer
12a43d6eb3 date: fix format literal for nanoseconds 2021-05-12 10:21:24 +02:00
Jan Scheer
8200d399e8 date: fix format for nanoseconds 2021-05-11 23:03:59 +02:00
Sylvestre Ledru
8ccc6ade61
Merge branch 'master' into split-wsl-detection 2021-04-24 10:24:13 +02:00
Jan Scheer
646c6cacbc refactor tests (#1982) 2021-04-23 02:28:46 +02:00
Sylvestre Ledru
fc057b816b
Merge branch 'master' into split-wsl-detection 2021-04-17 10:22:54 +02:00
ReggaeMuffin
5f00a0f907
remove the unused imports 2021-04-11 10:49:52 +01:00
Gilad Naaman
81d42aa2b3 Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
ReggaeMuffin
b1fcb621a8
wsl2: wsl no longer differs in output
refactor `is_wsl` to `is_wsl_1` and `is_wsl_2`

On my tests with wsl2 ubuntu2004 all tests pass without special cases

I moved wsl detection into uucore so that it can be shared instead of duplicated

I moved `parse_mode` into uucode as it seemed to fit there better and anyway requires libc feature
2021-04-06 10:58:49 +01:00
Marco Satti
9b2ee1ce06
date: change tests to expect failure (#1895)
* date: change tests to expect failure

Although these tests contain valid dates, the parsing logic is not
implemented yet. It should be changed to expect success when
the parsing logic is done.

* date: fix test build errors
2021-03-24 08:33:11 +01:00
Marco Satti
785897efbd date: add more tests for setting (alt. formats) 2021-03-20 15:17:18 +08:00
Sylvestre Ledru
9132d32315 Rustfmt the tests 2021-03-19 18:01:43 +01:00
Marco Satti
5ec87dc70a
date: Implement setting the date on Unix & Windows (#1798)
* date: implement set date for unix and windows

Parsing the date string is not fully implemented yet, as in it relies
on the internals of chrono - things like "Mon, 14 Aug 2006 02:34:56 -0600"
do not work, nor does "2006-08-14 02:34:56" (no TZ / local time). This
is no different to using the "--date" option however, and will get fixed
when `parse_date` is a bit smarter.

Only supports unix and Windows platforms for now.
2021-03-19 09:54:01 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_date.rs (Browse further)