mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
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
This commit is contained in:
parent
cc4f32d87a
commit
b1fcb621a8
11 changed files with 84 additions and 84 deletions
|
@ -4,6 +4,7 @@ use self::regex::Regex;
|
|||
use crate::common::util::*;
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
use rust_users::*;
|
||||
use uucore;
|
||||
|
||||
#[test]
|
||||
fn test_date_email() {
|
||||
|
@ -159,7 +160,7 @@ fn test_date_set_invalid() {
|
|||
#[test]
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
fn test_date_set_permissions_error() {
|
||||
if !(get_effective_uid() == 0 || is_wsl()) {
|
||||
if !(get_effective_uid() == 0 || uucore::os::is_wsl_1()) {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.arg("--set").arg("2020-03-11 21:45:00+08:00").fails();
|
||||
let result = result.no_stdout();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue