fix: 输入校验忽略多个连续空格与大小写;统一中英文引号与空白规范化

This commit is contained in:
shenlei
2026-09-16 17:55:08 +09:00
parent 4d324903b4
commit d72959df70
10 changed files with 163 additions and 28 deletions
@@ -31,4 +31,31 @@ void main() {
isTrue,
);
});
test('ignores multiple spaces, mixed casing and curly apostrophes', () {
// a0-01 greeting and name with multiple spaces and uppercase
expect(
WritingFeedback.check('a0-01', ' HELLO I AM ALEX ').complete,
isTrue,
);
// a0-01 with curly quote and multiple spaces
expect(
WritingFeedback.check('a0-01', 'HI I’M MIA').complete,
isTrue,
);
// a0-07 with multiple spaces in phrase
expect(
WritingFeedback.check('a0-07', 'THIS IS MY MOTHER').complete,
isTrue,
);
// a0-08-c with multiple spaces and curly apostrophe
expect(
WritingFeedback.check(
'a0-08-c',
'IT’S THREE O’CLOCK',
segmentId: 'a0-08-c',
).complete,
isTrue,
);
});
}