Fixed problem with parser and castle with numeric values 0-0 instead of the correct O-O

This commit is contained in:
Alf Magne Kalleland
2013-02-12 01:25:18 +01:00
parent b437127f6b
commit f00ceee0bb
3 changed files with 77 additions and 1 deletions

View File

@@ -1788,6 +1788,20 @@ class ParserTest extends PHPUnit_Framework_TestCase
// then
$this->assertEquals((36*2)+1, count($game['moves']));
}
/**
* @test
*/
public function shouldParseProblematicGame2(){
// given
$pgnParser = new PgnParser("pgn/problematic.pgn");
// when
$game = $pgnParser->getGameByIndex(1);
// then
$this->assertEquals(52, count($game['moves']));
}
private function getSpasskyFischerGameWith3FoldReptition(){
$parser = $this->getParser();