test_date: Add test for quarter

This was fixed upstream in #7333, but it's a good idea to have a
test here as well, especially as we're considering switching
datetime library.
This commit is contained in:
Nicolas Boichat
2025-04-29 21:35:00 +08:00
parent 25e4410c3b
commit 19e08d5c11
+8
View File
@@ -169,6 +169,14 @@ fn test_date_format_y() {
scene.ucmd().arg("+%y").succeeds().stdout_matches(&re);
}
#[test]
fn test_date_format_q() {
let scene = TestScenario::new(util_name!());
let re = Regex::new(r"^[1-4]\n$").unwrap();
scene.ucmd().arg("+%q").succeeds().stdout_matches(&re);
}
#[test]
fn test_date_format_m() {
let scene = TestScenario::new(util_name!());