File tree 1 file changed +15
-0
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,21 @@ public void testNegatedRegex() {
222
222
"ate" , "blueberry" );
223
223
}
224
224
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
+
225
240
public void testReferencedRegex () {
226
241
runTest ("{word:/Bill/}" , "[ate subj>Bill obj>[bill det>the]]" ,
227
242
"Bill" );
You can’t perform that action at this time.
0 commit comments