eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
-plan tests => 21;
+plan tests => 22;
# The tag Blue is assigned to cds 1 2 3 and 5
# The tag Cheesy is assigned to cds 2 4 and 5
$rs = $schema->resultset('Tag')->search({ tag => 'Blue' }, { '+select' => { max => 'tagid' }, distinct => 1 });
is($rs->count, 4, 'Count with +select aggreggate');
+$rs = $schema->resultset('Tag')->search({}, { select => 'length(me.tag)', distinct => 1 });
+is($rs->count, 3, 'Count by distinct function result as select literal');
+
my @warnings;
{
local $SIG{__WARN__} = sub { push @warnings, shift };