diff options
author | Christian Schneider | 2020-04-21 15:38:57 +0200 |
---|---|---|
committer | Christian Schneider | 2020-04-21 15:38:57 +0200 |
commit | d97be87bf87c6c50bc565c2d09beca164802271c (patch) | |
tree | 92d116aa92b59abb29571adc3573370b628050a7 | |
parent | d92fe0ee371ef220e3407a52af7a4229d57204be (diff) | |
download | itools-d97be87bf87c6c50bc565c2d09beca164802271c.tar.gz itools-d97be87bf87c6c50bc565c2d09beca164802271c.tar.bz2 itools-d97be87bf87c6c50bc565c2d09beca164802271c.zip |
Add test for LIMIT with offset, add test descriptions
-rwxr-xr-x | test/it_dbi.t | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t index dbcc6bb..a5d9f92 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -350,8 +350,11 @@ $r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r- # Check LIMIT $count = $r->select(['ID >' => 0, 'ORDER BY ID DESC', 'LIMIT' => 1]); -is($count, 1); -is($r->ID, 6); +is($count, 1, "Simple LIMIT: count"); +is($r->ID, 6, "Simple LIMIT: id"); +$count = $r->select(['ID >' => 0, 'ORDER BY ID DESC', 'LIMIT' => "1, 2"]); +is($count, 2, "LIMIT with offset: count"); +is($r->ID, 5, "LIMIT with offset: id"); # Check if iterator clears dynfields left over from previous record $r->delete(["WHERE 1"]); |