org.apache.regexp
public class RETest extends Object
Version: $Id: RETest.java 518156 2007-03-14 14:31:26Z vgritsenko $
Field Summary | |
---|---|
REDebugCompiler | compiler |
int | failures |
static String | NEW_LINE |
static boolean | showSuccesses |
int | testCount |
Constructor Summary | |
---|---|
RETest()
Constructor |
Method Summary | |
---|---|
void | assertEquals(String message, String expected, String actual) |
void | assertEquals(String message, int expected, int actual) |
void | die(String s)
Exit with a fatal error. |
void | fail(StringBuffer log, String s)
Fail with an error. |
void | fail(String s)
Fail with an error. |
String | findNextTest(BufferedReader br)
Finds next test description in a given script. |
boolean | getExpectedResult(String yesno)
Converts yesno string to boolean. |
RETestCase | getNextTestCase(BufferedReader br)
Creates testcase for the next test description in the script file. |
static void | main(String[] args)
Main program entrypoint. |
void | runAutomatedTests(String testDocument)
Run automated tests in RETest.txt file (from Perl 4.0 test battery) |
void | runInteractiveTests(String expr)
Compile and test matching against a single expression |
void | say(String s)
Say something to standard out |
void | showParens(RE r)
Dump parenthesized subexpressions found by a regular expression matcher object |
static boolean | test(String[] args)
Testing entrypoint. |
void | testOther()
Run automated unit test |
void | testPrecompiledRE() |
void | testSplitAndGrep() |
void | testSubst() |
Parameters: s Last famous words before exiting
Parameters: log Output before failure s Failure description
Parameters: s Failure description
Parameters: br BufferedReader
for a script file
Returns: strign tag for next test description
Throws: IOException if some io problems occured
Parameters: yesno string representation of expected result
Returns: true if yesno is "YES", false if yesno is "NO" stops program otherwise.
Parameters: br BufferedReader
for script file.
Returns: a new tescase or null.
Throws: IOException if some io problems occured
Parameters: args Command line arguments (optional regular expression)
Throws: Exception thrown in case of error
Parameters: expr Expression to compile and test
Parameters: s What to say
Parameters: r Matcher object with results to show
Parameters: args Command line arguments
Throws: Exception thrown in case of error
Throws: Exception thrown in case of error