mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-26 20:40:51 +00:00
strftime: add regression test case
This commit is contained in:
parent
a6231701ee
commit
5cf5603500
@ -1199,4 +1199,18 @@ mod tests {
|
||||
"2014-05-07T12:34:56+0000%Q%.2f%%"
|
||||
);
|
||||
}
|
||||
|
||||
/// Regression test for https://github.com/chronotope/chrono/issues/1725
|
||||
#[test]
|
||||
#[cfg(any(feature = "alloc", feature = "std"))]
|
||||
fn test_finite() {
|
||||
let mut i = 0;
|
||||
for item in StrftimeItems::new("%2f") {
|
||||
println!("{:?}", item);
|
||||
i += 1;
|
||||
if i > 10 {
|
||||
panic!("infinite loop");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user