🦋 Perl 6 test suite
timo test repeated STORE Seq on native arrays
an unfiled bug in rakudo caused those to result
in just all values being concatenated.
Latest commit 1725e7e Nov 18, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
MISC Move all module code to segregated namespace under packages/ Nov 7, 2018
S01-perl-5-integration Move all module code to segregated namespace under packages/ Nov 7, 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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S02-magicals Move all module code to segregated namespace under packages/ Nov 7, 2018
S02-names-vars [v6.d REVIEW] Test we actually got right colonpair Oct 14, 2018
S02-names Move $CALLER::_ to SAP Oct 29, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S03-binding [v6.d REVIEW] Localize class definitions Oct 15, 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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S03-operators Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S04-exception-handlers Move all module code to segregated namespace under packages/ Nov 7, 2018
S04-exceptions Move all module code to segregated namespace under packages/ Nov 7, 2018
S04-phasers Move all module code to segregated namespace under packages/ Nov 7, 2018
S04-statement-modifiers Tests for RT #131593. Jun 19, 2017
S04-statement-parsing s/lives_ok/lives-ok/g May 20, 2015
S04-statements Move all module code to segregated namespace under packages/ Nov 7, 2018
S05-capture Move all module code to segregated namespace under packages/ Nov 7, 2018
S05-grammar Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
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 SAP role multi dispatch test Oct 31, 2018
S06-operator-overloading Move all module code to segregated namespace under packages/ Nov 7, 2018
S06-other Make proc tests windows friendly by using run instead of is_run Nov 14, 2018
S06-parameters [v6.d REVIEW] Compactify test code Dec 25, 2017
S06-routine-modifiers Unfudge now-passing Proxy tests Jul 9, 2018
S06-signature Move all module code to segregated namespace under packages/ Nov 7, 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 Avoid some warnings about redeclarations May 26, 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 Make precompilation tests more windows shell friendly Nov 13, 2018
S11-compunit Don't lock into X::AdHoc for exception tests Oct 19, 2018
S11-modules Move all module code to segregated namespace under packages/ Nov 7, 2018
S11-repository Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-attributes Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-enums Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-introspection Unfudge now passing tests Oct 8, 2018
S12-meta Move all module code to segregated namespace under packages/ Nov 7, 2018
S12-methods Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S13-syntax s/lives_ok/lives-ok/g May 20, 2015
S13-type-casting remove niecza implementation fudges Feb 16, 2017
S14-roles Move all module code to segregated namespace under packages/ Nov 7, 2018
S14-traits Revert "Fudge RT #129375 for rakudo.jvm" Sep 28, 2016
S15-literals Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Make a stress test a little less stressful. Feb 28, 2017
S17-lowlevel [v6.d REVIEW] Remove trailing whitespace Sep 27, 2018
S17-procasync Move all module code to segregated namespace under packages/ Nov 7, 2018
S17-promise Move all module code to segregated namespace under packages/ Nov 7, 2018
S17-scheduler Adapt tests because of 2a635cd96279ace1c5d3d6d687 Dec 6, 2015
S17-supply Move all module code to segregated namespace under packages/ Nov 7, 2018
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 Move all module code to segregated namespace under packages/ Nov 7, 2018
S28-named-variables Fix typo Nov 5, 2017
S29-any [v6.d REVIEW] Remove .isa(Str:D) proptest fudge Oct 15, 2018
S29-context Move all module code to segregated namespace under packages/ Nov 7, 2018
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 [v6.d REVIEW] Fix Blob.gist propspec expecting lowercase hex Sep 30, 2018
S32-encoding Use shell instead of run when using windows shell scripts Nov 14, 2018
S32-exceptions Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-hash Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-io Only test with run, not shell, to make windows testing easier Nov 14, 2018
S32-list Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-num Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-scalar Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-str Move all module code to segregated namespace under packages/ Nov 7, 2018
S32-temporal Add missing plans to subtests Oct 30, 2018
S32-trig remove niecza implementation fudges Feb 16, 2017
docs Oops, wrong brochure link Nov 5, 2018
integration Remove spaces from is_run args so test passes on windows Nov 14, 2018
packages Only quote arguments when needed Nov 12, 2018
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