mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
More OPA conformance (#77)
- object.union - object.union_n - treat negative integers as two separate tokens (Sub and Number) when seen in arithmetic expressions - Ensure that fully query string is parsed - Evaluate queries in a separate module instead of the last read module. This correctly handles queries of the form `x = data.test.y` where x is already a ref in `data.test` - Handle queries producing multiple outputs in test infrastructure - Add tests for engine - Add tests locking down valid queries - Update opa.passing Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
e61b406547
commit
e549882b07
@@ -0,0 +1,21 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
cases:
|
||||
- note: negative-integer-literal-in-arithmetic-expressions
|
||||
data: {}
|
||||
modules:
|
||||
- |
|
||||
# In the following, the negative integer must be broken into a - and an integer tokens
|
||||
# when in arighmetic expression contexts
|
||||
package test
|
||||
a = 1+1-1
|
||||
b = 1 +1 -1
|
||||
c = 1 + 1 - 1
|
||||
d = -1 -1
|
||||
query: data.test
|
||||
want_result:
|
||||
a: 1
|
||||
b: 1
|
||||
c: 1
|
||||
d: -2
|
||||
|
||||
Reference in New Issue
Block a user