Skip to content

Commit 2582bbc

Browse files
committed
fix data format test cases
1 parent 1f7bc54 commit 2582bbc

File tree

5 files changed

+6
-57
lines changed

5 files changed

+6
-57
lines changed

atest/robot/cli/runner/extension.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ${DATA FORMATS} ${DATADIR}/parsing/data_formats
88
*** Test Cases ***
99
One extension
1010
--extension robot 21
11-
--EXTENSION .TXT 25
11+
--EXTENSION .TXT 23
1212

1313
Multiple extensions
14-
-F robot:txt:.ROBOT 46
14+
-F robot:txt:.ROBOT 44
1515

1616
Invalid extension
1717
[Template] NONE

atest/robot/parsing/data_formats/formats_resource.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Run Sample File And Check Tests
2323
Run Tests ${options} ${path}
2424
${ignore} ${type} = Split Extension ${path}
2525
Should Be Equal ${SUITE.name} Sample
26-
Should Be Equal ${SUITE.doc} A complex testdata file in ${type} format.
26+
Should Be Equal ${SUITE.doc} A complex testdata file\nin ${type} format.
2727
Check Log Message ${SUITE.setup.messages[0]} Setup
2828
Should Be Equal ${SUITE.teardown} ${None}
2929
Should Contain Tests ${SUITE} @{sample_tests}

atest/robot/parsing/data_formats/tsv.robot

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,9 @@ TSV With TSV Resource
99
Previous Run Should Have Been Successful
1010
Check Test Case Resource File
1111

12-
Un-escaping quoting and empty cells are deprecated
13-
Previous Run Should Have Been Successful
14-
Check quoting and empty cell deprecations
15-
16-
Parsing TSV files automatically is deprecated
17-
Previous Run Should Have Been Successful
18-
Check Automatic Parsing Deprecated Message 6 ${TSVDIR}/sample.tsv
19-
Length should be ${ERRORS} 7
20-
21-
Using --extension avoids deprecation warning
22-
Run sample file and check tests --extension TsV ${TSVDIR}/sample.tsv
23-
Check quoting and empty cell deprecations
24-
Length should be ${ERRORS} 6
25-
2612
TSV Directory
2713
Run Suite Dir And Check Results -F tsv ${TSVDIR}
2814

2915
Directory With TSV Init
3016
Previous Run Should Have Been Successful
3117
Check Suite With Init ${SUITE.suites[1]}
32-
33-
*** Keywords ***
34-
Check quoting and empty cell deprecations
35-
${path} = Normalize Path ${TSVDIR}/sample.tsv
36-
Check quoting deprecation ${ERRORS[0]} ${path} 1
37-
... "This text should be ignored, even though it's not a comment."
38-
Check quoting deprecation ${ERRORS[1]} ${path} 20
39-
... """this has """"many "" quotes """""
40-
Check quoting deprecation ${ERRORS[2]} ${path} 51
41-
... "Hello, world!!"
42-
Check quoting deprecation ${ERRORS[3]} ${path} 93
43-
... """this has """"many "" quotes """""
44-
Check empty cell deprecation ${ERRORS[4]} ${path} 97
45-
Check empty cell deprecation ${ERRORS[5]} ${path} 98
46-
47-
Check quoting deprecation
48-
[Arguments] ${error} ${path} ${line} ${problem}
49-
${msg} = Catenate
50-
... TSV file '${path}' has quotes around cells which is deprecated and must be fixed.
51-
... Remove quotes from '${problem}' on line ${line}.
52-
Check Log Message ${error} ${msg} WARN
53-
54-
Check empty cell deprecation
55-
[Arguments] ${error} ${path} ${line}
56-
${msg} = Catenate
57-
... TSV file '${path}' has empty data cells which is deprecated and must be fixed.
58-
... Escape empty cells on line ${line} with '\${EMPTY}'.
59-
Check Log Message ${error} ${msg} WARN

atest/robot/parsing/data_formats/txt.robot

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ TXT With TXT Resource
99
Previous Run Should Have Been Successful
1010
Check Test Case Resource File
1111

12-
Parsing TXT files automatically is deprecated
13-
Previous Run Should Have Been Successful
14-
Check Automatic Parsing Deprecated Message 0 ${TXTDIR}/sample.txt
15-
Length should be ${ERRORS} 1
16-
17-
Using --extension avoids deprecation warning
18-
Run sample file and check tests --extension txt ${TXTDIR}/sample.txt
19-
Should be empty ${ERRORS}
20-
2112
TXT Directory
2213
Run Suite Dir And Check Results -FTXT ${TXTDIR}
2314

atest/testdata/parsing/data_formats/tsv/sample.tsv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Resource File Keyword from TSV resource
4848

4949
Variable File Should Be Equal @{file_listvar}[0] ${True}
5050
Should Be Equal @{file_listvar}[1] ${3.14}
51-
Should Be Equal @{file_listvar}[2] "Hello, world!!"
51+
Should Be Equal @{file_listvar}[2] Hello, world!!
5252
Should Be Equal ${file_var1} ${-314}
5353
Should Be Equal ${file_var2} file variable 2
5454

@@ -94,8 +94,8 @@ Quotes Should Be Equal ${quoted} """this has """"many "" quotes """""
9494
Should Be Equal ${single_quoted} s'ingle'qu'ot'es''
9595

9696
Escaping Should Be Equal -c:\\temp-\t-\x00-\${x}- ${ESCAPING}
97-
Should Be Equal ${EMPTY}
98-
Should Be Equal This is message
97+
Should Be Equal \ ${EMPTY}
98+
Should Be Equal \ \ This is message
9999

100100
*Keywords* *Action* *Argument* *Argument* *Argument*
101101

0 commit comments

Comments
 (0)