mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
some .. in implementation
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
Anand Krishnamoorthi
parent
eded43bdc6
commit
cf4fbdbb90
25
tests/interpreter/cases/some/tests.yaml
Normal file
25
tests/interpreter/cases/some/tests.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
cases:
|
||||
- note: array
|
||||
data: {}
|
||||
modules:
|
||||
- |
|
||||
package test
|
||||
import future.keywords
|
||||
|
||||
r1 = y {
|
||||
y1 = [x | some x in [1, 2, 3]; x >= 2]
|
||||
y2 = [y | some x, y in [1, 2, 3]; x >= 2]
|
||||
y = [y1, y2]
|
||||
}
|
||||
|
||||
r2[x] {
|
||||
some x, "l" in ["h", "e", "l", "l", "o"]
|
||||
}
|
||||
|
||||
query: data.test
|
||||
want_result:
|
||||
r1: [ [2, 3], [3]]
|
||||
r2:
|
||||
set!: [2, 3]
|
||||
Reference in New Issue
Block a user