blob: 21b3e28145814f409cfcde40f0990d4c37e7e3c5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Devel::CompleteStatement 'complete_statement';
is(complete_statement('if ($x) { $y }'), 1);
is(complete_statement('if ($x) { $y'), '');
is(complete_statement('if ($x) { $y '), '');
is(complete_statement('if ($x) { $y } }'), undef);
is(complete_statement('if ($x) { BEGIN { die } }'), undef);
is(complete_statement('if ($x) { BEGIN { die }'), undef);
done_testing;
|