]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - t/21-list.t
Add support and tests for the get{pw,gr,host,net,proto,serv}* functions. Move ops...
[perl/modules/Sub-Nary.git] / t / 21-list.t
index 62c9bc0764ade9c79b63b091df112d399ffdeb00..6de15c23d91bab35ceca6fd55a78f0e44fee5c1c 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 41;
+use Test::More tests => 36;
 
 use Sub::Nary;
 
@@ -60,19 +60,12 @@ my @tests = (
  [ sub { eval { 1, do { eval { @a }, 2 } } }, 'list' ],
 
  [ sub { eval '1, 2' }, 'list' ],
-
- [ sub { <$x> }, 'list' ],
-
- [ sub { -f $0, -r $0 }, 2 ],
-
- [ sub { caller 0 },  sub { my @a = caller 0; scalar @a }->() ],
- [ sub { localtime }, do { my @a = localtime; scalar @a } ],
- [ sub { gmtime },    do { my @a = gmtime; scalar @a } ],
 );
 
 my $i = 1;
 for (@tests) {
  my $r = $sn->nary($_->[0]);
- is_deeply($r, { $_->[1] => 1 }, 'list test ' . $i);
+ my $exp = ref $_->[1] ? $_->[1] : { $_->[1] => 1 };
+ is_deeply($r, $exp, 'list test ' . $i);
  ++$i;
 }