tests/dmesg: add since/until test & fixture.

This commit is contained in:
Fuad Ismail 2024-12-11 10:32:37 +07:00
parent 07e01a5276
commit 4dbcceede4
2 changed files with 16 additions and 0 deletions
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");
}

@ -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