Skip to content

Commit 19e08d5

Browse files
committed
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.
1 parent 25e4410 commit 19e08d5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/by-util/test_date.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ fn test_date_format_y() {
169169
scene.ucmd().arg("+%y").succeeds().stdout_matches(&re);
170170
}
171171

172+
#[test]
173+
fn test_date_format_q() {
174+
let scene = TestScenario::new(util_name!());
175+
176+
let re = Regex::new(r"^[1-4]\n$").unwrap();
177+
scene.ucmd().arg("+%q").succeeds().stdout_matches(&re);
178+
}
179+
172180
#[test]
173181
fn test_date_format_m() {
174182
let scene = TestScenario::new(util_name!());

0 commit comments

Comments
 (0)