Skip to content

Commit f3dcf9a

Browse files
pekkaklarckyanne
authored andcommitted
Small cleanup to Libdoc tests
1 parent 5676e64 commit f3dcf9a

File tree

5 files changed

+68
-52
lines changed

5 files changed

+68
-52
lines changed

atest/robot/libdoc/java_library.robot

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Name
99

1010
Documentation
1111
Doc Should Start With
12-
... Library for `libdoc.py` testing purposes.\n\n
12+
... Library for `libdoc.py` testing purposes.
13+
...
1314
... This library is only used in an example and it doesn't do anything useful.
1415

1516
Version
@@ -49,16 +50,18 @@ Keyword Arguments
4950

5051
Keyword Documentation
5152
Keyword Doc Should Start With 0
52-
... Takes one `arg` and *does nothing* with it.\n\n
53-
... Example:\n
54-
... | Your Keyword | xxx |\n
55-
... | Your Keyword | yyy |\n\n
53+
... Takes one `arg` and *does nothing* with it.
54+
...
55+
... Example:
56+
... | Your Keyword | xxx |
57+
... | Your Keyword | yyy |
58+
...
5659
... See `My Keyword` for no more information.
5760
Keyword Doc Should Start With 4
58-
... Does nothing & <doc> has "stuff" to 'escape'!!\n
59-
... ${SPACE * 4}We also got some\n
60-
... ${SPACE * 8}indentation\n
61-
... ${SPACE * 8}here.\n
61+
... Does nothing & <doc> has "stuff" to 'escape'!!
62+
... ${SPACE * 4}We also got some
63+
... ${SPACE * 8}indentation
64+
... ${SPACE * 8}here.
6265
... Back in the normal indentation level.
6366

6467
Non ASCII

atest/robot/libdoc/libdoc_resource.robot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Name Should Be
4242

4343
Doc Should Start With
4444
[Arguments] @{doc}
45-
${doc}= Catenate SEPARATOR= @{doc}
45+
${doc}= Catenate SEPARATOR=\n @{doc}
4646
Element Text Should Match ${LIBDOC} ${doc}* doc
4747

4848
Doc Should Be
4949
[Arguments] @{doc}
50-
${doc}= Catenate SEPARATOR= @{doc}
50+
${doc}= Catenate SEPARATOR=\n @{doc}
5151
Element Text Should Be ${LIBDOC} ${doc} doc
5252

5353
Version Should Match
@@ -108,14 +108,14 @@ Keyword Arguments Should Be
108108
Keyword Doc Should Start With
109109
[Arguments] ${index} @{doc}
110110
${kws}= Get Elements ${LIBDOC} xpath=kw
111-
${doc}= Catenate SEPARATOR= @{doc}
111+
${doc}= Catenate SEPARATOR=\n @{doc}
112112
${text} = Get Element Text ${kws[${index}]} xpath=doc
113113
Should Start With ${text} ${doc}
114114

115115
Keyword Doc Should Be
116116
[Arguments] ${index} @{doc}
117117
${kws}= Get Elements ${LIBDOC} xpath=kw
118-
${doc}= Catenate SEPARATOR= @{doc}
118+
${doc}= Catenate SEPARATOR=\n @{doc}
119119
Element Text Should Be ${kws[${index}]} ${doc} xpath=doc
120120

121121
Keyword Tags Should Be

atest/robot/libdoc/python_library.robot

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Name
88

99
Documentation
1010
Doc Should Start With
11-
... A test library providing communication over Telnet connections.\n\n
12-
... ``Telnet`` is Robot Framework's standard library that makes it possible to\n
11+
... A test library providing communication over Telnet connections.
12+
...
13+
... ``Telnet`` is Robot Framework's standard library that makes it possible to
1314

1415
Version
1516
Version Should Match 3.*
@@ -49,14 +50,19 @@ Keyword Arguments
4950
Keyword Documentation
5051
Keyword Doc Should Start With 0 Closes all open connections
5152
Keyword Doc Should Start With 2
52-
... Executes the given ``command`` and reads, logs, and returns everything until the prompt.\n\n
53-
... This keyword requires the prompt to be [#Configuration|configured]\n
54-
... either in `importing` or with `Open Connection` or `Set Prompt` keyword.\n\n
55-
... This is a convenience keyword that uses `Write` and `Read Until Prompt`\n
56-
... internally. Following two examples are thus functionally identical:\n\n
57-
... | \${out} = | `Execute Command`${SPACE*3}| pwd |\n\n
58-
... | `Write`${SPACE*2}| pwd${SPACE*17}|\n
59-
... | \${out} = | `Read Until Prompt` |\n\n
53+
... Executes the given ``command`` and reads, logs, and returns everything until the prompt.
54+
...
55+
... This keyword requires the prompt to be [#Configuration|configured]
56+
... either in `importing` or with `Open Connection` or `Set Prompt` keyword.
57+
...
58+
... This is a convenience keyword that uses `Write` and `Read Until Prompt`
59+
... internally. Following two examples are thus functionally identical:\
60+
...
61+
... | \${out} = | `Execute Command`${SPACE*3}| pwd |
62+
...
63+
... | `Write`${SPACE*2}| pwd${SPACE*17}|
64+
... | \${out} = | `Read Until Prompt` |
65+
...
6066

6167
KwArgs and VarArgs
6268
Run Libdoc And Parse Output Process

atest/robot/libdoc/resource_file.robot

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ Name
77
Name Should Be resource
88

99
Documentation
10-
Doc Should Start With
11-
... This resource file has documentation.\n\n
12-
... And it is even set in multiple cells with _formatting_.\n
13-
... This should be in the same paragraph as the sentence above.\n\n
14-
... Here is a literal\nnewline\n\n
15-
... -------------\n\n
16-
... | *TABLE* |\n
17-
... | \${NONEX} | $\{CURDIR} | \${TEMPDIR} |\n
18-
... \n
10+
Doc Should Be
11+
... This resource file has documentation.
12+
...
13+
... And it is even set in multiple cells with _formatting_.
14+
... This should be in the same paragraph as the sentence above.
15+
...
16+
... Here is a literal\nnewline
17+
...
18+
... -------------
19+
...
20+
... | *TABLE* |
21+
... | \${NONEX} | $\{CURDIR} | \${TEMPDIR} |
1922
... tabs \t\t\t here
2023

2124
Version
@@ -58,22 +61,23 @@ Keyword Documentation
5861
Keyword Doc Should Be 3 foo bar `kw` & some "stuff" to <escape> .\n\n baa `\${a1}`
5962
Keyword Doc Should Be 5 literal\nnewline
6063
Keyword Doc Should Be 7
61-
... foo bar `kw`.\n\n
62-
... baa `\${a1}` alskdj alskdjlajd\n
63-
... askf laskdjf asldkfj alsdkfj alsdkfjasldkfj\n
64-
... askf laskdjf _asldkfj_ alsdkfj alsdkfjasldkfj\n
65-
... askf *laskdjf* asldkfj `introduction` alsdkfj\n
66-
... http://foo.bar\n
67-
... - aaa\n
68-
... - bbb\n
69-
... \n
70-
... -------------\n
71-
... \n
72-
... | *1* | *2* |\n
64+
... foo bar `kw`.
65+
...
66+
... baa `\${a1}` alskdj alskdjlajd
67+
... askf laskdjf asldkfj alsdkfj alsdkfjasldkfj
68+
... askf laskdjf _asldkfj_ alsdkfj alsdkfjasldkfj
69+
... askf *laskdjf* asldkfj `introduction` alsdkfj
70+
... http://foo.bar
71+
... - aaa
72+
... - bbb
73+
...
74+
... -------------
75+
...
76+
... | *1* | *2* |
7377
... | foo | bar |
7478
Keyword Doc Should Be 8
75-
... Summary line\n
76-
... \n
79+
... Summary line
80+
...
7781
... Another line.
7882

7983
Keyword tags

atest/robot/libdoc/spec_library.robot

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Name
88

99
Documentation
1010
Doc Should Start With
11-
... Library for `libdoc.py` testing purposes.\n\n
11+
... Library for `libdoc.py` testing purposes.
12+
...
1213
... This library is only used in an example and it doesn't do anything useful.
1314

1415
Version
@@ -46,13 +47,15 @@ Keyword Arguments
4647

4748
Keyword Documentation
4849
Keyword Doc Should Be 0
49-
... Takes one `arg` and *does nothing* with it.\n\n
50-
... Example:\n
51-
... | Your Keyword | xxx |\n
52-
... | Your Keyword | yyy |\n\n
50+
... Takes one `arg` and *does nothing* with it.
51+
...
52+
... Example:
53+
... | Your Keyword | xxx |
54+
... | Your Keyword | yyy |
55+
...
5356
... See `My Keyword` for no more information.
5457
Keyword Doc Should Be 1
55-
... Does nothing & <doc> has "stuff" to 'escape'!! and ignored indentation\n
58+
... Does nothing & <doc> has "stuff" to 'escape'!! and ignored indentation
5659
... Tags: in spec these wont become tags
5760

5861
Keyword Tags

0 commit comments

Comments
 (0)