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

uutests: adjust the tests to use them

This commit is contained in:
Sylvestre Ledru 2025-03-28 09:51:51 +01:00
parent ccfcda531e
commit a0179ea239
102 changed files with 1018 additions and 157 deletions

View file

@ -2,7 +2,10 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
use crate::common::util::TestScenario;
use uutests::new_ucmd;
use uutests::util::TestScenario;
use uutests::util_name;
// spell-checker:ignore checkfile, nonames, testf, ntestf
macro_rules! get_hash(
($str:expr) => (
@ -14,7 +17,7 @@ macro_rules! test_digest {
($($id:ident $t:ident $size:expr)*) => ($(
mod $id {
use crate::common::util::*;
use uutests::util::*;
static DIGEST_ARG: &'static str = concat!("--", stringify!($t));
static BITS_ARG: &'static str = concat!("--bits=", stringify!($size));
static EXPECTED_FILE: &'static str = concat!(stringify!($id), ".expected");
@ -72,6 +75,9 @@ macro_rules! test_digest {
#[cfg(windows)]
#[test]
fn test_text_mode() {
use uutests::new_ucmd;
use uutests::util_name;
// TODO Replace this with hard-coded files that store the
// expected output of text mode on an input file that has
// "\r\n" line endings.