Skip to content

Commit

Permalink
doesn't work yet
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Feb 27, 2025
1 parent f556a85 commit 33de4e1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/src/edu/stanford/nlp/semgraph/semgrex/SemgrexTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,21 @@ public void testNegatedRegex() {
"ate", "blueberry");
}

public void testBrokenContainsExpression() {
try {
// word is a String, not a Map, so this should throw a parse exception
SemgrexPattern pattern = SemgrexPattern.compile("{word@foo=bar}");
throw new AssertionError("Expected a SemgrexParseException");
} catch (SemgrexParseException e) {
// good
}
}

public void testContainsExpression() {
// morphofeatures is a Map, so this should work
//SemgrexPattern pattern = SemgrexPattern.compile("{morphofeatures@foo=bar}");
}

public void testReferencedRegex() {
runTest("{word:/Bill/}", "[ate subj>Bill obj>[bill det>the]]",
"Bill");
Expand Down

0 comments on commit 33de4e1

Please sign in to comment.