Files
regorus/tests/lexer/cases/eof.yaml
Ming-Wei Shih c0972ad2ba Update license to MIT
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:35 +00:00

36 lines
790 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
# All other yamls lock down eof.
# Specific eof tests:
# Empty file.
- note: empty-file
rego:
tokens: [""]
kinds: [Eof]
# File with comments.
- note: only-comments
rego: |
# This is a comment.
# This is another comment.
tokens: [""]
kinds: [Eof]
# File with eof and trailing chars.
# Trailing chars are ignored.
- note: eof-trailing-chars
rego: "true (\x0000false + hello"
tokens: ["true", "(", ""]
kinds: [Ident, Symbol, Eof]
# Empty string must be distinguishable from Eof eventhough
# both result in an empty string as the span.
- note: empty-string-eof
rego: "\"\""
tokens: ["", ""]
kinds: [String, Eof]