Skip to content

Commit

Permalink
Add a regexp_replace ztest entry for zed#4445 example (#5125)
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz authored May 14, 2024
1 parent ce9626e commit 7cf3792
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/sam/expr/function/ztests/regexp-replace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ input: |
{in:"-ab-axxb-",re:"a(x*)b",new:"$1"}
{in:"-ab-axxb-",re:"a(?P<X>x*)b",new:"$X"}
{in:"Foo bar",re:"Foo",new:"foo"}
{in:"", re:"a(x*)b",new:""}
{in:"seafood fool",re:"foo(.?",new:"food"}
{in:4,re:5,new:["foo"]}
{in:"foo",re:null(string),new:null(string)}
Expand All @@ -14,7 +15,7 @@ output: |
"--xx-"
"--xx-"
"foo bar"
""
error("regexp_replace: error parsing regexp: missing closing ): `foo(.?`")
error({message:"regexp_replace: string arg required",on:4})
error("regexp_replace: 2nd and 3rd args cannot be null")

0 comments on commit 7cf3792

Please sign in to comment.