mirror of
https://github.com/zkemail/zk-regex.git
synced 2026-01-09 13:48:00 -05:00
Fix test
This commit is contained in:
@@ -2,7 +2,7 @@ pragma circom 2.1.5;
|
||||
|
||||
include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom";
|
||||
|
||||
// regex: email was meant for @[a-zA-Z0-9_]+.
|
||||
// regex: email was meant for @(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9|_)+
|
||||
template SimpleRegexDecomposed(msg_bytes) {
|
||||
signal input msg[msg_bytes];
|
||||
signal output out;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
{
|
||||
"is_public": true,
|
||||
"regex_def": "[a-zA-Z0-9_]+"
|
||||
"regex_def": "(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9|_)+"
|
||||
},
|
||||
{
|
||||
"is_public": false,
|
||||
|
||||
@@ -15,14 +15,11 @@ jest.setTimeout(120000);
|
||||
describe("Simple Regex Decomposed", () => {
|
||||
let circuit;
|
||||
beforeAll(async () => {
|
||||
compiler.genFromDecomposed(
|
||||
path.join(__dirname, "./circuits/simple_regex_decomposed.json"),
|
||||
{
|
||||
circomFilePath: path.join(__dirname, "./circuits/simple_regex_decomposed.circom"),
|
||||
templateName: "SimpleRegexDecomposed",
|
||||
genSubstrs: true
|
||||
}
|
||||
);
|
||||
compiler.genFromDecomposed(path.join(__dirname, "./circuits/simple_regex_decomposed.json"), {
|
||||
circomFilePath: path.join(__dirname, "./circuits/simple_regex_decomposed.circom"),
|
||||
templateName: "SimpleRegexDecomposed",
|
||||
genSubstrs: true
|
||||
});
|
||||
circuit = await wasm_tester(path.join(__dirname, "./circuits/test_simple_regex_decomposed.circom"), option);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user