Implement rev (#56)

* Implement `rev`

* Use uucore facility for error reporting
This commit is contained in:
sisungo
2024-06-28 22:23:50 +08:00
committed by GitHub
parent fd14cb7db2
commit 69d9c6e4a5
8 changed files with 133 additions and 0 deletions

12
tests/by-util/test_rev.rs Normal file
View File

@@ -0,0 +1,12 @@
// This file is part of the uutils util-linux package.
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore (words) symdir somefakedir
use crate::common::util::TestScenario;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

View File

@@ -16,3 +16,7 @@ mod test_mountpoint;
#[cfg(feature = "ctrlaltdel")]
#[path = "by-util/test_ctrlaltdel.rs"]
mod test_ctrlaltdel;
#[cfg(feature = "rev")]
#[path = "by-util/test_rev.rs"]
mod test_rev;