Skip to content

Commit 3397244

Browse files
committed
Add rest support to new parser
1 parent 046957e commit 3397244

File tree

13 files changed

+49
-57
lines changed

13 files changed

+49
-57
lines changed

atest/robot/parsing/data_formats/formats_resource.robot

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ${FORMATS DIR} ${DATA DIR}/parsing/data_formats
66
${TSV DIR} ${FORMATS DIR}/tsv
77
${TXT DIR} ${FORMATS DIR}/txt
88
${ROBOT DIR} ${FORMATS DIR}/robot
9-
${REST DIR} ${FORMATS DIR}/rest_directives
9+
${REST DIR} ${FORMATS DIR}/rest
1010
${MIXED DIR} ${FORMATS DIR}/mixed_data
1111
${RESOURCE DIR} ${FORMATS DIR}/resources
1212
@{SAMPLE TESTS} Passing Failing User Keyword Nön-äscïï Own Tags Default Tags Variable Table
@@ -63,13 +63,3 @@ Check Suite With Init
6363
Should Be Equal ${suite.teardown} ${None}
6464
Should Contain Suites ${suite} Sub Suite1 Sub Suite2
6565
Should Contain Tests ${suite} @{SUBSUITE_TESTS}
66-
67-
*** Keywords ***
68-
Check Automatic Parsing Deprecated Message
69-
[Arguments] ${index} ${path}
70-
${path} = Normalize Path ${path}
71-
${msg} = Catenate
72-
... Automatically parsing other than '*.robot' files is deprecated.
73-
... Convert '${path}' to '*.robot' format or use '--extension' to
74-
... explicitly configure which files to parse.
75-
Check Log Message @{ERRORS}[${index}] ${msg} WARN

atest/robot/parsing/data_formats/rest_directives.robot renamed to atest/robot/parsing/data_formats/rest.robot

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@ ReST With reST Resource
1010
Previous Run Should Have Been Successful
1111
Check Test Case Resource File
1212

13-
Parsing reST files automatically is deprecated
14-
Previous Run Should Have Been Successful
15-
Check Automatic Parsing Deprecated Message 0 ${RESTDIR}/sample.rst
16-
Length should be ${ERRORS} 1
17-
18-
Using --extension avoids deprecation warning
19-
Run sample file and check tests --extension rst ${RESTDIR}/sample.rst
20-
Length should be ${ERRORS} 0
21-
2213
ReST Directory
2314
Run Suite Dir And Check Results ${EMPTY} ${RESTDIR}
15+
16+
Directory With reST Init
17+
Previous Run Should Have Been Successful
18+
Check Suite With Init ${SUITE.suites[1]}

atest/testdata/parsing/data_formats/rest_directives/empty.rest renamed to atest/testdata/parsing/data_formats/rest/empty.rest

File renamed without changes.

atest/testdata/parsing/data_formats/rest_directives/include.rst renamed to atest/testdata/parsing/data_formats/rest/include.rst

File renamed without changes.

atest/testdata/parsing/data_formats/rest_directives/invalid.rest renamed to atest/testdata/parsing/data_formats/rest/invalid.rest

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Loading

atest/testdata/parsing/data_formats/rest_directives/sample.rst renamed to atest/testdata/parsing/data_formats/rest/sample.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../rest/empty.rest
1+
.. include:: empty.rest
22
.. include:: include.rst
33

44
ReST Test Data Example
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. code:: robotframework
2+
3+
** Settings **
4+
Suite Setup Suite Setup
5+
Documentation Testing suite init file
6+
7+
** Variables **
8+
${msg} = Running suite setup
9+
10+
** Keywords **
11+
Suite Setup Log ${msg} # No more arguments!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. code:: robotframework
2+
3+
*Test Case* Whatever
4+
Suite1 Test No Operation
5+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. code:: robotframework
2+
3+
********************* Test Cases* ***************************************
4+
| Suite2 Test | [Documentation] | FAIL | Expected failure |
5+
| | Fail | ${msg} | |
6+
| | | | | | | | | | |
7+
8+
********************* Variables *****************************************
9+
| ${msg} | Expected failure |

0 commit comments

Comments
 (0)