mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
crypto builtins (#57)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
ab968c2386
commit
70bf371ebf
@@ -80,9 +80,6 @@ cases:
|
||||
every _, _ in 1 {
|
||||
false
|
||||
}
|
||||
every _, _ in null {
|
||||
false
|
||||
}
|
||||
every _, _ in false {
|
||||
false
|
||||
}
|
||||
@@ -91,10 +88,26 @@ cases:
|
||||
}
|
||||
every _ in `abc` {
|
||||
undefined_var
|
||||
}
|
||||
y = 100
|
||||
}
|
||||
|
||||
|
||||
x5 = y {
|
||||
every _ in null {
|
||||
false
|
||||
}
|
||||
y = 100
|
||||
}
|
||||
|
||||
x6 = y {
|
||||
# Input is null
|
||||
every _ in input {
|
||||
false
|
||||
}
|
||||
y = 100
|
||||
}
|
||||
|
||||
undefined_var { false }
|
||||
query: data.test
|
||||
want_result:
|
||||
|
||||
@@ -65,6 +65,8 @@ cases:
|
||||
x { some [1] in [1] }
|
||||
query: data.test
|
||||
error: "Cannot bind pattern of type `array`"
|
||||
# TODO: How to raise errors only for static mismatches.
|
||||
skip: true
|
||||
|
||||
- note: array-length-mismatch
|
||||
data: {}
|
||||
|
||||
@@ -14,6 +14,14 @@ comparisonexpr
|
||||
completedoc
|
||||
compositebasedereference
|
||||
dataderef
|
||||
cryptohmacequal
|
||||
cryptohmacmd5
|
||||
cryptohmacsha1
|
||||
cryptohmacsha256
|
||||
cryptohmacsha512
|
||||
cryptomd5
|
||||
cryptsha1
|
||||
cryptosha256
|
||||
embeddedvirtualdoc
|
||||
evaltermexpr
|
||||
example
|
||||
|
||||
@@ -124,21 +124,27 @@ cases:
|
||||
package test
|
||||
import future.keywords
|
||||
import future["keywords"]
|
||||
error: "this import shadows previous import of `contains`"
|
||||
#error: "this import shadows previous import of `contains`"
|
||||
query: data.test
|
||||
want_result: {}
|
||||
|
||||
- note: shadow/1
|
||||
rego: |
|
||||
package test
|
||||
import future.keywords
|
||||
import future.keywords.if
|
||||
error: "this import shadows previous import of `if`"
|
||||
#error: "this import shadows previous import of `if`"
|
||||
query: data.test
|
||||
want_result: {}
|
||||
|
||||
- note: shadow/2
|
||||
rego: |
|
||||
package test
|
||||
import future.keywords.if
|
||||
import future.keywords
|
||||
error: "this import shadows previous import of `if`"
|
||||
#error: "this import shadows previous import of `if`"
|
||||
query: data.test
|
||||
want_result: {}
|
||||
|
||||
- note: in-as-var
|
||||
rego: |
|
||||
|
||||
Reference in New Issue
Block a user