X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F22-is.t;fp=t%2F22-is.t;h=2059fca2dc8baa86f4a432334276e846966bf1e5;hb=6c548b9b29eaa5e43616cb1c9422d0fd6b85121c;hp=0000000000000000000000000000000000000000;hpb=e63601e117e265834dc41b4001bcacfa73d270df;p=perl%2Fmodules%2FTest-Leaner.git diff --git a/t/22-is.t b/t/22-is.t new file mode 100644 index 0000000..2059fca --- /dev/null +++ b/t/22-is.t @@ -0,0 +1,21 @@ +#!perl -T + +use strict; +use warnings; + +use Test::Leaner; + +plan tests => 8; + +is undef, undef, 'undef is undef'; +isnt 0, undef, 'zero is not undef'; +isnt undef, 0, 'undef is not zero'; +is 0, 0, 'zero is zero'; +is 1, 1, 'one is one'; +isnt '1.0', 1, '1.0 is not one string-wise'; + +my @fruits = ('pear', 'apple'); +my @veggies = ('lettuce', 'spinach'); +is @fruits, @veggies, 'is() forces scalar context'; +my @more_fruits = (@fruits, 'banana'); +isnt @fruits, @more_fruits, 'isnt() forces scalar context';