settings(parse): force trailing suffix when already used it once

prevent ambiguous specs when parsing native durations, which
are implicitly used by default for numbers without suffixes
This commit is contained in:
Maxim Prokhorov
2025-11-20 23:42:14 +03:00
parent f9a445dd95
commit 245e456b44
2 changed files with 9 additions and 0 deletions

View File

@@ -221,6 +221,11 @@ void test_parse_duration_spec() {
}
void test_parse_fail_duration_spec() {
test_parse_fail("1000us100");
test_parse_fail("100s50");
test_parse_fail("ms100");
test_parse_fail("s200");
test_parse_fail("u300");
test_parse_fail("123ui");
test_parse_fail("123s456sm");
test_parse_fail("456s\x01\\789uu");