mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Authored by anakrish and mingweishih Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
36 lines
791 B
YAML
36 lines
791 B
YAML
# Copyright (c) Rego-Rs Authors.
|
|
# Licensed under the Apache 2.0 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]
|
|
|
|
|