Skip to content
🦋 Perl 6 test suite
Branch: master
Clone or download
Latest commit 159b849 May 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
3rdparty Update Emoji and Grapheme Break Tests to version Unicode version 11.0 Oct 1, 2018
APPENDICES Removed all .REVIEW modificators from v6.d Apr 18, 2019
MISC Removed all .REVIEW modificators from v6.d Apr 18, 2019
S01-perl-5-integration Add tests for R#2556 Dec 31, 2018
S02-lexical-conventions Pod has been improved, more tests pass Oct 3, 2018
S02-lists Move all module code to segregated namespace under packages/ Nov 7, 2018
S02-literals [js] Fudge q:x, qq:x in the browser Dec 22, 2018
S02-magicals Remove Compiler::build-date Apr 26, 2019
S02-names-vars Test error for `my $a; { say $a; my ($a) }` Jan 2, 2019
S02-names Add tests for `dynamic-scope` pragma Jan 18, 2019
S02-one-pass-parsing Move all module code to segregated namespace under packages/ Nov 7, 2018
S02-packages prefer RT #ticket Nov 1, 2015
S02-types Add tests for R#2788 Apr 23, 2019
S03-binding [v6.d REVIEW] Localize class definitions Oct 15, 2018
S03-buf Add bound checks for read-(u)bits/write-(u)bits Dec 21, 2018
S03-feeds remove niecza implementation fudges Feb 16, 2017
S03-junctions Move all module code to segregated namespace under packages/ Nov 7, 2018
S03-metaops Test distributing hyper with itemized RHS Feb 7, 2019
S03-operators Changes to conform with fix of use of Real type object in operators Mar 23, 2019
S03-sequence Test … op does not prematurely cause consumtion of Seqs Apr 18, 2018
S03-smartmatch Add missing plans to subtests Oct 30, 2018
S04-blocks-and-statements [v6.d REVIEW] Use better test for Code.file Jul 15, 2018
S04-declarations Removed all .REVIEW modificators from v6.d Apr 18, 2019
S04-exception-handlers Basic tests for custom control exceptions Jan 12, 2019
S04-exceptions [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S04-phasers Add test for decont in ENTER phaser Apr 26, 2019
S04-statement-modifiers Test $_ behavior in block with if/unless mods Jan 15, 2019
S04-statement-parsing s/lives_ok/lives-ok/g May 20, 2015
S04-statements Use a &is_run instead of a raw &run Mar 14, 2019
S05-capture [JVM] Skip a couple of dying tests Mar 31, 2019
S05-grammar [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S05-interpolation Move all module code to segregated namespace under packages/ Nov 7, 2018
S05-mass [js] Copy rakudo.moar fudge as we keep it's behavior for now Sep 27, 2018
S05-match Move all module code to segregated namespace under packages/ Nov 7, 2018
S05-metachars Test to cover RT #130812. Feb 22, 2017
S05-metasyntax Update test for refined Regex.Bool semantics Jan 28, 2019
S05-modifier Update 6.d roast to 6.d-enabled compiler Oct 27, 2018
S05-nonstrings Remove any Pugs fudges Jul 11, 2014
S05-substitution Move all module code to segregated namespace under packages/ Nov 7, 2018
S05-syntactic-categories Expect Exception, not X::AdHoc. Nov 12, 2015
S05-transliteration Move all module code to segregated namespace under packages/ Nov 7, 2018
S06-advanced Fix overeager test for R#2448 / R#2449 Oct 31, 2018
S06-currying Move all module code to segregated namespace under packages/ Nov 7, 2018
S06-macros [js] Fudge test that's broken on moar too Oct 9, 2018
S06-multi Test for GH #2772 Mar 22, 2019
S06-operator-overloading Move all module code to segregated namespace under packages/ Nov 7, 2018
S06-other Unfudge now passing test for R#2797 Mar 26, 2019
S06-parameters [v6.d REVIEW] Compactify test code Dec 25, 2017
S06-routine-modifiers Unfudge now-passing Proxy tests Jul 9, 2018
S06-signature Make error check a bit less precise Dec 9, 2018
S06-traits Move all module code to segregated namespace under packages/ Nov 7, 2018
S07-hyperrace [v6.d REVIEW] De-roast hyper perf test Oct 14, 2018
S07-iterators [v6.d REVIEW] Remove pull test in skip-at-least Jul 28, 2018
S07-slip Test itemized Slips roundtrip .perl.EVAL Dec 14, 2016
S09-autovivification Remove old comment Sep 11, 2017
S09-hashes Adding test to dynamic shaped array and dynamic object hash Nov 27, 2018
S09-multidim Appendicize `my @A[;]` Oct 28, 2018
S09-subscript Test actual sliced data structures… Aug 6, 2018
S09-typed-arrays test repeated STORE Seq on native arrays Nov 18, 2018
S10-packages [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S11-compunit Don't lock into X::AdHoc for exception tests Oct 19, 2018
S11-modules [JVM] Fudge a couple of failing tests Mar 31, 2019
S11-repository Use cmd.exe compatible hash lookup Jan 21, 2019
S12-attributes [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S12-class Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-coercion Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-construction Test initialization with multiple inheritance Apr 26, 2019
S12-enums Don't write to OUT in tests Feb 8, 2019
S12-introspection [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S12-meta Cover Metamodel::Primitives.rebless Apr 18, 2019
S12-methods Removed references to rakudo issues from test names Feb 6, 2019
S12-subset Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-traits Replace remaining eval-dies-ok with throws-like Oct 1, 2015
S13-overloading Add test for R#2718 Feb 24, 2019
S13-syntax
S13-type-casting remove niecza implementation fudges Feb 16, 2017
S14-roles Test adding a method to a role using multiple names. May 4, 2019
S14-traits Revert "Fudge RT #129375 for rakudo.jvm" Sep 28, 2016
S15-literals [JVM] Unfudge some passing tests Apr 5, 2019
S15-nfg Update mass-roundtrip-*.t for Unicode 11.0 Oct 1, 2018
S15-normalization Update Uni Normalization to v11.0. Make Uni test doc uniform and clear Oct 28, 2018
S15-string-types Fix skip reason for nfd/nfc adverb tests Jul 16, 2017
S15-unicode-information Make unival tests less picky about how they die Jan 5, 2019
S16-filehandles Move all module code to segregated namespace under packages/ Nov 7, 2018
S16-io Tweak test command to work on windows and non-windows Nov 14, 2018
S16-unfiled Allow tests to be run outside of rakudo dir Feb 23, 2018
S17-channel [JVM] Skip a couple of dying tests Mar 31, 2019
S17-lowlevel
S17-procasync [JVM] Unfudge a few tests Apr 12, 2019
S17-promise Fix strange (but working) syntax for assignments Apr 3, 2019
S17-scheduler Adapt tests because of 2a635cd Dec 6, 2015
S17-supply [JVM] Fudge some more failing tests Apr 1, 2019
S19-command-line-options Workaround is_run issue on windows trying to pass an empty string Nov 14, 2018
S19-command-line Refix test to pass on non-windows Nov 14, 2018
S22-package-format Rename pm 2 pm6 (#465) Aug 30, 2018
S24-testing Move all module code to segregated namespace under packages/ Nov 7, 2018
S26-documentation add tests for GH issue #2793 (#525) Mar 27, 2019
S28-named-variables Fix typo Nov 5, 2017
S29-any Add tests for minpairs/maxpairs on spare arrays Dec 9, 2018
S29-context Test that EVALFILE get the filename somewhere in the stacktrace Mar 7, 2019
S29-conversions Use better ticket for fudge message Mar 19, 2017
S29-os Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-array Add missing plans to subtests Oct 30, 2018
S32-basics Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-container [js] Fudge a test that fail for a weird not fully understand reason Apr 4, 2019
S32-encoding [JVM] Skip a couple of dying tests Mar 31, 2019
S32-exceptions [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S32-hash Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-io [JVM] Unfudge now passing test Apr 16, 2019
S32-list [js] Add a whole bunch of rakudo.js.browser fudges Mar 14, 2019
S32-num [JVM] Skip some disruptive tests Mar 29, 2019
S32-scalar Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-str Add variable precision tests for "%x|X" Apr 19, 2019
S32-temporal Additional test for R#2707 Feb 19, 2019
S32-trig remove niecza implementation fudges Feb 16, 2017
docs List VERSION File in Release Guide Dec 21, 2018
integration Removed all .REVIEW modificators from v6.d Apr 18, 2019
packages [js] Fake running a new rakudo instance when running in the browser Apr 4, 2019
rosettacode Fix Windows line ending workarounds. Nov 3, 2015
t Move all module code to segregated namespace under packages/ Nov 7, 2018
tools Print URLs to commits we're launching in browser Oct 14, 2018
.gitignore ignore .precomp folders Dec 11, 2015
CONTRIBUTING.md Use implementation-neutral language Apr 8, 2018
LICENSE Add Artistic License 2 Nov 5, 2013
README.md Move all module code to segregated namespace under packages/ Nov 7, 2018
TODO Add a note about RTs. Jul 20, 2014
VERSION “nom” → “master” Oct 26, 2017
fudge Teach fudger new Test::Util routines Sep 15, 2018
fudgeall Fix globbing on windows Nov 18, 2017
fudgeandrun [v6.d REVIEW] Warn if we don't find local binary Sep 16, 2018
super-fudger.p6 Add super-fudger.p6, to fudge ALL failing tests in a .t file Dec 24, 2016
test_summary avoid unnecessary differences in output Mar 4, 2015

README.md

The Official Perl 6 Test Suite

The purpose of the test suite is to validate implementations that wish to be known as a conforming Perl 6 implementation.

Contents

Introduction

Please consider this test suite to be the bleeding edge of Perl 6 development. New tests, tests for proposed new features, etc., will live on this 'master' branch. Once a specification is cut, a branch will be created for that version of the spec, e.g., 6.c for Christmas language release. If errata becomes available, it will be kept in -errata branch for that specific language version, e.g. 6.c-errata for 6.c.

As they develop, different implementations will certainly be in different states of readiness with respect to the test suite, so in order for the various implementations to track their progress independently, we've established a mechanism for fudging the tests in a kind of failsoft fashion. To pass a test officially, an implementation must be able to run a test file unmodified, but an implementation may (temporarily) skip tests or mark them as "todo" via the fudging mechanism, which is implemented via the fudge preprocessor. Individual implementations are not allowed to modify the actual test code, but may insert line comments before each actual test (or block of tests) that changes how those tests are to be treated for this platform. The fudge preprocessor pays attention only to the comments that belong to the current implementation and ignores all the rest. If your implementation is named "rakudo" then your special comment lines look like:

#?rakudo: [NUM] VERB ARGS

(The colon is optional.)

The optional NUM says how many statements or blocks to apply the verb to. (If not supplied, a value of 1 is assumed). A statement is arbitrarily defined as one or more lines starting with a test call and ending in a semicolon (with an optional comment).

VERBs include:

skip "reason"	# skip test entirely
eval "reason"	# eval the test because it doesn't parse yet
try "reason"	# try the test because it throws exception
todo "reason"	# mark "todo" because "not ok" is expected
emit code		# insert code (such as "skip-rest();") inline

All fudged tests return an exit code of 1 by default, so the test harness will mark it as "dubious" even if all the tests supposedly pass.

You may also negate the test:

#!rakudo [NUM] VERB ARGS

This will apply the verb on any system that isn't rakudo.

Sometimes environment variables distinguish syntactic or semantic variants, so you may apply a verb depending on the presence or absence of such a setting:

#?MYSPECIALVAR [NUM] VERB ARGS
#!MYSPECIALVAR [NUM] VERB ARGS

The environment variable must be uppercase.

There is also the following directive which modifies the test count of the next construct:

#?DOES count

The count may be an expression as long as any variables referenced in the expression are in scope at the location fudge eventually inserts a "skip()" call.

When applied to a subsequent sub definition, fudge registers the sub name as doing that many tests when called. Note, however, that any skipping is done at the point of the call, not within the subroutine, so the count may not refer to any parameter of the sub.

When you run the fudge preprocessor, if it decides the test needs fudging, it returns the new fudged filename; otherwise it returns the original filename. (Generally you don't run fudge directly, but your test harness runs the fudgeall program for you; see below.) If there is already a fudged program in the directory that is newer than the unfudged version, fudge just returns the fudged version without regenerating it. If the fudged version is older, it removes it and then decides anew whether to regenerate it based on the internal fudge comments.

The fudgeall program may be called to process all the needed fudging for a particular implementation:

$ fudgeall rakudo */*.t */*/*.t

Program fudgeall will use the fudge program to translate any fudged files to a new file where the extension is not *.t but instead is *.rakudo to indicate the implementation dependency. It also returns the fudged list of filenames to run, where unfudged tests are just passed through unchanged as *.t. Each test comes through as either fudged or not, but never both. The test harness then runs the selected test files as it normally would (it shouldn't care whether they are named *.t or *.rakudo).

In cases where the current working directory makes a difference, the tests assume that the working directory is the root of the test suite, so that the relative path to itself is t/spec/S\d\d-$section/$filename.

To fudge and run prove on a specific file:

./fudgeandrun S05-metasyntax/angle-brackets.t

fudgeandrun does not assume any particular implementation but guesses by running perl6 to look at special variables like $*PERL. See fudgeandrun usage to specify a different implementation and other options.

Test Utilities

This repository contains Test::Util module with helper routines you can use when writing tests. See POD documentation included at the end of the module's source code. To include the module, in your test file, you need to add use lib line to your test file.

use lib $?FILE.IO.parent(2).add: 'packages/Test-Helpers';
use Test::Util;
use Test;

Depending on the location of your test file, the number inside .parent(2) may need to be adjusted to go up the correct number of times from the test files's location to the root of the repository.

Appendices

The APPENDICES directory contains advisory tests implentations may optionally choose to follow. See the README included in that directory for more information.

APPENDICES are not included in released versions of the specification.

Environmental Variables

  • ROAST_TIMING_SCALE

Some tests rely on a process to complete in a certain amount of time. If you're running on a slowish computer, try setting ROAST_TIMING_SCALE to a larger value that will be used as a multiplier for the time to wait. We don't wait for too long a time by default so as to make the roast run faster. Defaults to 1.

Contributing

See CONTRIBUTING.md

You can’t perform that action at this time.