use Evo '-Lib *', '-Want *';
use Test::More;

my @empty = context_result(undef);
is scalar @empty, 0;
my $empty = context_result(undef);
is $empty, undef;

# void
ok !defined context_result([WANT_VOID]);
my @arr = context_result([WANT_VOID]);
is scalar @arr, 0;


# scalar
is context_result([WANT_SCALAR, 'foo']), 'foo';
@arr = context_result([WANT_SCALAR, undef]);
is_deeply \@arr, [undef];

# list
is_deeply [context_result([WANT_LIST, ['foo']])], ['foo'] for 1 .. 2;
is_deeply [context_result([WANT_LIST, ['foo', 'bar']])], ['foo', 'bar'];

done_testing;
