File: array_write.t

package info (click to toggle)
liblexical-var-perl 0.010-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 464 kB
  • sloc: perl: 76; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use warnings;
use strict;

use Test::More tests => 4;

BEGIN { $SIG{__WARN__} = sub { die "WARNING: $_[0]" }; }

use Lexical::Var '@foo' => [];
is_deeply \@foo, [];
push @foo, qw(x y);
is_deeply \@foo, [qw(x y)];
push @foo, qw(a b);
is_deeply \@foo, [qw(x y a b)];
$foo[2] = "A";
is_deeply \@foo, [qw(x y A b)];

1;