Skip to content

Commit 3481a79

Browse files
committed
Merge pull request #91 from gelraen/nonanchoredpattern
Add a test that checks for implicit anchoring
2 parents b63c96f + 818553f commit 3481a79

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/draft3/pattern.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,16 @@
1919
"valid": true
2020
}
2121
]
22+
},
23+
{
24+
"description": "pattern is not anchored",
25+
"schema": {"pattern": "a+"},
26+
"tests": [
27+
{
28+
"description": "matches a substring",
29+
"data": "xxaayy",
30+
"valid": true
31+
}
32+
]
2233
}
2334
]

tests/draft4/pattern.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,16 @@
1919
"valid": true
2020
}
2121
]
22+
},
23+
{
24+
"description": "pattern is not anchored",
25+
"schema": {"pattern": "a+"},
26+
"tests": [
27+
{
28+
"description": "matches a substring",
29+
"data": "xxaayy",
30+
"valid": true
31+
}
32+
]
2233
}
2334
]

0 commit comments

Comments
 (0)