File tree 1 file changed +6
-1
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,16 @@ public void testNegatedRegex() {
227
227
public void testBrokenContainsExpression () {
228
228
try {
229
229
// word is a String, not a Map, so this should throw a parse exception
230
- SemgrexPattern pattern = SemgrexPattern .compile ("{word{foo= bar}}" );
230
+ SemgrexPattern pattern = SemgrexPattern .compile ("{word: {foo: bar}}" );
231
231
throw new AssertionError ("Expected a SemgrexParseException" );
232
232
} catch (SemgrexParseException e ) {
233
233
// good
234
234
}
235
+
236
+ // this one should work. we run it here to verify the test was
237
+ // valid, as opposed to getting a SemgrexParseException because
238
+ // this wasn't even following proper contains syntax
239
+ SemgrexPattern pattern = SemgrexPattern .compile ("{morphofeatures:{foo:bar}}" );
235
240
}
236
241
237
242
public void testContainsExpression () {
You can’t perform that action at this time.
0 commit comments