|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| RegexpTest.java | - | 75% | 50% | 66.7% |
|
||||||||||||||
| 1 |
package abbot.util;
|
|
| 2 |
|
|
| 3 |
import junit.framework.*;
|
|
| 4 |
import junit.extensions.abbot.*;
|
|
| 5 |
|
|
| 6 |
public class RegexpTest extends TestCase { |
|
| 7 |
|
|
| 8 | 1 |
public void testMultiLineMatch() { |
| 9 | 1 |
assertTrue("Multi-line match failed, LF",
|
| 10 |
Regexp.stringMatch("(?m)Bangalore.*India",
|
|
| 11 |
"Bangalore\nIndia"));
|
|
| 12 | 1 |
assertTrue("Multi-line match failed, CRLF",
|
| 13 |
Regexp.stringMatch("(?m)Bangalore.*India",
|
|
| 14 |
"Bangalore\r\nIndia"));
|
|
| 15 | 1 |
assertFalse("Shouldn't multi-line match w/o trigger, LF",
|
| 16 |
Regexp.stringMatch("^Bangalore.*India",
|
|
| 17 |
"Bangalore\nIndia"));
|
|
| 18 |
} |
|
| 19 |
|
|
| 20 | 0 |
public static void main(String[] args) { |
| 21 | 0 |
TestHelper.runTests(args, RegexpTest.class);
|
| 22 |
} |
|
| 23 |
} |
|
| 24 |
|
|
||||||||||