+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
use strict;
use warnings;
use Test::More;
+use List::Util 'min';
-use lib qw(t/lib);
-use DBIC::SqlMakerTest;
-use DBICTest;
+use DBICTest ':DiffSQL';
use DBIx::Class::SQLMaker::LimitDialects;
my ($ROWS, $OFFSET) = (
LEFT JOIN "track" "tracks"
ON "tracks"."cd" = "cds_unordered"."cdid"
WHERE "me"."rank" = ?
- GROUP BY "cds_unordered"."cdid", "cds_unordered"."artist", "cds_unordered"."title", "cds_unordered"."year", "cds_unordered"."genreid", "cds_unordered"."single_track"
+ GROUP BY "cds_unordered"."cdid", "cds_unordered"."artist", "cds_unordered"."title", "cds_unordered"."year", "cds_unordered"."genreid", "cds_unordered"."single_track", "me"."name"
ORDER BY MAX("genre"."name") DESC,
MAX( tracks.title ) DESC,
- MIN("me"."name"),
+ "me"."name" ASC,
"year" DESC,
"cds_unordered"."title" DESC
LIMIT ?
is_deeply(
$rs->all_hri,
- [ @{$hri_contents}[$offset .. List::Util::min( $used_limit+$offset-1, $#$hri_contents)] ],
+ [ @{$hri_contents}[$offset .. min( $used_limit+$offset-1, $#$hri_contents)] ],
"Correct slice of the resultset returned with limit '$limit', offset '$offset'",
);
}