Skip to content

Commit 3136ef6

Browse files
committed
Added test to regex_db. Also added the comment for the other 2 failing tests that they use composed circom circuits and cannot be tested in this way.
1 parent 0356bdb commit 3136ef6

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

test_suite/from_circom_failing_tests.json

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,7 @@
11
{
22
"database": [
33
{
4-
"regex": {
5-
"decomposed": [
6-
{
7-
"is_public": false,
8-
"regex_def": "(\\r\\n|^)dkim-signature:"
9-
},
10-
{
11-
"is_public": false,
12-
"regex_def": "([a-z]+=[^;]+; )+bh="
13-
},
14-
{
15-
"is_public": true,
16-
"regex_def": "[a-zA-Z0-9+/=]+"
17-
},
18-
{
19-
"is_public": false,
20-
"regex_def": ";"
21-
}
22-
]
23-
},
24-
"gen_substrs": true,
25-
"input_size": 50,
26-
"samples_pass": [
27-
{
28-
"input": "dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=",
29-
"expected_substrings": ["BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs="]
30-
},
31-
{
32-
"input": "\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=",
33-
"expected_substrings": ["BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs="]
34-
}
35-
],
36-
"samples_fail": ["\r\nto: dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b="]
37-
},
38-
{
39-
"regex": {
4+
"regex": { // This is a combination of multiple templates in circom, cannot be tested like this
405
"decomposed": [
416
{
427
"is_public": false,
@@ -105,7 +70,7 @@
10570
]
10671
},
10772
{
108-
"regex": {
73+
"regex": { // This is a combination of multiple templates in circom, cannot be tested like this
10974
"decomposed": [
11075
{
11176
"is_public": false,

test_suite/regex_db.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,41 @@
13701370
}
13711371
],
13721372
"samples_fail": ["to:dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b="]
1373+
},
1374+
{
1375+
"regex": {
1376+
"decomposed": [
1377+
{
1378+
"is_public": false,
1379+
"regex_def": "(\\r\\n|^)dkim-signature:"
1380+
},
1381+
{
1382+
"is_public": false,
1383+
"regex_def": "([a-z]+=[^;]+; )+bh="
1384+
},
1385+
{
1386+
"is_public": true,
1387+
"regex_def": "[a-zA-Z0-9+/=]+"
1388+
},
1389+
{
1390+
"is_public": false,
1391+
"regex_def": ";"
1392+
}
1393+
]
1394+
},
1395+
"gen_substrs": true,
1396+
"input_size": 50,
1397+
"samples_pass": [
1398+
{
1399+
"input": "dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=",
1400+
"expected_substrings": ["BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs="]
1401+
},
1402+
{
1403+
"input": "\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=",
1404+
"expected_substrings": ["BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs="]
1405+
}
1406+
],
1407+
"samples_fail": ["\r\nto: dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b="]
13731408
}
13741409
]
13751410
}

0 commit comments

Comments
 (0)