X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100_expr_basic.t;fp=t%2F100_expr_basic.t;h=9e1b014b1779ba8178012e82a659e0b76589c81b;hb=ec376489c337a428477e4b26c554e5f28586bfd4;hp=0bcdaa4e6cf1ac91d8933c8ff105367785db1775;hpb=e76b9ff712b99ede4137380e6e2c401bd15229b9;p=dbsrgits%2FSQL-Abstract-2.0-ish.git diff --git a/t/100_expr_basic.t b/t/100_expr_basic.t index 0bcdaa4..9e1b014 100644 --- a/t/100_expr_basic.t +++ b/t/100_expr_basic.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 16; use Test::Differences; use_ok('SQL::Abstract') or BAIL_OUT( "$@" ); @@ -190,3 +190,27 @@ is $sqla->dispatch( } ), "me.id LIKE ?", "LIKE expr clause"; + + +is $sqla->dispatch( + { -type => 'expr', + op => '==', + args => [ + {-type => name => args => [qw/me id/] }, + { -type => 'value', value => undef } + ] + } +), "me.id IS NULL", + "== undef"; + + +is $sqla->dispatch( + { -type => 'expr', + op => '!=', + args => [ + {-type => name => args => [qw/me id/] }, + { -type => 'value', value => undef } + ] + } +), "me.id IS NOT NULL", + "!= undef";