File: filter.t

package info (click to toggle)
liblist-maker-perl 0.005-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 188 kB
  • ctags: 11
  • sloc: perl: 225; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
use Test::More 'no_plan';

use List::Maker;

sub odd { shift() % 2 }

is_deeply [<1..10 : odd X>],     [1,3,5,7,9]    => '<1..10 : odd X>';
is_deeply [<1..10x3 : odd N>],   [1,7]          => '<1..10x3 : odd N>';
is_deeply [<1,5..10 : odd I>],   [1,5,9]        => '<1,5..10 : odd I>';
is_deeply [<1,5..10 : odd \$_>], [1,5,9]        => '<1,5..10 : odd \\$_>';
is_deeply [<1..20 : /7/>],       [7,17]         => '<1..20 : /7/>';