]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blob - t/22-is.t
Fall back to Test::More when PERL_TEST_LEANER_USES_TEST_MORE is set
[perl/modules/Test-Leaner.git] / t / 22-is.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 BEGIN { delete $ENV{PERL_TEST_LEANER_USES_TEST_MORE} }
7
8 use Test::Leaner;
9
10 plan tests => 8;
11
12 is   undef, undef, 'undef is undef';
13 isnt 0,     undef, 'zero is not undef';
14 isnt undef, 0,     'undef is not zero';
15 is   0,     0,     'zero is zero';
16 is   1,     1,     'one is one';
17 isnt '1.0', 1,     '1.0 is not one string-wise';
18
19 my @fruits  = ('pear', 'apple');
20 my @veggies = ('lettuce', 'spinach');
21 is @fruits, @veggies, 'is() forces scalar context';
22 my @more_fruits = (@fruits, 'banana');
23 isnt @fruits, @more_fruits, 'isnt() forces scalar context';