Skip to content

Commit da4dfad

Browse files
committed
feat: add some more unit tests
1 parent d1a330e commit da4dfad

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test-suite/compile.test.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,11 @@
20112011
"input": null,
20122012
"query": ["regex", "Joe", "^[A-z]+$"],
20132013
"output": true
2014+
},
2015+
{
2016+
"input": null,
2017+
"query": ["regex", "2025", "^[A-z]+$"],
2018+
"output": false
20142019
}
20152020
]
20162021
},
@@ -2023,6 +2028,11 @@
20232028
"query": ["match", "Hello World!", "[A-z]+"],
20242029
"output": { "matches": ["Hello"] }
20252030
},
2031+
{
2032+
"input": null,
2033+
"query": ["match", "2025-11-05", "[A-z]+"],
2034+
"output": null
2035+
},
20262036
{
20272037
"input": null,
20282038
"query": ["match", "Hello World!", "([A-Z])([a-z]+)"],
@@ -2045,6 +2055,11 @@
20452055
"matches": ["2025-07-18", "2025", "07", "18"],
20462056
"groups": { "year": "2025", "month": "07", "date": "18" }
20472057
}
2058+
},
2059+
{
2060+
"input": null,
2061+
"query": ["match", "Hello World!", "(?<year>\\d{4})-(?<month>\\d{2})-(?<date>\\d{2})"],
2062+
"output": null
20482063
}
20492064
]
20502065
},
@@ -2058,6 +2073,11 @@
20582073
"query": ["matchAll", "Hello World!", "[A-z]+"],
20592074
"output": [{ "matches": ["Hello"] }, { "matches": ["World"] }]
20602075
},
2076+
{
2077+
"input": null,
2078+
"query": ["matchAll", "2025-05-11", "[A-z]+"],
2079+
"output": []
2080+
},
20612081
{
20622082
"input": null,
20632083
"query": ["matchAll", "Hello World!", "([A-Z])([a-z]+)"],
@@ -2086,6 +2106,11 @@
20862106
"groups": { "year": "2025", "month": "08", "date": "01" }
20872107
}
20882108
]
2109+
},
2110+
{
2111+
"input": null,
2112+
"query": ["matchAll", "Hello World!", "(?<year>\\d{4})-(?<month>\\d{2})-(?<date>\\d{2})"],
2113+
"output": []
20892114
}
20902115
]
20912116
},

0 commit comments

Comments
 (0)