You've already forked util-linux
mirror of
https://github.com/uutils/util-linux.git
synced 2026-06-10 16:13:52 -07:00
tests/dmesg: create test for --kmsg-file and --json option.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// This file is part of the uutils coreutils package.
|
||||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
use crate::common::util::TestScenario;
|
||||
|
||||
#[test]
|
||||
fn test_invalid_arg() {
|
||||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_kmsg_json() {
|
||||
new_ucmd!()
|
||||
.arg("--kmsg-file")
|
||||
.arg("kmsg.input")
|
||||
.arg("--json")
|
||||
.run()
|
||||
.no_stderr()
|
||||
.stdout_is_fixture("test_kmsg_json.expected");
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+645
File diff suppressed because it is too large
Load Diff
@@ -32,3 +32,7 @@ mod test_setsid;
|
||||
#[cfg(feature = "last")]
|
||||
#[path = "by-util/test_last.rs"]
|
||||
mod test_last;
|
||||
|
||||
#[cfg(feature = "dmesg")]
|
||||
#[path = "by-util/test_dmesg.rs"]
|
||||
mod test_dmesg;
|
||||
|
||||
Reference in New Issue
Block a user