1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-06-25 00:37:26 +02:00

Feature/#5 collect keyword alt (#141)

Implemented COLLECT key word
This commit is contained in:
Tim Voronov
2018-10-24 21:30:05 -04:00
committed by GitHub
parent b02c554214
commit 549b4abd3b
67 changed files with 4913 additions and 2811 deletions

View File

@ -47,17 +47,18 @@ func TestParam(t *testing.T) {
})
Convey("Should be possible to use in range", t, func() {
out := compiler.New().
prog := compiler.New().
MustCompile(`
FOR i IN @start..@end
SORT i
RETURN i
`).
MustRun(
context.Background(),
runtime.WithParam("start", 1),
runtime.WithParam("end", 4),
)
`)
out := prog.MustRun(
context.Background(),
runtime.WithParam("start", 1),
runtime.WithParam("end", 4),
)
So(string(out), ShouldEqual, `[1,2,3,4]`)