Permalink
Browse files

* fix Bug #10912: gxh8Q recognized as invalid

prepare release


git-svn-id: http://svn.php.net/repository/pear/packages/Games_Chess/trunk@237890 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent bed7dc5 commit 8bc15cc8db9dd94786848f67d7272ef61f848cbd Greg Beaver committed Jun 17, 2007
View
@@ -924,7 +924,7 @@ function _parseMove($move)
return array(GAMES_CHESS_CASTLE => 'Q');
}
// pawn moves
- if (preg_match('/^P?(([a-h])([1-8])?(x))?([a-h][1-8])(=([QRNB]))?$/', $move, $match)) {
+ if (preg_match('/^P?(([a-h])([1-8])?(x))?([a-h][1-8])(=?([QRNB]))?$/', $move, $match)) {
if ($match[2]) {
$takesfrom = $match[2]{0};
} else {
View
@@ -28,14 +28,14 @@
'changelogoldtonew' => false,
'baseinstalldir' => 'Games',
'simpleoutput' => true));
-$packagexml->setNotes('No changes since RC1, add unit test for repetition draw');
+$packagexml->setNotes('* fix Bug #10912: gxh8Q recognized as invalid');
$packagexml->addIgnore(array('package.php','*.tgz','package.xml'));
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->clearDeps();
$packagexml->setChannel('pear.php.net');
$packagexml->setLicense('PHP License 3.01', 'http://www.php.net/license/3_01.txt');
-$packagexml->setReleaseVersion('1.0.0');
+$packagexml->setReleaseVersion('1.0.1');
$packagexml->setAPIVersion('1.0.0');
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.5.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+<package packagerversion="1.6.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Games_Chess</name>
<channel>pear.php.net</channel>
<summary>Construct and validate a logical chess game, does not display</summary>
@@ -14,18 +14,18 @@ and/or creating PGN files using the File_ChessPGN package (when it is completed)
<email>cellog@php.net</email>
<active>yes</active>
</lead>
- <date>2007-01-28</date>
- <time>12:29:25</time>
+ <date>2007-06-17</date>
+ <time>00:45:21</time>
<version>
- <release>1.0.0</release>
+ <release>1.0.1</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license/3_01.txt">PHP License 3.01</license>
- <notes>No changes since RC1, add unit test for repetition draw</notes>
+ <notes>* fix Bug #10912: gxh8Q recognized as invalid</notes>
<contents>
<dir baseinstalldir="Games" name="/">
<dir name="Chess">
@@ -706,6 +706,19 @@ and/or creating PGN files using the File_ChessPGN package (when it is completed)
</dependencies>
<phprelease />
<changelog>
+ <release>
+ <version>
+ <release>1.0.1</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2007-06-17</date>
+ <license uri="http://www.php.net/license/3_01.txt">PHP License 3.01</license>
+ <notes>* fix Bug #10912: gxh8Q recognized as invalid</notes>
+ </release>
<release>
<version>
<release>1.0.0</release>
@@ -715,9 +728,9 @@ and/or creating PGN files using the File_ChessPGN package (when it is completed)
<release>stable</release>
<api>stable</api>
</stability>
- <date>2007-01-28</date>
+ <date>2007-06-17</date>
<license uri="http://www.php.net/license/3_01.txt">PHP License 3.01</license>
- <notes>No changes since RC1, add unit test for repetition draw</notes>
+ <notes>* fix Bug #10912: gxh8Q recognized as invalid</notes>
</release>
<release>
<version>
@@ -5,6 +5,15 @@ Games_Chess->_parseMove() valid pawn capture => promotion
<?php
require_once dirname(__FILE__) . '/setup.php.inc';
$ret = $board->_parseMove('axb8=R');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => 'a',
+ 'takes' => 'x',
+ 'disambiguate' => '',
+ 'square' => 'b8',
+ 'promote' => 'R',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('axb8R');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => 'a',
'takes' => 'x',
@@ -14,6 +23,15 @@ $phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'piece' => 'P',
)), $ret, 'incorrect parsing');
$ret = $board->_parseMove('Paxb8=R');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => 'a',
+ 'takes' => 'x',
+ 'disambiguate' => '',
+ 'square' => 'b8',
+ 'promote' => 'R',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('Paxb8R');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => 'a',
'takes' => 'x',
@@ -5,6 +5,15 @@ Games_Chess->_parseMove() valid pawn promotion
<?php
require_once dirname(__FILE__) . '/setup.php.inc';
$ret = $board->_parseMove('a1=Q');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => '',
+ 'takes' => '',
+ 'disambiguate' => '',
+ 'square' => 'a1',
+ 'promote' => 'Q',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('a1Q');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => '',
'takes' => '',
@@ -14,6 +23,15 @@ $phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'piece' => 'P',
)), $ret, 'incorrect parsing');
$ret = $board->_parseMove('h8=Q');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => '',
+ 'takes' => '',
+ 'disambiguate' => '',
+ 'square' => 'h8',
+ 'promote' => 'Q',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('h8Q');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => '',
'takes' => '',
@@ -23,6 +41,15 @@ $phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'piece' => 'P',
)), $ret, 'incorrect parsing');
$ret = $board->_parseMove('Pa1=Q');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => '',
+ 'takes' => '',
+ 'disambiguate' => '',
+ 'square' => 'a1',
+ 'promote' => 'Q',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('Pa1Q');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => '',
'takes' => '',
@@ -32,6 +59,15 @@ $phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'piece' => 'P',
)), $ret, 'incorrect parsing');
$ret = $board->_parseMove('Ph8=Q');
+$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
+ 'takesfrom' => '',
+ 'takes' => '',
+ 'disambiguate' => '',
+ 'square' => 'h8',
+ 'promote' => 'Q',
+ 'piece' => 'P',
+ )), $ret, 'incorrect parsing');
+$ret = $board->_parseMove('Ph8Q');
$phpunit->assertEquals(array(GAMES_CHESS_PAWNMOVE => array(
'takesfrom' => '',
'takes' => '',

0 comments on commit 8bc15cc

Please sign in to comment.