Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added more $*VM, $*PERL related deprecation tests
  • Loading branch information
lizmat committed May 19, 2014
1 parent 228e9b3 commit 2316a2f
Showing 1 changed file with 137 additions and 1 deletion.
138 changes: 137 additions & 1 deletion S02-types/deprecations.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 31;
plan 39;

# currently deprecated core features

Expand Down Expand Up @@ -471,4 +471,140 @@ Please use \$*DISTRO.version instead.
TEXT
} #1
# $*VM<name>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*VM<name>;
say $*VM<name>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*VM<name>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*VM<name> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*VM.name instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*VM<config>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*VM<config>;
say $*VM<config>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*VM<config>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*VM<config> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*VM.config instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<name>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<name>;
say $*PERL<name>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<name>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<name> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.name instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<compiler><name>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<compiler><name>;
say $*PERL<compiler><name>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<compiler><name>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<compiler><name> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.compiler.name instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<compiler><ver>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<compiler><ver>;
say $*PERL<compiler><ver>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<compiler><ver>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<compiler><ver> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.compiler.version instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<compiler><release-number>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<compiler><release-number>;
say $*PERL<compiler><release-number>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<compiler><release-number>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<compiler><release-number> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.compiler.release instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<compiler><build-date>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<compiler><build-date>;
say $*PERL<compiler><build-date>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<compiler><build-date>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<compiler><build-date> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.compiler.build-date instead.
--------------------------------------------------------------------------------
TEXT
} #1
# $*PERL<compiler><codename>
#?niecza skip 'is DEPRECATED NYI'
#?pugs skip 'is DEPRECATED NYI'
#?rakudo.jvm skip 'tracebacks in deprecations'
{
$line = $?LINE; say $*PERL<compiler><codename>;
say $*PERL<compiler><codename>;
is Deprecation.report, qq:to/TEXT/.chop.subst(/\r/, '', :g), 'deprecation $*PERL<compiler><codename>';
Saw 1 call to deprecated code during execution.
================================================================================
\$*PERL<compiler><codename> called at:
$*PROGRAM_NAME, lines $line,{$line + 1}
Please use \$*PERL.compiler.codename instead.
--------------------------------------------------------------------------------
TEXT
} #1
# vim:set ft=perl6

0 comments on commit 2316a2f

Please sign in to comment.