Permalink
Show file tree
Hide file tree
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
1001: CommentPosterWorkItem@openjdk/jdk#3425
Reviewed-by: tbell
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.openjdk.skara.bots.mlbridge; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class BridgedCommentTests { | ||
|
||
@Test | ||
public void bridgeMailPattern() { | ||
assertFalse(BridgedComment.bridgedMailId.matcher("foo").find()); | ||
assertFalse(BridgedComment.bridgedMailId.matcher("<-- foo -->").find()); | ||
assertTrue(BridgedComment.bridgedMailId.matcher("<!-- Bridged id (foo=) -->").find()); | ||
assertTrue(BridgedComment.bridgedMailId.matcher("<!-- Bridged id (PEEzNDJBNUQwLTM" + | ||
"4MjItNEM2Ni05MDc4LUY5QThDOTA2NTRBNkBjYmZpZGRsZS5jb20+RnJvbSB0aGUgQ1NSIHJldmlldzo=) -->").find()); | ||
|
||
var matcher = BridgedComment.bridgedMailId.matcher("<!-- Bridged id (fo+/o=) -->"); | ||
assertTrue(matcher.find()); | ||
assertEquals("fo+/o=", matcher.group(1)); | ||
} | ||
} |
cdc1b02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
Issues