### ----------------------------------------------------
### -- List::MoreUtils
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/one.rakutest
### ----------------------------------------------------
use Test;
use List::MoreUtils <one>;

plan 6;

my @list = 1 .. 300;
is one( * == 1, @list), True, 'Only one 1';
is one( * == 150, @list), True, 'Only one 150';
is one( * == 300, @list), True, 'Only one 300';
is one( * == 0, @list), False, '0 did not occur once';
is one( * > 1, @list), False, 'greater than 1 occurred more than once';
is one( { False }, []), False, 'empty list returns False always';

# vim: expandtab shiftwidth=4


