mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Remove users crate
This commit is contained in:
parent
99fa504257
commit
29f011e28c
6 changed files with 17 additions and 29 deletions
|
@ -1,7 +1,7 @@
|
|||
use crate::common::util::TestScenario;
|
||||
use regex::Regex;
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
use rust_users::get_effective_uid;
|
||||
use uucore::process::geteuid;
|
||||
|
||||
#[test]
|
||||
fn test_invalid_arg() {
|
||||
|
@ -213,7 +213,7 @@ fn test_date_format_literal() {
|
|||
#[test]
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
fn test_date_set_valid() {
|
||||
if get_effective_uid() == 0 {
|
||||
if geteuid() == 0 {
|
||||
new_ucmd!()
|
||||
.arg("--set")
|
||||
.arg("2020-03-12 13:30:00+08:00")
|
||||
|
@ -234,7 +234,7 @@ fn test_date_set_invalid() {
|
|||
#[test]
|
||||
#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))]
|
||||
fn test_date_set_permissions_error() {
|
||||
if !(get_effective_uid() == 0 || uucore::os::is_wsl_1()) {
|
||||
if !(geteuid() == 0 || uucore::os::is_wsl_1()) {
|
||||
let result = new_ucmd!()
|
||||
.arg("--set")
|
||||
.arg("2020-03-11 21:45:00+08:00")
|
||||
|
@ -261,7 +261,7 @@ fn test_date_set_mac_unavailable() {
|
|||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
/// TODO: expected to fail currently; change to succeeds() when required.
|
||||
fn test_date_set_valid_2() {
|
||||
if get_effective_uid() == 0 {
|
||||
if geteuid() == 0 {
|
||||
let result = new_ucmd!()
|
||||
.arg("--set")
|
||||
.arg("Sat 20 Mar 2021 14:53:01 AWST") // spell-checker:disable-line
|
||||
|
@ -325,7 +325,7 @@ fn test_date_for_file() {
|
|||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
/// TODO: expected to fail currently; change to succeeds() when required.
|
||||
fn test_date_set_valid_3() {
|
||||
if get_effective_uid() == 0 {
|
||||
if geteuid() == 0 {
|
||||
let result = new_ucmd!()
|
||||
.arg("--set")
|
||||
.arg("Sat 20 Mar 2021 14:53:01") // Local timezone
|
||||
|
@ -339,7 +339,7 @@ fn test_date_set_valid_3() {
|
|||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
/// TODO: expected to fail currently; change to succeeds() when required.
|
||||
fn test_date_set_valid_4() {
|
||||
if get_effective_uid() == 0 {
|
||||
if geteuid() == 0 {
|
||||
let result = new_ucmd!()
|
||||
.arg("--set")
|
||||
.arg("2020-03-11 21:45:00") // Local timezone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue