Skip to content

Commit 115b4e7

Browse files
committed
Test data cleanup related to documentation and metadata
1 parent 505bb6a commit 115b4e7

File tree

7 files changed

+52
-45
lines changed

7 files changed

+52
-45
lines changed

atest/robot/parsing/suite_metadata.robot

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,37 @@
22
Documentation Tests for --metadata are located in robot/cli/runner and
33
... for other suite settings in suite_settings.robot.
44
Suite Setup Run Tests --variable meta_value_from_cli:my_metadata parsing/suite_metadata.robot
5+
Test Template Validate metadata
56
Resource atest_resource.robot
67

78
*** Test Cases ***
89
Metadata
9-
Should be Equal ${SUITE.metadata['Name']} Value
10+
Name Value
11+
name Value
12+
NAME Value
1013

1114
Metadata In Multiple Columns
12-
Should be Equal ${SUITE.metadata['Multiple columns']} Value in multiple columns
15+
Multiple columns Value in multiple columns
1316

1417
Metadata In Multiple Lines
15-
Should be Equal ${SUITE.metadata['multiple lines']} Value in multiple lines '\n\n' and with\nreal newlines
18+
Multiple lines Metadata in multiple lines\nis parsed using\nsame semantics as documentation.
1619

1720
Metadata With Variables
18-
Should be Equal ${SUITE.metadata['variables']} Version: 1.2
21+
Variables Version: 1.2
1922

2023
Metadata With Variable From Resource
21-
Should be Equal ${SUITE.metadata['Variable from resource']} Variable from a resource file
24+
Variable from resource Variable from a resource file
2225

2326
Metadata With Variable From Commandline
24-
Should be Equal ${SUITE.metadata['Value from CLI']} my_metadata
27+
Value from CLI my_metadata
2528

2629
Using Same Name Twice
27-
Should be Equal ${SUITE.metadata['Overridden']} This overrides first value
30+
Overridden This overrides first value
2831

2932
Unescaping Metadata In Setting Table
30-
${stderr} = Get File ${STDERR FILE}
31-
Should Not Contain ${stderr} \${non-existing-in-suite-doc}
32-
Should be Equal ${SUITE.metadata['Escaping']} Three backslashes \\\\\\
33+
Escaping Three backslashes \\\\\\ & \${version}
34+
35+
*** Keywords ***
36+
Validate metadata
37+
[Arguments] ${name} ${value}
38+
Should be Equal ${SUITE.metadata['${name}']} ${value}

atest/robot/parsing/suite_settings.robot

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ Suite Documentation
1515
... (i.e. paragraph)
1616
... is shortdoc on console.
1717
... ${EMPTY}
18-
... Text from multiple columns is catenated with spaces,
19-
... and line continuation creates a new line.
20-
... Newlines can also be added literally "\n\n".
18+
... Documentation can have multiple rows
19+
... and also multiple columns.
20+
... Newlines can also be added literally with "\n".
21+
... ${EMPTY}
2122
... Variables work since Robot 1.2 and doc_from_cli works too.
2223
... Starting from RF 2.1 \${nonexisting} variables are left unchanged.
2324
... Escaping (e.g. '\${non-existing}', 'c:\\temp', '\\n') works too.

atest/robot/parsing/test_case_settings.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Documentation in multiple rows
3232
Verify Documentation 1st logical line
3333
... is shortdoc.
3434
... ${EMPTY}
35-
... Documentation for this test case
36-
... in multiple rows.
35+
... This documentation has multiple rows
36+
... and also multiple columns.
3737

3838
Documentation with variables
3939
Verify Documentation Variables work in documentation since Robot 1.2.

atest/testdata/core/resources.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*** Variable ***
2-
${resource_file_var} Variable from a resource file
3-
${resource_file_var_2} Another variable from a resource file
2+
${resource_file_var} Variable from a resource file
3+
${resource_file_var_2} Another variable from a resource file
44
@{resource_file_list_var} List variable from a resource file
55

66
*** Keyword ***

atest/testdata/parsing/suite_metadata.robot

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
*** Settings ***
2-
Resource ../core/resources.robot
2+
Resource ../core/resources.robot
33

4-
Metadata Name Value
5-
MetadatA Multiple columns Value in multiple columns
6-
Meta data multiple lines Value in multiple lines '\n\n' and with
7-
... real newlines
8-
MetaData variables Version: ${version}
9-
Metadata Variable from resource ${resource_file_var}
10-
Metadata Value from CLI ${META_VALUE_FROM_CLI}
11-
Metadata Escaping Three backslashes \\\\\\
12-
Metadata Overridden first value
13-
Metadata over ridden This overrides first value
4+
Metadata Name Value
5+
Metadata Multiple columns Value in multiple columns
6+
Meta data multiple lines Metadata in multiple lines
7+
... is parsed using
8+
... same semantics as documentation.
9+
MetaData variables Version: ${version}
10+
Metadata Variable from resource ${resource_file_var}
11+
Metadata Value from CLI ${META_VALUE_FROM_CLI}
12+
Metadata Escaping Three backslashes \\\\\\ & \${version}
13+
Metadata Overridden first value
14+
Metadata over ridden This overrides first value
1415

1516
*** Variables ***
16-
${version} 1.2
17+
${version} 1.2
1718

1819
*** Test Cases ***
1920
Test Case

atest/testdata/parsing/suite_settings.robot

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@ Documentation ${1}st logical line
33
... (i.e. paragraph)
44
... is shortdoc on console.
55
...
6-
... Text from multiple columns is catenated with spaces,
7-
... and line continuation creates a new line.
8-
... Newlines can also be added literally "\n\n".
6+
... Documentation can have multiple rows
7+
... and also multiple columns.
8+
... Newlines can also be added literally with "\n".
9+
...
910
... Variables work since Robot ${version} and ${SUITE_DOC_FROM_CLI} works too.
10-
... Starting from RF 2.1 ${nonexisting} variables are left unchanged.
11-
... Escaping (e.g. '\${non-existing}', 'c:\\temp', '\\n') works too.
11+
... Starting from RF 2.1 ${nonexisting} variables are left unchanged.
12+
... Escaping (e.g. '\${non-existing}', 'c:\\temp', '\\n') works too.
1213
13-
Default Tags \ default # Empty tags should be ignored
14-
For CET ag S f1 # This format deprecated since RF 3.1
14+
Default Tags \ default # Empty tags should be ignored
15+
For CET ag S f1 # This format deprecated since RF 3.1
1516
... F2
16-
Test Setup Log Default test setup
17-
Test Teardown Log Default test teardown INFO
18-
Suite Setup ${SUITE_FIXTURE_FROM_CLI} ${default} suite setup # Global variables work here
17+
Test Setup Log Default test setup
18+
Test Teardown Log Default test teardown INFO
19+
Suite Setup ${SUITE_FIXTURE_FROM_CLI} ${default} suite setup # Global variables work here
1920
Suite Teardown ${SUITE_FIXTURE_FROM_CLI} Default suite teardown
2021

2122
Invalid Setting Yes, this is invalid.
2223

2324
*** Variables ***
24-
${version} 1.2
25-
${default} Default
26-
@{Default_tags} default-1O default-2 # default-3 added separately
27-
25+
${version} 1.2
26+
${default} Default
2827

2928
*** Test Cases ***
3029
Test Case

atest/testdata/parsing/test_case_settings.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Documentation in multiple rows
3636
[DOCUMENTATION] ${1}st logical line
3737
... is shortdoc.
3838
...
39-
... Documentation for this test case
40-
... in multiple rows.
39+
... This documentation has multiple rows
40+
... and also multiple columns.
4141
No Operation
4242

4343
Documentation with variables

0 commit comments

Comments
 (0)