mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
test: Move test cases out of topdown package
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This commit is contained in:
+96
@@ -0,0 +1,96 @@
|
||||
cases:
|
||||
- data:
|
||||
a:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
b:
|
||||
v1: hello
|
||||
v2: goodbye
|
||||
c:
|
||||
- x:
|
||||
- true
|
||||
- false
|
||||
- foo
|
||||
"y":
|
||||
- null
|
||||
- 3.14159
|
||||
z:
|
||||
p: true
|
||||
q: false
|
||||
d:
|
||||
e:
|
||||
- bar
|
||||
- baz
|
||||
f:
|
||||
- xs:
|
||||
- 1
|
||||
ys:
|
||||
- 2
|
||||
- xs:
|
||||
- 2
|
||||
ys:
|
||||
- 3
|
||||
g:
|
||||
a:
|
||||
- 1
|
||||
- 0
|
||||
- 0
|
||||
- 0
|
||||
b:
|
||||
- 0
|
||||
- 2
|
||||
- 0
|
||||
- 0
|
||||
c:
|
||||
- 0
|
||||
- 0
|
||||
- 0
|
||||
- 4
|
||||
h:
|
||||
- - 1
|
||||
- 2
|
||||
- 3
|
||||
- - 2
|
||||
- 3
|
||||
- 4
|
||||
l:
|
||||
- a: bob
|
||||
b: -1
|
||||
c:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- a: alice
|
||||
b: 1
|
||||
c:
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
d: null
|
||||
m: []
|
||||
numbers:
|
||||
- "1"
|
||||
- "2"
|
||||
- "3"
|
||||
- "4"
|
||||
strings:
|
||||
bar: 2
|
||||
baz: 3
|
||||
foo: 1
|
||||
three: 3
|
||||
modules:
|
||||
- |
|
||||
package generated
|
||||
|
||||
p = x {
|
||||
array.slice([1, 2, 3], 1000, 2000, __local0__)
|
||||
x = __local0__
|
||||
}
|
||||
note: 'array/slice: clamp both out of range non-empty'
|
||||
query: data.generated.p = x
|
||||
want_result:
|
||||
- x: []
|
||||
Reference in New Issue
Block a user