Skip to content

Commit b234901

Browse files
committed
Cleanup
- Escape variables used in documentation. - Remove test that didn't actually test anything.
1 parent c150368 commit b234901

File tree

2 files changed

+26
-34
lines changed

2 files changed

+26
-34
lines changed

atest/robot/variables/variable_recommendations.robot

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ Misspelled Env Var
4141
Misspelled Env Var With Internal Variables
4242
Check Test Case ${TESTNAME}
4343

44-
Misspelled List Variable With Period
45-
Check Test Case ${TESTNAME}
46-
4744
Misspelled Extended Variable Parent
4845
Check Test Case ${TESTNAME}
4946

atest/testdata/variables/variable_recommendations.robot

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,140 +20,135 @@ ${S DICTIONARY} Not recommended as dict
2020

2121
*** Test Cases ***
2222
Simple Typo Scalar
23-
[Documentation] FAIL Variable '${SSTRING}' not found. Did you mean:
23+
[Documentation] FAIL Variable '\${SSTRING}' not found. Did you mean:
2424
... ${INDENT}\${STRING}
2525
Log ${SSTRING}
2626

2727
Simple Typo List - Only List-likes Are Recommended
28-
[Documentation] FAIL Variable '@{GIST}' not found. Did you mean:
28+
[Documentation] FAIL Variable '\@{GIST}' not found. Did you mean:
2929
... ${INDENT}\@{LIST}
3030
... ${INDENT}\@{D LIST}
3131
Log @{GIST}
3232

3333
Simple Typo Dict - Only Dicts Are Recommended
34-
[Documentation] FAIL Variable '&{BICTIONARY}' not found. Did you mean:
34+
[Documentation] FAIL Variable '\&{BICTIONARY}' not found. Did you mean:
3535
... ${INDENT}\&{DICTIONARY}
3636
Log &{BICTIONARY}
3737

3838
All Types Are Recommended With Scalars 1
39-
[Documentation] FAIL Variable '${MIST}' not found. Did you mean:
39+
[Documentation] FAIL Variable '\${MIST}' not found. Did you mean:
4040
... ${INDENT}\${LIST}
4141
... ${INDENT}\${S LIST}
4242
... ${INDENT}\${D LIST}
4343
Log ${MIST}
4444

4545
All Types Are Recommended With Scalars 2
46-
[Documentation] FAIL Variable '${BICTIONARY}' not found. Did you mean:
46+
[Documentation] FAIL Variable '\${BICTIONARY}' not found. Did you mean:
4747
... ${INDENT}\${DICTIONARY}
4848
... ${INDENT}\${S DICTIONARY}
4949
... ${INDENT}\${L DICTIONARY}
5050
Log ${BICTIONARY}
5151

5252
Access Scalar In List With Typo In Variable
53-
[Documentation] FAIL Variable '@{LLIST}' not found. Did you mean:
53+
[Documentation] FAIL Variable '\@{LLIST}' not found. Did you mean:
5454
... ${INDENT}\@{LIST}
5555
... ${INDENT}\@{D LIST}
5656
Log @{LLIST}[0]
5757

5858
Access Scalar In List With Typo In Index
59-
[Documentation] FAIL Variable '${STRENG}' not found. Did you mean:
59+
[Documentation] FAIL Variable '\${STRENG}' not found. Did you mean:
6060
... ${INDENT}\${STRING}
6161
Log @{LIST}[${STRENG}]
6262

6363
Long Garbage Variable
64-
[Documentation] FAIL Variable '${dEnOKkgGlYBHwotU2bifJ56w487jD2NJxCrcM62g}' not found.
64+
[Documentation] FAIL Variable '\${dEnOKkgGlYBHwotU2bifJ56w487jD2NJxCrcM62g}' not found.
6565
Log ${dEnOKkgGlYBHwotU2bifJ56w487jD2NJxCrcM62g}
6666

6767
Many Similar Variables
68-
[Documentation] FAIL Variable '${SIMILAR VAR}' not found. Did you mean:
68+
[Documentation] FAIL Variable '\${SIMILAR VAR}' not found. Did you mean:
6969
... ${INDENT}\${SIMILAR VAR 3}
7070
... ${INDENT}\${SIMILAR VAR 2}
7171
... ${INDENT}\${SIMILAR VAR 1}
7272
Log ${SIMILAR VAR}
7373

7474
Misspelled Lower Case
75-
[Documentation] FAIL Variable '${sstring}' not found. Did you mean:
75+
[Documentation] FAIL Variable '\${sstring}' not found. Did you mean:
7676
... ${INDENT}\${STRING}
7777
Log ${sstring}
7878

7979
Misspelled Underscore
80-
[Documentation] FAIL Variable '${_S_STRI_NG}' not found. Did you mean:
80+
[Documentation] FAIL Variable '\${_S_STRI_NG}' not found. Did you mean:
8181
... ${INDENT}\${STRING}
8282
Log ${_S_STRI_NG}
8383

8484
Misspelled Period
85-
[Documentation] FAIL Resolving variable '${INT.EGER}' failed: Variable '${INT}' not found. Did you mean:
85+
[Documentation] FAIL Resolving variable '\${INT.EGER}' failed: Variable '\${INT}' not found. Did you mean:
8686
... ${INDENT}\${INDENT}
8787
... ${INDENT}\${INTEGER}
8888
Log ${INT.EGER}
8989

9090
Misspelled Camel Case
91-
[Documentation] FAIL Variable '@{OneeItem}' not found. Did you mean:
91+
[Documentation] FAIL Variable '\@{OneeItem}' not found. Did you mean:
9292
... ${INDENT}\@{ONE ITEM}
9393
Log @{OneeItem}
9494

9595
Misspelled Whitespace
96-
[Documentation] FAIL Variable '${S STRI NG}' not found. Did you mean:
96+
[Documentation] FAIL Variable '\${S STRI NG}' not found. Did you mean:
9797
... ${INDENT}\${STRING}
9898
Log ${S STRI NG}
9999

100100
Misspelled Env Var
101-
[Documentation] FAIL Environment variable '%{THISS_ENV_VAR_IS_SET}' not found. Did you mean:
101+
[Documentation] FAIL Environment variable '\%{THISS_ENV_VAR_IS_SET}' not found. Did you mean:
102102
... ${INDENT}\%{THIS_ENV_VAR_IS_SET}
103103
Set Environment Variable THIS_ENV_VAR_IS_SET Env var value
104104
${THISS_ENV_VAR_IS_SET} = Set Variable Not env var and thus not recommended
105105
Log %{THISS_ENV_VAR_IS_SET}
106106

107107
Misspelled Env Var With Internal Variables
108-
[Documentation] FAIL Environment variable '%{YET_ANOTHER_ENV_VAR}' not found. Did you mean:
108+
[Documentation] FAIL Environment variable '\%{YET_ANOTHER_ENV_VAR}' not found. Did you mean:
109109
... ${INDENT}\%{ANOTHER_ENV_VAR}
110110
Set Environment Variable ANOTHER_ENV_VAR ANOTHER_ENV_VAR
111111
Log %{YET_%{ANOTHER_ENV_VAR}}
112112

113-
Misspelled List Variable With Period
114-
[Documentation] FAIL Resolving variable '${list.nnew}' failed: AttributeError: 'list' object has no attribute 'nnew'
115-
@{list.new} = Create List 1 2 3
116-
Log ${list.nnew}
117-
118113
Misspelled Extended Variable Parent
119-
[Documentation] FAIL Resolving variable '${OBJJ.name}' failed: Variable '${OBJJ}' not found. Did you mean:
114+
[Documentation] FAIL Resolving variable '\${OBJJ.name}' failed: Variable '${OBJJ}' not found. Did you mean:
120115
... ${INDENT}\${OBJ}
121116
Log ${OBJJ.name}
122117

123118
Misspelled Extended Variable Parent As List
124119
[Documentation] Extended variables are always searched as scalars.
125-
... FAIL Resolving variable '@{OBJJ.name}' failed: Variable '${OBJJ}' not found. Did you mean:
120+
... FAIL Resolving variable '\@{OBJJ.name}' failed: Variable '\${OBJJ}' not found. Did you mean:
126121
... ${INDENT}\${OBJ}
127122
Log @{OBJJ.name}
128123

129124
Misspelled Extended Variable Child
130-
[Documentation] FAIL Resolving variable '${OBJ.nmame}' failed: AttributeError: 'ExampleObject' object has no attribute 'nmame'
125+
[Documentation] FAIL Resolving variable '\${OBJ.nmame}' failed: AttributeError: 'ExampleObject' object has no attribute 'nmame'
131126
Log ${OBJ.nmame}
132127

133128
Existing Non ASCII Variable Name
134-
[Documentation] FAIL Variable '${Ceärsŵs}' not found. Did you mean:
129+
[Documentation] FAIL Variable '\${Ceärsŵs}' not found. Did you mean:
135130
... ${INDENT}\${Cäersŵs}
136131
Log ${Ceärsŵs}
137132

138133
Non Existing Non ASCII Variable Name
139-
[Documentation] FAIL Variable '${ノಠ益ಠノ}' not found.
134+
[Documentation] FAIL Variable '\${ノಠ益ಠノ}' not found.
140135
Log ${ノಠ益ಠノ}
141136

142137
Invalid Binary
143-
[Documentation] FAIL Variable '${0b123}' not found.
138+
[Documentation] FAIL Variable '\${0b123}' not found.
144139
Log ${0b123}
145140

146141
Invalid Multiple Whitespace
147-
[Documentation] FAIL Resolving variable '${SPACVE * 5}' failed: Variable '${SPACVE }' not found. Did you mean:
142+
[Documentation] FAIL Resolving variable '\${SPACVE * 5}' failed: Variable '\${SPACVE }' not found. Did you mean:
148143
... ${INDENT}\${SPACE}
149144
Log ${SPACVE * 5}
150145

151146
Non Existing Env Var
152-
[Documentation] FAIL Environment variable '%{THIS_ENV_VAR_DOES_NOT_EXIST}' not found.
147+
[Documentation] FAIL Environment variable '\%{THIS_ENV_VAR_DOES_NOT_EXIST}' not found.
153148
Log %{THIS_ENV_VAR_DOES_NOT_EXIST}
154149

155150
Multiple Missing Variables
156-
[Documentation] FAIL Variable '${SSTRING}' not found. Did you mean:
151+
[Documentation] FAIL Variable '\${SSTRING}' not found. Did you mean:
157152
... ${INDENT}\${STRING}
158153
Log Many ${SSTRING} @{LLIST}
159154

@@ -162,7 +157,7 @@ Empty Variable Name
162157
Log ${}
163158

164159
Environment Variable With Misspelled Internal Variables
165-
[Documentation] FAIL Variable '${nnormal_var}' not found. Did you mean:
160+
[Documentation] FAIL Variable '\${nnormal_var}' not found. Did you mean:
166161
... ${INDENT}\${normal_var}
167162
Set Environment Variable yet_another_env_var THIS_ENV_VAR
168163
${normal_var} = Set Variable IS_SET

0 commit comments

Comments
 (0)