File: 50isolated.t

package info (click to toggle)
libshell-perl-perl 0.0026-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 168 kB
  • ctags: 56
  • sloc: perl: 458; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#perl -T

use Test::More 'no_plan';

BEGIN { use_ok('Shell::Perl'); }

my $sh = Shell::Perl->new;


$_ = ' $_ = 1000 ';
my $val = $sh->eval($_);
is($val, 1000);

$_ = ' $_ ';

my $val2 = $sh->eval($_);
TODO: {
    local $TODO = 'needs separating the REPL and the interpreter states';
    is($val2, 1000);
}

# this test script touches at a very sensitive
# issue in the implementation of a REPL -
# the state of the loop must be kept separate
# from the state of the running interpreter.
# By state, we mean those global variables like
# $_ and everything else.