mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
In case of empty delimiter, Rust's split returns leading and trailing empty strings whereas Golang's doesn't. Change behavior to match Golang/OPA. fixes #291 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
18 lines
364 B
YAML
18 lines
364 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: empty separator
|
|
data: {}
|
|
modules: []
|
|
query: "x := split(\"test\", \"\")"
|
|
want_result:
|
|
x: ["t", "e", "s", "t"]
|
|
|
|
- note: empty separator, empty string
|
|
data: {}
|
|
modules: []
|
|
query: "x := split(\"\", \"\")"
|
|
want_result:
|
|
x: []
|