mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 22:35:24 +00:00
RST opt.list to have priority over def.list (#17845)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
discard """
|
||||
output: '''
|
||||
|
||||
[Suite] RST parsing
|
||||
|
||||
[Suite] RST indentation
|
||||
|
||||
[Suite] RST include directive
|
||||
@@ -55,6 +57,30 @@ proc toAst(input: string,
|
||||
except EParseError:
|
||||
discard
|
||||
|
||||
suite "RST parsing":
|
||||
test "option list has priority over definition list":
|
||||
check(dedent"""
|
||||
--defusages
|
||||
file
|
||||
-o set
|
||||
""".toAst ==
|
||||
dedent"""
|
||||
rnOptionList
|
||||
rnOptionListItem order=1
|
||||
rnOptionGroup
|
||||
rnLeaf '--'
|
||||
rnLeaf 'defusages'
|
||||
rnDescription
|
||||
rnInner
|
||||
rnLeaf 'file'
|
||||
rnOptionListItem order=2
|
||||
rnOptionGroup
|
||||
rnLeaf '-'
|
||||
rnLeaf 'o'
|
||||
rnDescription
|
||||
rnLeaf 'set'
|
||||
""")
|
||||
|
||||
suite "RST indentation":
|
||||
test "nested bullet lists":
|
||||
let input = dedent """
|
||||
|
||||
Reference in New Issue
Block a user