Skip to content

Commit 65a74a2

Browse files
committed
update regression tests
1 parent 4ea0f2a commit 65a74a2

File tree

343 files changed

+2756
-1422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+2756
-1422
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"robotcode.robot.variables": {
3+
"CMD_VAR": "1"
4+
},
5+
"robotcode.robot.env": {
6+
"ENV_VAR": "1"
7+
}
8+
}

tests/robotcode/language_server/robotframework/parts/data/document_highlight.robot

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
*** Settings ***
22
Library Collections
3-
Library ${CURDIR}/libs/myvariables.py
4-
Variables ${CURDIR}/libs/myvariables.py
3+
Library ${CURDIR}/lib/myvariables.py
4+
# ^^^^^^^^^ Variable in library import path
5+
Variables ${CURDIR}/lib/myvariables.py
6+
# ^^^^^^^^^ Variable in variables import path
57
Resource ${CURDIR}/resources/firstresource.resource
8+
# ^^^^^^^^^ Variable in resource import path
9+
Library alibrary a_param=from hello WITH NAME lib_hello
10+
Library alibrary a_param=${LIB_ARG} WITH NAME lib_var
11+
# ^^^^^^^^^^ Variable in library params
12+
613
Suite Setup BuiltIn.Log To Console hi from suite setup
714
# ^^^^^^^^^^^^^^ suite fixture keyword call with namespace
815
Test Setup Log To Console hi from test setup
9-
# ^^^^^^^^^^^^^^ test fixture keyword call with namespace
16+
# ^^^^^^^^^^^^^^ test fixture keyword call with namespace
1017

1118
*** Variables ***
1219
${a var} hello
20+
${LIB_ARG} from lib
21+
1322

1423
*** Test Cases ***
1524
first
1625
[Setup] Log To Console hi ${a var}
17-
# ^^^^^^^^^^^^^^ fixture keyword call
26+
# ^^^^^^^^^^^^^^ fixture keyword call
1827
[Teardown] BuiltIn.Log To Console hi ${a var}
19-
# ^^^^^^^^^^^^^^ fixture keyword call with namespace
28+
# ^^^^^^^^^^^^^^ fixture keyword call with namespace
2029
Log Hi ${a var}
2130
# ^^^ simple keyword call
2231
Log To Console hi ${a var}
@@ -36,3 +45,11 @@ third
3645
# ^^^^^^^^^^^^^^ template keyword with namespace
3746
Hi
3847
There
48+
49+
forth
50+
${result} lib_hello.A Library Keyword
51+
# ^^^^^^^^^ Keyword assignement
52+
Should Be Equal ${result} from hello
53+
${result}= lib_var.A Library Keyword
54+
# ^^^^^^^^^ Keyword assignment with equals sign
55+
Should Be Equal ${result} ${LIB_ARG}

tests/robotcode/language_server/robotframework/parts/data/goto.robot

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22
Library Collections
33
# ^^^^^^^^^^^ Robot Library Import
44
# ^^^^^^^^^^^ Separator
5-
Library ${CURDIR}/libs/myvariables.py
6-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Library Import by Path
7-
Variables ${CURDIR}/libs/myvariables.py
5+
Library ${CURDIR}/lib/myvariables.py
6+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ library import by path
7+
Variables ${CURDIR}/lib/myvariables.py
88
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Variables Import
99
Resource ${CURDIR}/resources/firstresource.resource
10-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Resource Import
10+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ built in var in Resource Import
11+
12+
Library ${DOT}/lib/alibrary.py a_param=${LIB_ARG} WITH NAME lib_var
13+
# ^^^^^^ var in Libary import path
14+
# ^^^^^^^^^^ var in library parameters
1115

1216
*** Variables ***
1317
${A VAR} i'm a var
1418
&{A DICT} a=1 b=2 c=3
19+
${LIB_ARG} from lib
20+
${DOT} .
21+
1522

1623
*** Test Cases ***
1724
first

tests/robotcode/language_server/robotframework/parts/data/hover.robot

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
*** Settings ***
22
Library Collections
33
# ^^^^^^^^^^^ library import by module name
4-
Library ${CURDIR}/libs/myvariables.py
4+
Library alibrary a_param=from hello WITH NAME lib_hello
5+
Library alibrary a_param=${LIB_ARG} WITH NAME lib_var
6+
# ^^^^^^^^^^ Variable in library params
7+
Library ${CURDIR}/lib/myvariables.py
58
# ^^^^^^^^^^^^^^ library import by path name
69
# ^^^^^^^^^ variable in library import
7-
Variables ${CURDIR}/libs/myvariables.py
10+
Variables ${CURDIR}/lib/myvariables.py
811
# ^^^^^^^^^ variable in variables import
912
# ^^^^^^^^^^^^^^ variable import by path name
1013
Resource ${CURDIR}/resources/firstresource.resource
1114
# ^^^^^^^^^^^^^^ resource import by path name
1215
# ^^^^^^^^^ variable in resource import
1316

1417
*** Variables ***
15-
${A VAR} i'm a var
18+
${A VAR}= i'm a var
1619
#^^^^^^^ variable declaration
20+
# ^ not the equal sign
1721
&{A DICT} a=1 b=2 c=3
1822
#^^^^^^^ variable declaration
1923

24+
${LIB_ARG} from lib
25+
26+
2027
*** Test Cases ***
2128
first
2229
[Setup] Log Hello ${A VAR}
@@ -60,6 +67,14 @@ second
6067
hello
6168
world
6269

70+
third
71+
${result} lib_hello.A Library Keyword
72+
# ^^^^^^^^^ Keyword assignement
73+
Should Be Equal ${result} from hello
74+
${result}= lib_var.A Library Keyword
75+
# ^^^^^^^^^ Keyword assignment with equals sign
76+
Should Be Equal ${result} ${LIB_ARG}
77+
6378
*** Keywords ***
6479
a keyword
6580
Run Keyword log hi

tests/robotcode/language_server/robotframework/parts/data/libs/myvariables.py

Lines changed: 0 additions & 5 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data: !GeneratedTestData
2+
character: 16
3+
line: 2
4+
name: Variable in library import path
5+
result:
6+
- !DocumentHighlight
7+
kind: !DocumentHighlightKind 'TEXT'
8+
range:
9+
end:
10+
character: 25
11+
line: 2
12+
start:
13+
character: 16
14+
line: 2
15+
- !DocumentHighlight
16+
kind: !DocumentHighlightKind 'TEXT'
17+
range:
18+
end:
19+
character: 25
20+
line: 4
21+
start:
22+
character: 16
23+
line: 4
24+
- !DocumentHighlight
25+
kind: !DocumentHighlightKind 'TEXT'
26+
range:
27+
end:
28+
character: 25
29+
line: 6
30+
start:
31+
character: 16
32+
line: 6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data: !GeneratedTestData
2+
character: 20
3+
line: 2
4+
name: Variable in library import path
5+
result:
6+
- !DocumentHighlight
7+
kind: !DocumentHighlightKind 'TEXT'
8+
range:
9+
end:
10+
character: 25
11+
line: 2
12+
start:
13+
character: 16
14+
line: 2
15+
- !DocumentHighlight
16+
kind: !DocumentHighlightKind 'TEXT'
17+
range:
18+
end:
19+
character: 25
20+
line: 4
21+
start:
22+
character: 16
23+
line: 4
24+
- !DocumentHighlight
25+
kind: !DocumentHighlightKind 'TEXT'
26+
range:
27+
end:
28+
character: 25
29+
line: 6
30+
start:
31+
character: 16
32+
line: 6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data: !GeneratedTestData
2+
character: 24
3+
line: 2
4+
name: Variable in library import path
5+
result:
6+
- !DocumentHighlight
7+
kind: !DocumentHighlightKind 'TEXT'
8+
range:
9+
end:
10+
character: 25
11+
line: 2
12+
start:
13+
character: 16
14+
line: 2
15+
- !DocumentHighlight
16+
kind: !DocumentHighlightKind 'TEXT'
17+
range:
18+
end:
19+
character: 25
20+
line: 4
21+
start:
22+
character: 16
23+
line: 4
24+
- !DocumentHighlight
25+
kind: !DocumentHighlightKind 'TEXT'
26+
range:
27+
end:
28+
character: 25
29+
line: 6
30+
start:
31+
character: 16
32+
line: 6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data: !GeneratedTestData
2+
character: 16
3+
line: 4
4+
name: Variable in variables import path
5+
result:
6+
- !DocumentHighlight
7+
kind: !DocumentHighlightKind 'TEXT'
8+
range:
9+
end:
10+
character: 25
11+
line: 2
12+
start:
13+
character: 16
14+
line: 2
15+
- !DocumentHighlight
16+
kind: !DocumentHighlightKind 'TEXT'
17+
range:
18+
end:
19+
character: 25
20+
line: 4
21+
start:
22+
character: 16
23+
line: 4
24+
- !DocumentHighlight
25+
kind: !DocumentHighlightKind 'TEXT'
26+
range:
27+
end:
28+
character: 25
29+
line: 6
30+
start:
31+
character: 16
32+
line: 6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data: !GeneratedTestData
2+
character: 20
3+
line: 4
4+
name: Variable in variables import path
5+
result:
6+
- !DocumentHighlight
7+
kind: !DocumentHighlightKind 'TEXT'
8+
range:
9+
end:
10+
character: 25
11+
line: 2
12+
start:
13+
character: 16
14+
line: 2
15+
- !DocumentHighlight
16+
kind: !DocumentHighlightKind 'TEXT'
17+
range:
18+
end:
19+
character: 25
20+
line: 4
21+
start:
22+
character: 16
23+
line: 4
24+
- !DocumentHighlight
25+
kind: !DocumentHighlightKind 'TEXT'
26+
range:
27+
end:
28+
character: 25
29+
line: 6
30+
start:
31+
character: 16
32+
line: 6

0 commit comments

Comments
 (0)