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

fix clippy tests

This commit is contained in:
n4n5 2024-06-30 16:27:08 +02:00
parent 81de2be5ab
commit ab67947321
No known key found for this signature in database
GPG key ID: 79414EADC6D4B457
31 changed files with 1259 additions and 888 deletions

View file

@ -263,7 +263,7 @@ fn test_date_set_mac_unavailable() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
/// TODO: expected to fail currently; change to succeeds() when required.
/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_2() {
if geteuid() == 0 {
let result = new_ucmd!()
@ -288,10 +288,11 @@ fn test_date_for_invalid_file() {
#[test]
#[cfg(unix)]
fn test_date_for_no_permission_file() {
let (at, mut ucmd) = at_and_ucmd!();
use std::os::unix::fs::PermissionsExt;
const FILE: &str = "file-no-perm-1";
use std::os::unix::fs::PermissionsExt;
let (at, mut ucmd) = at_and_ucmd!();
let file = std::fs::OpenOptions::new()
.create(true)
.truncate(true)
@ -328,7 +329,7 @@ fn test_date_for_file() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
/// TODO: expected to fail currently; change to succeeds() when required.
/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_3() {
if geteuid() == 0 {
let result = new_ucmd!()
@ -342,7 +343,7 @@ fn test_date_set_valid_3() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
/// TODO: expected to fail currently; change to succeeds() when required.
/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_4() {
if geteuid() == 0 {
let result = new_ucmd!()
@ -412,8 +413,8 @@ fn test_date_overflow() {
#[test]
fn test_date_parse_from_format() {
let (at, mut ucmd) = at_and_ucmd!();
const FILE: &str = "file-with-dates";
let (at, mut ucmd) = at_and_ucmd!();
at.write(
FILE,