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

Merge branch 'master' into uptime-refresh

This commit is contained in:
Sylvestre Ledru 2020-11-19 22:30:33 +01:00 committed by GitHub
commit 252f527b55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 3646 additions and 749 deletions

View file

@ -10,7 +10,7 @@ fn test_install_help() {
.succeeds()
.no_stderr()
.stdout
.contains("Options:"));
.contains("FLAGS:"));
}
#[test]

View file

@ -13,6 +13,16 @@ fn test_mkdir_mkdir() {
new_ucmd!().arg(TEST_DIR1).succeeds();
}
#[test]
fn test_mkdir_verbose() {
let expected = "mkdir: created directory 'mkdir_test1'\n";
new_ucmd!()
.arg(TEST_DIR1)
.arg("-v")
.run()
.stdout_is(expected);
}
#[test]
fn test_mkdir_dup_dir() {
let scene = TestScenario::new(util_name!());

View file

@ -12,6 +12,14 @@ fn test_rm_one_file() {
assert!(!at.file_exists(file));
}
#[test]
fn test_rm_failed() {
let (_at, mut ucmd) = at_and_ucmd!();
let file = "test_rm_one_file";
ucmd.arg(file).fails(); // Doesn't exist
}
#[test]
fn test_rm_multiple_files() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -1 +1,11 @@
// ToDO: add tests
use crate::common::util::*;
#[test]
fn test_sync_default() {
new_ucmd!().run();
}
#[test]
fn test_sync_incorrect_arg() {
new_ucmd!().arg("--foo").fails();
}