Skip to content

Commit f6d2ee4

Browse files
committed
Fix atests and testdata
- remove tests for deprecated setting names - fix newline handling in documentation and metadata - remove test for custom timeout messages - ...
1 parent 987b667 commit f6d2ee4

File tree

8 files changed

+20
-88
lines changed

8 files changed

+20
-88
lines changed

atest/robot/parsing/suite_metadata.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Metadata
1212
NAME Value
1313

1414
Metadata In Multiple Columns
15-
Multiple columns Value in multiple columns
15+
Multiple columns Value in\nmultiple\ncolumns
1616

1717
Metadata In Multiple Lines
18-
Multiple lines Metadata in multiple lines\nis parsed using\nsame semantics as documentation.
18+
Multiple lines Metadata in multiple lines\nis parsed using\nsame semantics\nas\ndocumentation.
1919

2020
Metadata With Variables
2121
Variables Version: 1.2

atest/robot/parsing/suite_settings.robot

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Suite Documentation
1616
... is shortdoc on console.
1717
... ${EMPTY}
1818
... Documentation can have multiple rows
19-
... and also multiple columns.
19+
... and\nalso\nmultiple\ncolumns.
2020
... Newlines can also be added literally with "\n".
2121
... ${EMPTY}
2222
... Variables work since Robot 1.2 and doc_from_cli works too.
@@ -45,13 +45,8 @@ Suite Setup
4545
Suite Teardown
4646
Verify Teardown ${SUITE} BuiltIn.Log Default suite teardown
4747

48-
Deprecated Setting Format
49-
Verify Error 0
50-
... Setting 'For CET ag S' is deprecated. Use 'Force Tags' instead.
51-
... level=WARN
52-
5348
Invalid Setting
54-
Verify Error 1 Non-existing setting 'Invalid Setting'.
49+
Verify Error 0 Non-existing setting 'Invalid Setting'.
5550

5651
*** Keywords ***
5752
Verify Setup

atest/robot/parsing/test_case_settings.robot

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,18 @@ Names are not formatted
1313
${tc} = Check Test Case test_case names are NOT _forMatted_
1414
Should Be Equal ${tc.name} test_case names are NOT _forMatted_
1515

16-
'...' as name is deprecated
17-
Check Test Case ...
18-
Verify Error 0
19-
... Invalid syntax in test case '...':
20-
... Using '...' as test case name is deprecated.
21-
... It will be considered line continuation in Robot Framework 3.2.
22-
... level=WARN
23-
2416
Documentation
2517
Verify Documentation Documentation in single line and column.
2618

2719
Documentation in multiple columns
28-
Verify Documentation Documentation for this test case in multiple columns
20+
Verify Documentation Documentation\nfor this test case\nin multiple columns
2921

3022
Documentation in multiple rows
3123
Verify Documentation 1st logical line
3224
... is shortdoc.
3325
... ${EMPTY}
3426
... This documentation has multiple rows
35-
... and also multiple columns.
27+
... and also\nmultiple columns.
3628

3729
Documentation with variables
3830
Verify Documentation Variables work in documentation since Robot 1.2.
@@ -119,13 +111,8 @@ Timeout
119111
Verify Timeout 1 day
120112

121113
Timeout with message
122-
Verify Timeout 2 minutes 3 seconds 456 milliseconds
123-
Verify Error 1
124-
... Invalid syntax in test case 'Timeout with message':
125-
... Using custom timeout messages is deprecated since
126-
... Robot Framework 3.0.1 and will be removed in future versions.
127-
... Message that was used is 'Message'.
128-
... level=WARN
114+
Verify Timeout 1 minute 39 seconds 999 milliseconds
115+
Verify Error 0 Setting 'Timeout' accepts only one value, got 2.
129116

130117
Default timeout
131118
Verify Timeout 1 minute 39 seconds 999 milliseconds
@@ -149,18 +136,10 @@ Multiple settings
149136
Verify Teardown Test case teardown
150137
Verify Timeout 12 seconds 345 milliseconds
151138

152-
Deprecated setting format
153-
Check Test Case Invalid setting
154-
Verify Error 2
155-
... Invalid syntax in test case 'Invalid setting':
156-
... Setting 'Doc U Ment ation' is deprecated. Use 'Documentation' instead.
157-
... level=WARN
158-
159139
Invalid setting
160140
Check Test Case ${TEST NAME}
161-
Verify Error 3
162-
... Invalid syntax in test case '${TEST NAME}':
163-
... Non-existing setting 'Invalid'.
141+
Verify Error 1 Non-existing setting 'Doc U Ment ation'.
142+
Verify Error 2 Non-existing setting 'Invalid'.
164143

165144
*** Keywords ***
166145
Verify Documentation

atest/robot/parsing/user_keyword_settings.robot

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ Names are not formatted
1313
Should Be Equal ${kw.name} user_keyword nameS _are_not_ FORmatted
1414
END
1515

16-
'...' as name is deprecated
17-
Check Test Case ${TEST NAME}
18-
${path} = Normalize Path ${DATADIR}/parsing/user_keyword_settings.robot
19-
${message} = Catenate
20-
... Error in file '${path}': Invalid syntax in keyword '...':
21-
... Using '...' as keyword name is deprecated.
22-
... It will be considered line continuation in Robot Framework 3.2.
23-
Check Log Message ${ERRORS}[0] ${message} WARN
24-
2516
No documentation
2617
Verify Documentation ${EMPTY} test=Normal name
2718

2819
Documentation
2920
Verify Documentation Documentation for this user keyword
3021

3122
Documentation in multiple columns
32-
Verify Documentation Documentation for this user keyword in multiple columns
23+
Verify Documentation Documentation\nfor this user keyword\nin multiple columns
3324

3425
Documentation in multiple rows
3526
Verify Documentation 1st line is shortdoc.
@@ -44,7 +35,7 @@ Documentation with non-existing variables
4435
Verify Documentation Starting from RF 2.1 \${NONEX} variables are left unchanged.
4536

4637
Documentation with escaping
47-
Verify Documentation \${XXX} c:\\temp${SPACE*2}\\
38+
Verify Documentation \${XXX}\nc:\\temp\n\\
4839

4940
Arguments
5041
[Documentation] Tested more thoroughly elsewhere.
@@ -87,9 +78,6 @@ Return with escaping
8778
Timeout
8879
Verify Timeout 2 minutes 3 seconds
8980

90-
Timeout with message
91-
Verify Timeout 2 minutes 3 seconds 456 milliseconds
92-
9381
Timeout with variables
9482
Verify Timeout 1 day 4 hours 48 minutes
9583

@@ -101,28 +89,17 @@ Multiple settings
10189
Verify Teardown Teardown World
10290
Verify Timeout 6 minutes
10391

104-
Deprecatted setting format
105-
Check Test Case Invalid setting
106-
${path} = Normalize Path ${DATADIR}/parsing/user_keyword_settings.robot
107-
${message} = Catenate
108-
... Error in file '${path}':
109-
... Invalid syntax in keyword 'Invalid passing':
110-
... Setting 'Doc U Ment ation' is deprecated. Use 'Documentation' instead.
111-
Check Log Message ${ERRORS}[2] ${message} WARN
112-
11392
Invalid setting
11493
Check Test Case ${TEST NAME}
11594
${path} = Normalize Path ${DATADIR}/parsing/user_keyword_settings.robot
11695
${message} = Catenate
11796
... Error in file '${path}':
118-
... Invalid syntax in keyword 'Invalid passing':
11997
... Non-existing setting 'Invalid Setting'.
120-
Check Log Message ${ERRORS}[3] ${message} ERROR
98+
Check Log Message ${ERRORS}[0] ${message} ERROR
12199
${message} = Catenate
122100
... Error in file '${path}':
123-
... Invalid syntax in keyword 'Invalid failing':
124101
... Non-existing setting 'invalid'.
125-
Check Log Message ${ERRORS}[4] ${message} ERROR
102+
Check Log Message ${ERRORS}[1] ${message} ERROR
126103

127104
*** Keywords ***
128105
Verify Documentation

atest/testdata/parsing/suite_metadata.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Resource ../core/resources.robot
33

44
Metadata Name Value
55
Metadata Multiple columns Value in multiple columns
6-
Meta data multiple lines Metadata in multiple lines
6+
Metadata multiple lines Metadata in multiple lines
77
... is parsed using
88
... same semantics as documentation.
99
MetaData variables Version: ${version}

atest/testdata/parsing/suite_settings.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Documentation ${1}st logical line
1212
... Escaping (e.g. '\${non-existing}', 'c:\\temp', '\\n') works too.
1313
1414
Default Tags \ default # Empty tags should be ignored
15-
For CET ag S f1 # This format deprecated since RF 3.1
15+
Force Tags f1
1616
... F2
1717
Test Setup Log Default test setup
1818
Test Teardown Log Default test teardown INFO

atest/testdata/parsing/test_case_settings.robot

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ Normal name
2020
test_case names are NOT _forMatted_
2121
No Operation
2222

23-
...
24-
[Documentation] ... as name is deprecated since 3.1.2
25-
No Operation
26-
2723
Documentation
2824
[Documentation] Documentation in single line and column.
2925
No Operation
@@ -37,7 +33,7 @@ Documentation in multiple rows
3733
... is shortdoc.
3834
...
3935
... This documentation has multiple rows
40-
... and also multiple columns.
36+
... and also multiple columns.
4137
No Operation
4238

4339
Documentation with variables
@@ -54,7 +50,7 @@ Documentation with escaping
5450
[Documentation]
5551
... \${VERSION}
5652
... c:\\temp
57-
... \
53+
...
5854
... \\
5955
No Operation
6056

@@ -139,7 +135,7 @@ Timeout
139135
No Operation
140136

141137
Timeout with message
142-
[Timeout] 123456ms Message
138+
[Timeout] 666 Message not supported since RF 3.2
143139
No Operation
144140

145141
Default timeout
@@ -172,6 +168,6 @@ Multiple settings
172168
[Teardown] Log Test case teardown
173169

174170
Invalid setting
175-
[Doc U Ment ation] There is an error but test is run anyway.
171+
[Doc U Ment ation] This no longer works in RF 3.2.
176172
[Invalid] This is invalid
177173
No Operation

atest/testdata/parsing/user_keyword_settings.robot

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ Names are not formatted
1515
u_s_e_r_k_e_y_w_o_r_d_n_a_m_e_s_a_r_e_n_o_t_f_o_r_m_a_t_t_e_d
1616
U_S_E_R_K_E_Y_W_O_R_D_N_A_M_E_S_A_R_E_N_O_T_F_O_R_M_A_T_T_E_D
1717

18-
'...' as name is deprecated
19-
Run Keyword ...
20-
2118
Documentation
2219
Documentation
2320
@@ -72,9 +69,6 @@ Return with escaping
7269
Timeout
7370
Timeout
7471

75-
Timeout with message
76-
Timeout with message
77-
7872
Timeout with variables
7973
Timeout with variables
8074

@@ -98,10 +92,6 @@ Normal name
9892
user_keyword nameS _are_not_ FORmatted
9993
No Operation
10094

101-
...
102-
[Documentation] ... as name is deprecated since 3.1.2
103-
No Operation
104-
10595
Documentation
10696
[Documentation] Documentation for this user keyword
10797
No Operation
@@ -175,10 +165,6 @@ Timeout
175165
[Timeout] 123 seconds
176166
No Operation
177167

178-
Timeout with message
179-
[Timeout] 123456 ms message
180-
No Operation
181-
182168
Timeout with variables
183169
[TIMEout] ${VERSION} DAYS
184170
No Operation
@@ -196,7 +182,6 @@ Multiple settings
196182
[Return] Hello ${name}!!
197183

198184
Invalid passing
199-
[Doc U Ment ation] This is deprecated
200185
[Invalid Setting] This is invalid
201186
No Operation
202187

0 commit comments

Comments
 (0)