|
2 | 2 | Resource data_formats/formats_resource.robot
|
3 | 3 |
|
4 | 4 | *** Variables ***
|
5 |
| -${PARSING} parsing |
6 |
| -${NO TESTS} ${PARSING}${/}notests |
7 |
| -${EMPTY TC TABLE} ${PARSING}${/}empty_testcase_table.robot |
8 |
| -${NO TC TABLE MSG} File has no tests or tasks. |
| 5 | +${PARSING} ${DATADIR}/parsing |
9 | 6 |
|
10 | 7 | *** Test Cases ***
|
11 |
| -Invalid Input |
12 |
| - Check Parsing Error unsupported.log Unsupported file format 'log'. ${PARSING}/unsupported.log |
13 |
| - |
14 | 8 | Directory Containing No Test Cases
|
15 |
| - Run Tests Without Processing Output ${EMPTY} ${NO TESTS} |
16 |
| - Stderr Should Be Equal To [ ERROR ] Suite 'Notests' contains no tests.${USAGE_TIP}\n |
| 9 | + Run tests and check error |
| 10 | + ... ${PARSING}/notests |
| 11 | + ... Suite 'Notests' contains no tests or tasks. |
17 | 12 |
|
18 | 13 | File Containing No Test Cases
|
19 |
| - Run Tests Without Processing Output ${EMPTY} ${EMPTY TC TABLE} |
20 |
| - Stderr Should Be Equal To [ ERROR ] Suite 'Empty Testcase Table' contains no tests.${USAGE_TIP}\n |
| 14 | + Run tests and check error |
| 15 | + ... ${PARSING}/empty_testcase_table.robot |
| 16 | + ... Suite 'Empty Testcase Table' contains no tests or tasks. |
| 17 | + |
| 18 | +Empty File |
| 19 | + Run tests and check error |
| 20 | + ... ${ROBOTDIR}/empty.robot |
| 21 | + ... Suite 'Empty' contains no tests or tasks. |
| 22 | + |
| 23 | +Multisource Containing Empty File |
| 24 | + Run tests and check error |
| 25 | + ... ${ROBOTDIR}/empty.robot ${ROBOTDIR}/sample.robot |
| 26 | + ... Suite 'Empty' contains no tests or tasks. |
21 | 27 |
|
22 |
| -Multisource Containing No Test Cases |
23 |
| - Run Tests Without Processing Output ${EMPTY} ${ROBOTDIR}/empty.robot ${ROBOTDIR}/sample.robot |
24 |
| - ${path} = Normalize Path ${ROBOTDIR}/empty.robot |
25 |
| - Stderr Should Be Equal To [ ERROR ] Parsing '${path}' failed: ${NO TC TABLE MSG}${USAGE TIP}\n |
| 28 | +Multisource With Empty Directory |
| 29 | + Run tests and check error |
| 30 | + ... ${ROBOTDIR}/sample.robot ${PARSING}/notests |
| 31 | + ... Suite 'Notests' contains no tests or tasks. |
26 | 32 |
|
27 |
| -Empty TSV File |
28 |
| - Check Parsing Error empty.tsv ${NO TC TABLE MSG} ${TSVDIR}/empty.tsv |
| 33 | +Multisource Containing Empty File With Non-standard Extension |
| 34 | + Run tests and check error |
| 35 | + ... ${PARSING}/unsupported.log ${ROBOTDIR}/sample.robot |
| 36 | + ... Suite 'Unsupported' contains no tests or tasks. |
29 | 37 |
|
30 |
| -Empty TXT File |
31 |
| - Check Parsing Error empty.txt ${NO TC TABLE MSG} ${TXTDIR}/empty.txt |
| 38 | +File With Invalid Encoding |
| 39 | + Run tests and check parsing error |
| 40 | + ... ${PARSING}/invalid_encoding/invalid_encoding.robot |
| 41 | + ... UnicodeDecodeError: .* |
| 42 | + ... ${PARSING}/invalid_encoding/invalid_encoding.robot |
| 43 | + |
| 44 | +Directory Containing File With Invalid Encoding |
| 45 | + Run tests and check parsing error |
| 46 | + ... ${PARSING}/invalid_encoding/ |
| 47 | + ... UnicodeDecodeError: .* |
| 48 | + ... ${PARSING}/invalid_encoding/invalid_encoding.robot |
| 49 | + |
| 50 | +Multisource Containing File With Invalid Encoding |
| 51 | + Run tests and check parsing error |
| 52 | + ... ${PARSING}/invalid_encoding/invalid_encoding.robot ${PARSING}/invalid_encoding/a_valid_file.robot |
| 53 | + ... UnicodeDecodeError: .* |
| 54 | + ... ${PARSING}/invalid_encoding/invalid_encoding.robot |
32 | 55 |
|
33 | 56 | *** Keywords ***
|
34 |
| -Check Parsing Error |
35 |
| - [Arguments] ${file} ${error} ${paths} |
36 |
| - Run Tests Without Processing Output ${EMPTY} ${paths} |
37 |
| - Check Stderr Matches Regexp \\[ ERROR \\] Parsing '.*[/\\\\]${file}' failed: ${error}${USAGE_TIP} |
| 57 | +Run tests and check error |
| 58 | + [Arguments] ${paths} ${error} |
| 59 | + ${result}= Run Tests Without Processing Output ${EMPTY} ${paths} |
| 60 | + Should be equal ${result.rc} ${252} |
| 61 | + Check Stderr Matches Regexp \\[ ERROR \\] ${error}${USAGE_TIP} |
| 62 | + |
| 63 | +Run tests and check parsing error |
| 64 | + [Arguments] ${paths} ${error} ${file} |
| 65 | + ${file}= Normalize path ${file} |
| 66 | + Run tests and check error ${paths} Parsing '${file}' failed: ${error} |
0 commit comments