Tests: pin the 100-year rule, day 0, ASCII-only digits in dates, and the ヶ fold (Soul s19 survivors)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2ce6325b70
commit
3a56d3180f
2 changed files with 21 additions and 0 deletions
|
|
@ -147,3 +147,23 @@ fn grade_bound_is_the_type() {
|
|||
assert_eq!(grade["minimum"], 0, "{grade}");
|
||||
assert_eq!(schema["$defs"]["NodeId"]["pattern"], "^n[1-9][0-9]{0,3}$");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calendar_dates_follow_the_gregorian_rule_and_ascii_digits_only() {
|
||||
use weksa::form::is_calendar_date;
|
||||
for ok in ["2024-02-29", "2000-02-29", "2026-12-31"] {
|
||||
assert!(is_calendar_date(ok), "{ok}");
|
||||
}
|
||||
for bad in [
|
||||
"1900-02-29",
|
||||
"2023-02-29",
|
||||
"2026-04-31",
|
||||
"2026-10-00",
|
||||
"2026-00-10",
|
||||
"+026-10-29",
|
||||
"2026-10-2\u{669}",
|
||||
"\u{6f0}026-10-29",
|
||||
] {
|
||||
assert!(!is_calendar_date(bad), "{bad}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -358,6 +358,7 @@ fn s6_folds_dotless_i_kana_and_arabic_indic_digits() {
|
|||
"room \u{661}\u{662}\u{663}\u{664}\u{665}\u{666}\u{667}\u{668}\u{669}\u{660}",
|
||||
),
|
||||
("gate 45", "gate \u{6f4}\u{6f5}"),
|
||||
("\u{3096}", "\u{30f6}"),
|
||||
];
|
||||
for (n, (a, b)) in pairs.into_iter().enumerate() {
|
||||
let (first, second) = (
|
||||
|
|
|
|||
Loading…
Reference in a new issue