File: bug_gh9.t

package info (click to toggle)
libtest-script-perl 1.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: perl: 426; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (4)
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
use Test2::V0 -no_srand => 1;
use Test::Script;

subtest 'non-distructive' => sub {

  my @foo = qw( foo bar baz );

  my $bar = Test::Script::_script \@foo;

  is(
    $bar,
    [qw( foo bar baz )],
    'comes out the right'
  ),

  my $command = shift @$bar;

  is(
    \@foo,
    [qw( foo bar baz )],
    '@foo is unchanged',
  );

};

done_testing;