From fc1c55b1830fbbb13f99db0490df4f46e15dcd31 Mon Sep 17 00:00:00 2001 From: hfuecks Date: Mon, 7 Nov 2005 00:38:00 +0100 Subject: get_tests_running_1 darcs-hash:20051106233800-e96b6-90328f1b6cc5c8b25c6e02f113cf80475789d297.gz --- _test/cases/inc/parser/lexer.test.php | 122 +++++++++++++++++----------------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to '_test/cases/inc/parser/lexer.test.php') diff --git a/_test/cases/inc/parser/lexer.test.php b/_test/cases/inc/parser/lexer.test.php index 818009f92..75fa32ee0 100644 --- a/_test/cases/inc/parser/lexer.test.php +++ b/_test/cases/inc/parser/lexer.test.php @@ -355,7 +355,7 @@ class TestParserByteIndex { function ignore() {} - function catch() {} + function caught() {} } Mock::generate('TestParserByteIndex'); @@ -371,41 +371,41 @@ class TestOfLexerByteIndices extends UnitTestCase { $handler = &new MockTestParserByteIndex($this); $handler->setReturnValue("ignore", true); - $handler->setReturnValue("catch", true); + $handler->setReturnValue("caught", true); $handler->expectArgumentsAt( 0, - "catch", + "caught", array("", DOKU_LEXER_ENTER, strpos($doc,'')) ); $handler->expectArgumentsAt( 1, - "catch", + "caught", array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) ); $handler->expectArgumentsAt( 2, - "catch", + "caught", array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) ); $handler->expectArgumentsAt( 3, - "catch", + "caught", array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) ); $handler->expectArgumentsAt( 4, - "catch", + "caught", array("", DOKU_LEXER_EXIT, strpos($doc,'')) ); - $handler->expectCallCount("catch", 5); + $handler->expectCallCount("caught", 5); $lexer = &new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern("", "ignore", "catch"); - $lexer->addExitPattern("", "catch"); - $lexer->addSpecialPattern('b','catch','special'); - $lexer->mapHandler('special','catch'); - $lexer->addPattern('c','catch'); + $lexer->addEntryPattern("", "ignore", "caught"); + $lexer->addExitPattern("", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); $this->assertTrue($lexer->parse($doc)); $handler->tally(); @@ -416,41 +416,41 @@ class TestOfLexerByteIndices extends UnitTestCase { $handler = &new MockTestParserByteIndex($this); $handler->setReturnValue("ignore", true); - $handler->setReturnValue("catch", true); + $handler->setReturnValue("caught", true); $handler->expectArgumentsAt( 0, - "catch", + "caught", array("", DOKU_LEXER_ENTER, strpos($doc,'')) ); $handler->expectArgumentsAt( 1, - "catch", + "caught", array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) ); $handler->expectArgumentsAt( 2, - "catch", + "caught", array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) ); $handler->expectArgumentsAt( 3, - "catch", + "caught", array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) ); $handler->expectArgumentsAt( 4, - "catch", + "caught", array("", DOKU_LEXER_EXIT, strpos($doc,'')) ); - $handler->expectCallCount("catch", 5); + $handler->expectCallCount("caught", 5); $lexer = &new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('(?=.*\x3C/file\x3E)', "ignore", "catch"); - $lexer->addExitPattern("", "catch"); - $lexer->addSpecialPattern('b','catch','special'); - $lexer->mapHandler('special','catch'); - $lexer->addPattern('c','catch'); + $lexer->addEntryPattern('(?=.*\x3C/file\x3E)', "ignore", "caught"); + $lexer->addExitPattern("", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); $this->assertTrue($lexer->parse($doc)); $handler->tally(); @@ -461,41 +461,41 @@ class TestOfLexerByteIndices extends UnitTestCase { $handler = &new MockTestParserByteIndex($this); $handler->setReturnValue("ignore", true); - $handler->setReturnValue("catch", true); + $handler->setReturnValue("caught", true); $handler->expectArgumentsAt( 0, - "catch", + "caught", array("", DOKU_LEXER_ENTER, strpos($doc,'')) ); $handler->expectArgumentsAt( 1, - "catch", + "caught", array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) ); $handler->expectArgumentsAt( 2, - "catch", + "caught", array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) ); $handler->expectArgumentsAt( 3, - "catch", + "caught", array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) ); $handler->expectArgumentsAt( 4, - "catch", + "caught", array("", DOKU_LEXER_EXIT, strpos($doc,'')) ); - $handler->expectCallCount("catch", 5); + $handler->expectCallCount("caught", 5); $lexer = &new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('(?!foo)', "ignore", "catch"); - $lexer->addExitPattern("", "catch"); - $lexer->addSpecialPattern('b','catch','special'); - $lexer->mapHandler('special','catch'); - $lexer->addPattern('c','catch'); + $lexer->addEntryPattern('(?!foo)', "ignore", "caught"); + $lexer->addExitPattern("", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); $this->assertTrue($lexer->parse($doc)); $handler->tally(); @@ -506,41 +506,41 @@ class TestOfLexerByteIndices extends UnitTestCase { $handler = &new MockTestParserByteIndex($this); $handler->setReturnValue("ignore", true); - $handler->setReturnValue("catch", true); + $handler->setReturnValue("caught", true); $handler->expectArgumentsAt( 0, - "catch", + "caught", array("", DOKU_LEXER_ENTER, strpos($doc,'')) ); $handler->expectArgumentsAt( 1, - "catch", + "caught", array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) ); $handler->expectArgumentsAt( 2, - "catch", + "caught", array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) ); $handler->expectArgumentsAt( 3, - "catch", + "caught", array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) ); $handler->expectArgumentsAt( 4, - "catch", + "caught", array("", DOKU_LEXER_EXIT, strpos($doc,'')) ); - $handler->expectCallCount("catch", 5); + $handler->expectCallCount("caught", 5); $lexer = &new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('', "ignore", "catch"); - $lexer->addExitPattern("(?<=d)", "catch"); - $lexer->addSpecialPattern('b','catch','special'); - $lexer->mapHandler('special','catch'); - $lexer->addPattern('c','catch'); + $lexer->addEntryPattern('', "ignore", "caught"); + $lexer->addExitPattern("(?<=d)", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); $this->assertTrue($lexer->parse($doc)); $handler->tally(); @@ -551,41 +551,41 @@ class TestOfLexerByteIndices extends UnitTestCase { $handler = &new MockTestParserByteIndex($this); $handler->setReturnValue("ignore", true); - $handler->setReturnValue("catch", true); + $handler->setReturnValue("caught", true); $handler->expectArgumentsAt( 0, - "catch", + "caught", array("", DOKU_LEXER_ENTER, strpos($doc,'')) ); $handler->expectArgumentsAt( 1, - "catch", + "caught", array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) ); $handler->expectArgumentsAt( 2, - "catch", + "caught", array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) ); $handler->expectArgumentsAt( 3, - "catch", + "caught", array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) ); $handler->expectArgumentsAt( 4, - "catch", + "caught", array("", DOKU_LEXER_EXIT, strpos($doc,'')) ); - $handler->expectCallCount("catch", 5); + $handler->expectCallCount("caught", 5); $lexer = &new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('', "ignore", "catch"); - $lexer->addExitPattern("(?", "catch"); - $lexer->addSpecialPattern('b','catch','special'); - $lexer->mapHandler('special','catch'); - $lexer->addPattern('c','catch'); + $lexer->addEntryPattern('', "ignore", "caught"); + $lexer->addExitPattern("(?", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); $this->assertTrue($lexer->parse($doc)); $handler->tally(); -- cgit v1.2.3