From d97be87bf87c6c50bc565c2d09beca164802271c Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 21 Apr 2020 15:38:57 +0200 Subject: Add test for LIMIT with offset, add test descriptions --- test/it_dbi.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/it_dbi.t') 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"]); -- cgit v1.2.3