File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,16 @@ public void testNegatedRegex() {
227227 public void testBrokenContainsExpression () {
228228 try {
229229 // 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}}" );
231231 throw new AssertionError ("Expected a SemgrexParseException" );
232232 } catch (SemgrexParseException e ) {
233233 // good
234234 }
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}}" );
235240 }
236241
237242 public void testContainsExpression () {
You can’t perform that action at this time.
0 commit comments