Skip to content

Commit

Permalink
Add a unit test for #158.
Browse files Browse the repository at this point in the history
  • Loading branch information
renggli committed Oct 31, 2023
1 parent 5cd0bde commit eaea281
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/regression_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ void main() {
expect(surrogatePair, isParseFailure(input));
});
});
group('', () {
group('https://github.com/petitparser/dart-petitparser/issues/155', () {
Parser<String> chars() => anyOf('abc');
Parser<String> direct() => chars().starString().end();
Parser<String> reference() => ref0(chars).starString().end();
Expand All @@ -549,4 +549,9 @@ void main() {
expect(parser.isEqualTo(direct()), isTrue);
});
});
test('https://github.com/petitparser/dart-petitparser/issues/158', () {
final extended = pattern('À-ÿ');
expect(extended, isParseSuccess('ä', result: 'ä'));
expect(extended, isParseSuccess('ï', result: 'ï'));
});
}

0 comments on commit eaea281

Please sign in to comment.