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

plan 3;

ok &onlyval =:= &only_value, 'is onlyval the same as only_value';

is onlyval( { $_ == 5 }, (4 .. 9) ), 5, "right only result";
is onlyval( { $_ > 5 }, (4 .. 9) ), Nil, "no right only result";

# vim: expandtab shiftwidth=4


