Skip to content

Commit

Permalink
Test item content edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
amake committed Dec 6, 2024
1 parent 95bbb2e commit bdb00a0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions test/org/grammar/list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,28 @@ void main() {
''
]);
});
test('item with partial block', () {
final result = parser.parse('''- foo
#+begin_src''');
expect(result.value, [
[
[
'',
'-',
[
' ',
null,
null,
[
'foo\n',
[' ', '#+begin_src', '']
]
]
]
],
''
]);
});
test('item with overlong drawer', () {
final result = parser.parse('''- foo
:foo:
Expand Down Expand Up @@ -261,6 +283,25 @@ void main() {
''
]);
});
test('item with partial drawer', () {
final result = parser.parse('''- foo
:foo:''');
expect(result.value, [
[
[
'',
'-',
[
' ',
null,
null,
['foo\n :foo:']
]
]
],
''
]);
});
test('item with overlong drawers and blocks', () {
final result = parser.parse('''- foo
:foo:
Expand Down

0 comments on commit bdb00a0

Please sign in to comment.