Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test for bug #1

  • Loading branch information...
commit f3b528ee23e36d92a98b7989c5a62216a8ea1da4 1 parent eaded9a
Nuzhdin Urii authored
Showing with 14 additions and 1 deletion.
  1. +12 −0 tests/ReadSocketTest.php
  2. +2 −1  tests/import.sql
12 tests/ReadSocketTest.php
View
@@ -77,4 +77,16 @@ function testSelectMovedRange()
$this->assertEquals(array(array(3),array(2)),$response);
}
+ /**
+ * @bug 1
+ */
+ function testSelectWithZeroValue()
+ {
+ $c = new \HandlerSocket\ReadSocket();
+ $c->connect();
+ $id = $c->getIndexId($this->db,'read1','','float');
+ $c->select($id,'=',array(100));
+ $response = $c->readResponse();
+ $this->assertEquals(array(array(0)),$response);
+ }
}
3  tests/import.sql
View
@@ -48,7 +48,8 @@ INSERT INTO `read1` (`key`, `date`, `float`, `varchar`, `text`, `set`, `union`,
(1, '0000-00-00', 1, '', '', '', '', NULL),
(2, '0000-00-00', 2, '', '', '', '', NULL),
(3, '0000-00-00', 3, '', '', '', '', NULL),
-(4, '0000-00-00', 4, '', '', '', '', NULL);
+(4, '0000-00-00', 4, '', '', '', '', NULL),
+(100, '0000-00-00', 0, '', '', '', '', NULL);
-- --------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.