File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,21 @@ public void testNegatedRegex() {
222222 "ate" , "blueberry" );
223223 }
224224
225+ public void testBrokenContainsExpression () {
226+ try {
227+ // word is a String, not a Map, so this should throw a parse exception
228+ SemgrexPattern pattern = SemgrexPattern .compile ("{word@foo=bar}" );
229+ throw new AssertionError ("Expected a SemgrexParseException" );
230+ } catch (SemgrexParseException e ) {
231+ // good
232+ }
233+ }
234+
235+ public void testContainsExpression () {
236+ // morphofeatures is a Map, so this should work
237+ //SemgrexPattern pattern = SemgrexPattern.compile("{morphofeatures@foo=bar}");
238+ }
239+
225240 public void testReferencedRegex () {
226241 runTest ("{word:/Bill/}" , "[ate subj>Bill obj>[bill det>the]]" ,
227242 "Bill" );
You can’t perform that action at this time.
0 commit comments