01: package abbot.util;
02:
03: import junit.framework.*;
04: import junit.extensions.abbot.*;
05:
06: public class RegexpTest extends TestCase {
07:
08: public void testMultiLineMatch() {
09: assertTrue("Multi-line match failed, LF", Regexp.stringMatch(
10: "(?m)Bangalore.*India", "Bangalore\nIndia"));
11: assertTrue("Multi-line match failed, CRLF", Regexp.stringMatch(
12: "(?m)Bangalore.*India", "Bangalore\r\nIndia"));
13: assertFalse("Shouldn't multi-line match w/o trigger, LF",
14: Regexp.stringMatch("^Bangalore.*India",
15: "Bangalore\nIndia"));
16: }
17:
18: public static void main(String[] args) {
19: TestHelper.runTests(args, RegexpTest.class);
20: }
21: }
|