tests/dmesg: add since/until test & fixture.
This commit is contained in:
parent
07e01a5276
commit
4dbcceede4
tests
@ -146,3 +146,14 @@ fn test_filter_multiple() {
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_since_until() {
|
||||
new_ucmd!()
|
||||
.arg("--kmsg-file")
|
||||
.arg("kmsg.input")
|
||||
.arg("--since=\"2024-11-19 17:47:32\"")
|
||||
.arg("--until=\"2024-11-19 18:55:52\"")
|
||||
.succeeds()
|
||||
.stdout_only_fixture("test_since_until.expected");
|
||||
}
|
||||
|
5
tests/fixtures/dmesg/test_since_until.expected
vendored
Normal file
5
tests/fixtures/dmesg/test_since_until.expected
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[80000.000000] LOG_WARNING LOG_AUTH
|
||||
[81000.000000] LOG_WARNING LOG_AUTHPRIV
|
||||
[82000.000000] LOG_WARNING LOG_CRON
|
||||
[83000.000000] LOG_WARNING LOG_DAEMON
|
||||
[84000.000000] LOG_WARNING LOG_FTP
|
Loading…
x
Reference in New Issue
Block a user