summaryrefslogtreecommitdiff
path: root/Examples/test-suite/perl5/grouping_runme.pl
blob: 2009cce737df1eb18090ef59d00adaf23aa16e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 6;
BEGIN { use_ok('grouping') }
require_ok('grouping');

# adapted from ../python/grouping_runme.py

is(grouping::test1(42), 42);

isnt(eval { grouping::test2(42) }, undef);

is(grouping::do_unary(37, $grouping::NEGATE), -37);

$grouping::test3 = 42;
is($grouping::test3, 42);