File: goto_is_available.t

package info (click to toggle)
libtest-mockfile-perl 0.037-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: perl: 4,110; makefile: 7
file content (45 lines) | stat: -rw-r--r-- 1,274 bytes parent folder | download | duplicates (2)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/perl

use strict;
use warnings;

use Test2::Bundle::Extended;
use Test2::Tools::Explain;
use Test2::Plugin::NoWarnings;

use Test::MockFile qw< nostrict >;

Internals::SvREADONLY( $], 0 );

$] = '5.006002';
is( Test::MockFile::_goto_is_available(), 0, "goto isn't available on $]" );

$] = '5.008008';
is( Test::MockFile::_goto_is_available(), 0, "goto isn't available on $]" );

$] = '5.016000';
is( Test::MockFile::_goto_is_available(), 1, "goto was first available on $]" );

$] = '5.018000';
is( Test::MockFile::_goto_is_available(), 1, "goto was available on $]" );

$] = '5.020000';
is( Test::MockFile::_goto_is_available(), 1, "goto was available on $]" );

$] = '5.022001';
is( Test::MockFile::_goto_is_available(), 0, "goto was broken on $] (7bdb4ff0943cf93297712faf504cdd425426e57f)" );

$] = '5.024000';
is( Test::MockFile::_goto_is_available(), 0, "goto was broken on $] (7bdb4ff0943cf93297712faf504cdd425426e57f)" );

$] = '5.026000';
is( Test::MockFile::_goto_is_available(), 0, "goto was broken on $] (7bdb4ff0943cf93297712faf504cdd425426e57f)" );

$] = '5.028000';
is( Test::MockFile::_goto_is_available(), 1, "goto works again for $]" );

$] = '5.030000';
is( Test::MockFile::_goto_is_available(), 1, "goto works on $]" );

done_testing();
exit;