This section contains compliance tests for implementations of the Internal API, including its protocol.
Implementors may use these tests as a basis for automated testing of their implementations of a BAPS3 tokeniser.
Warning
|
Implementors automated tests based on this list should take input and output strings from the source form of this page, due to potential differences in the rendered copy. See Compiling for details on how to obtain the source. |
ID | Input | Output | Description |
---|---|---|---|
E1 |
|
Empty string (parsed as whitespace) |
|
E2 |
|
|
Empty line |
E3 |
|
|
Empty single-quoted string (parsed as empty string) |
E4 |
|
|
Empty double-quoted string (parsed as empty string) |
W1 |
|
|
Space-delimited words |
W2 |
|
|
Tab-delimited words |
W3 |
|
|
Words delimited by odd, but valid, whitespace |
W4 |
|
|
CRLF line ending tolerance |
W5 |
|
|
Leading whitespace |
W6 |
|
|
Trailing whitespace |
W7 |
|
|
Surrounding whitespace |
Q1 |
|
|
Backslash escaping |
Q2 |
|
|
Double-quoting |
Q3 |
|
|
Double-quoting with backslash escape |
Q4 |
|
|
Single-quoting |
Q5 |
|
|
Single-quoting with (failed) backslash escape |
Q6 |
|
|
Backslash-escaped double quote |
Q7 |
|
|
Backslash-escaped single quote |
Q8 |
|
|
Single-quoted single quote |
Q9 |
|
|
Double-quoted double quote |
M1 |
|
|
Multiple lines in one tokenisation |
U1 |
|
|
Valid UTF-8 (provided the string literals are interpreted as UTF-8, for example in Go) |
U2 |
|
|
Invalid UTF-8 (ISO-8859-1, using Go syntax) |
X1 |
|
|
Representative command with Windows path |