diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2021-06-20 21:00:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 20:00:42 +0200 |
commit | 1b3c0f142dd5abc3b3509feb194f54e6acf046c0 (patch) | |
tree | a4c896ae387e3a36d3e6b4162528302378897a94 /tests | |
parent | 7d5e6b0169fb83c7682bfad5d675c21db785c324 (diff) | |
download | Nim-1b3c0f142dd5abc3b3509feb194f54e6acf046c0.tar.gz |
validate rst field for :number-lines:, :status: (#18304)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/trstgen.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/stdlib/trstgen.nim b/tests/stdlib/trstgen.nim index 300229648..d5d902e1d 100644 --- a/tests/stdlib/trstgen.nim +++ b/tests/stdlib/trstgen.nim @@ -1136,6 +1136,18 @@ Test1 check "<pre class=\"line-nums\">55\n</pre>" in output check "<span class=\"Identifier\">x</span>" in output + test "Nim code-block indentation": + let input = dedent """ + .. code-block:: nim + :number-lines: 55 + let a = 1 + """ + var error = new string + let output = input.toHtml(error=error) + check(error[] == "input(1, 1) Error: invalid field: " & + "extra arguments were given to number-lines: ' let a = 1'") + check "" == output + test "RST admonitions": # check that all admonitions are implemented let input0 = dedent """ |