Raku Cases › Everything else

Everything else

MAIN and its usage message, Pod, Test, and what fits nowhere above.

91 rules from 50 tests. 43 of those tests are confirmed on both engines: Raku++ and Rakudo 2026.11 both pass, or Raku++ gives Rakudo's answer on every probe of a family. The verdict is the test's, not each rule's. How to read a case.

found-on-the-wayRaku++ matches Rakudo on 21 of 34 probes2026-11-28 · 04a1722e
  1. 1

    A mixed set of constructs met during an audit (a hyper »~~» with a Callable, .encode and .decode with unknown encodings, return or next with nothing to leave, a comma in regex source, MixHash.grab, a Range divided by zero, an adverb on a Version literal) answers as Rakudo does. inferred

6e-gatingRaku++ passesRakudo cannot run it2026-08-19 · 387d2c88
  1. 1

    The 6.e additions exist only for code that asked for 6.e; under 6.d the routine, type or syntax is absent.

  2. 4

    The .snitch method exists only from 6.e.

    (1,2).snitch is "No such method" under 6.d

More from this test: Dates & times (2), Exceptions & control flow (1), Hashes & sets (3), I/O & processes (2), Lists & laziness (8), Numerics (1), Classes, roles & the MOP (2), Operators (1), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Strings & Unicode (6), divergences (1).

audited-language-gaps-4Raku++ passesRakudo passes2026-10-05 · f3b1fe01
  1. 3

    last / next inside the block of lives-ok / dies-ok escape to an enclosing loop and record no test.

  2. 4

    An unmet test plan says "# You planned N tests, but ran M".

More from this test: Compile-time errors (1), Hashes & sets (1), Classes, roles & the MOP (1).

batch1-silent-wrong-answersRaku++ passesRakudo passes2026-08-27 · 0d989883
  1. 1

    sleep-till is not a routine; the routine is sleep-until.

    sleep-till is an undeclared routine

  2. 4

    Rakudo::Internals::JSON.to-json escapes hash keys as JSON strings, so a quote in a key still yields valid JSON.

More from this test: I/O & processes (3), Lists & laziness (2), Numerics (1), Scoping & phasers (1).

cmp-ok-smartmatch-matcherRaku++ passesRakudo passes2026-09-02 · 9b79cce0
  1. 1

    cmp-ok $got, '~~', $matcher applies the full smartmatch: a block matcher is called with the value, a regex is matched, a junction of matchers is threaded, and '!~~' is the negation.

    cmp-ok $out, '~~', { .contains: "FOO" & "bar" } passes when both words are in $out

declarator-doc-after-bodyRaku++ passesRakudo passes2026-11-09 · 983b9524
  1. 1

    A #= comment after the closing brace of a routine's or package's body, on the brace's line or alone on the lines below it before the next code, is trailing documentation of that declaration.

    ~&f.WHY of #| a / sub f { / } / #= b is "a\nb"

  2. 2

    A routine's run of trailing #= lines after its body continues past blank lines and plain comments, while a package's stops at the first line without a doc.

  3. 4

    .leading and .trailing of a declarator block are Nil when that part is missing.

  4. 5

    A bracketed declarator doc folds its lines into one, each line trimmed and blank lines dropped.

More from this test: Stringification (1).

dist-suite-quartetRaku++ passesRakudo passes2026-08-05 · 4e2c20cd
  1. 16

    Test's cmp-ok applies the given operator to non-numeric operands as they are, so Version objects compare with cmp.

More from this test: Dates & times (1), Exceptions & control flow (1), I/O & processes (1), Classes, roles & the MOP (4), Operators (1), Regexes & grammars (2), Scoping & phasers (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (3), Types & coercion (2).

doc-renders-without-runningRaku++ passesRakudo passes2026-11-08 · 07dc2ee9
  1. 1

    --doc renders the program's Pod and runs nothing past INIT: no mainline, MAIN or END.

More from this test: Scoping & phasers (1).

dynamic-var-caller-chainRaku++ passesRakudo does not pass2026-08-25 · 6879a71b
  1. 4

    Raku.legacy is True on the type object, and $*RAKU.legacy on the instance dies. inferred

    Raku.legacy === True

More from this test: Modules (1), Scoping & phasers (3).

fails-like-returned-failureRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    fails-like accepts a Failure that the called routine returns and checks named matchers such as :payload(…) against its exception.

    fails-like { shorten("foobarbaz", 2) }, X::AdHoc, :payload("Target length 2 is too short") passes

  2. 2

    A fail written directly in the bare block given to fails-like counts as a throw, and the test fails with expected code to fail but it threw.

fails-like-subtestRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    Test's fails-like prints a subtest: code returned a Failure, then a nested Failure threw when sunk holding code dies, right exception type (T) and one .KEY matches VALUE per matcher.

  2. 2

    fails-like given code that throws reports expected code to fail but it threw T instead.

  3. 3

    A Bool matcher given to fails-like or throws-like is X::Match::Bool.

grand-review-c2-methodsRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 16

    Test's like refuses a Str as its matcher. inferred

    like "abc", "b" is not ok

More from this test: Hashes & sets (1), I/O & processes (6), Lists & laziness (1), Numerics (4), Strings & Unicode (3).

handle-flush-and-main-usageRaku++ passesRakudo passes2026-08-03 · d3bdea56
  1. 2

    &MAIN's generated usage lists the options before the positionals.

  2. 3

    &MAIN's generated usage uses the routine's #| declarator doc as the candidate's description.

  3. 4

    &MAIN's generated usage prints a Str default value quoted.

  4. 5

    &MAIN's generated usage prints a one-character option as -x, not --x.

  5. 6

    A #| above a multi MAIN with a one-line signature documents the routine and is not the help text of its parameters.

    #| Another way. on multi MAIN('go', Int $n) is not the help for <n>

More from this test: I/O & processes (1).

http-useragent-clusterRaku++ passesRakudo passes2026-08-05 · 271e54e8
  1. 1

    Test's is with a Junction as the got argument autothreads and collapses per the junction's kind.

    is any(@names), 'a' passes when one name is a

More from this test: Classes, roles & the MOP (1), Regexes & grammars (3), Signatures & dispatch (1), Syntax & parsing (2).

internals-json-to-json-honours-adverbsRaku++ passesRakudo passes2026-10-14 · 0fcc2b49
  1. 1

    Rakudo::Internals::JSON.to-json writes compact unless :pretty, and honours :spacing, :level and :sorted-keys.

is-deeply-strict-and-anton-batchRaku++ passesRakudo passes2026-08-28 · 2421c094
  1. 2

    Test's is-deeply compares with eqv and is type-strict, but caches a Seq operand first.

    is-deeply (1,2).Seq, (1,2) passes; is-deeply "11", 11 fails

More from this test: Hashes & sets (1), I/O & processes (3), Lists & laziness (1), Classes, roles & the MOP (3), Operators (3), Regexes & grammars (2), Signatures & dispatch (1), Syntax & parsing (2).

kernel-memory-cpuRaku++ passesRakudo passes2026-11-25 · e3b16b7e · #279
  1. 1

    $*KERNEL.total-memory, .free-memory and .cpu-usage answer Ints: bytes of physical memory, bytes of free memory, and the process's user plus system CPU time in microseconds.

lizmat-nqp-opsRaku++ passesRakudo passes2026-09-13 · 3a8f2148
  1. 1

    The nqp bignum _I family and its neighbours exist: div_i, div_I, mul_I, sub_I, mod_I, the six is*_I comparisons, cmp_I, neg_I, abs_I, pow_I, gcd_I, lcm_I, the bitwise _I forms, isbig_I, tostr_I, fromstr_I, box_i, box_n, sqrt_n, isfalse, pop, print, say, time, readlink, repeat_while and repeat_until.

More from this test: Lists & laziness (1), Numerics (1), Operators (1), Types & coercion (1).

main-args-conventionsRaku++ passesRakudo passes2026-08-07 · ec48cbf6
  1. 1

    Before the first positional, --foo abc pairs into :foo<abc> only when the MAIN candidate declares :$foo with the Str type; untyped and Int/Num named parameters do not pair.

    --n 42 fails dispatch for a numeric :$n

  2. 2

    A space-separated MAIN option value is consumed unconditionally, and short and single-dash spellings pair the same way.

    --foo --verbose makes foo equal --verbose; -f val pairs too

  3. 3

    MAIN options end at the first positional: after one, --foo=x is the literal string --foo=x.

  4. 4

    A bare -- is consumed and ends MAIN options, also directly after the first positional, but one token later it stays a literal --.

    pos -- x gives pos, x; pos y -- x gives pos, y, "--", x

  5. 5

    --help after a positional is a literal argument to MAIN: the failed dispatch prints usage on stderr and exits 2.

  6. 6

    -v, -n=3, -foo=bar, :v and :n=3 are named arguments to MAIN: the whole rest of the token is the name and = splits off the value.

    -foo=bar binds :foo<bar>

  7. 7

    --/k, -/k and :/k on the command line negate the MAIN option k.

  8. 8

    An empty MAIN option value is the allomorph val(""), an IntStr of 0 and "", so --n= binds an Int named parameter with 0.

    --n= binds Int :$n to 0

main-usage-17Raku++ passesRakudo passes2026-08-07 · 6c5033d1 · #17
  1. 1

    In MAIN usage a parameter's trailing #= doc belongs to the parameter, so with no #| on the sub the usage line carries no -- … suffix.

  2. 2

    is required on a named MAIN parameter prints without the optionality brackets in the usage, as the ! marker does.

  3. 3

    A #= on the line where a MAIN signature closes, after the ), documents the routine: it becomes the usage suffix and makes no option entry.

  4. 4

    An explicit --help prints the MAIN usage to STDOUT and exits 0, while a failed dispatch, a bare -h included, prints it to STDERR and exits 2.

needle-compile-clusterRaku++ passesRakudo passes2026-09-12 · cb851ea9
  1. 6

    nqp::istype of a type object against its own type is true, and a plain hash's .keyof is a Str type while an object hash's is not. inferred

    ?nqp::istype(Str, Str) is True; ?nqp::istype(Str, Int) is False

More from this test: Exceptions & control flow (1), Classes, roles & the MOP (1), Signatures & dispatch (2), Stringification (2).

nqp-exception-ops-and-whereRaku++ passesRakudo passes2026-10-31 · aa309270 · #77
  1. 2

    nqp::where is available to compare two objects by identity. inferred

More from this test: Exceptions & control flow (1).

nqp-key-and-null-opsRaku++ passesRakudo passes2026-08-15 · 70d204b4
  1. 1

    nqp::atkey reads back a key stored with nqp::bindkey in an nqp::hash.

  2. 2

    nqp::unbox_s and its siblings unbox a value, and nqp::isnull tests for the null those ops can return.

  3. 3

    The nqp::const::STAT_* names such as STAT_PLATFORM_INODE resolve to MoarVM's stat selector numbers.

nqp-p6definiteRaku++ passesRakudo passes2026-09-16 · 706fe3aa
  1. 1

    nqp::p6definite asks whether its argument is a concrete object rather than a type object, like nqp::isconcrete, and answers a Raku Bool.

    gather while nqp::p6definite(my $line = self.get) { ... } loops until get answers a type object

nqp-statRaku++ passesRakudo passes2026-08-26 · b9f5fba5
  1. 1

    nqp::stat($path, nqp::const::STAT_…) returns the requested stat field, such as inode, device, uid, gid, nlinks, blocks or blocksize.

nqp-string-compare-opsRaku++ passesRakudo passes2026-09-15 · 6b733a6f
  1. 1

    nqp::cmp_s answers -1, 0 or 1 and the nqp::is*_s string comparisons answer 0 or 1; nqp::cmp_i and nqp::cmp_n exist alongside them.

nqp-time-nRaku++ passesRakudo passes2026-11-14 · a397987e
  1. 1

    nqp::time_n answers the seconds since the epoch as a Num.

pod-block-gist-is-rakudosRaku++ passesRakudo passes2026-10-31 · 5d4de331
  1. 2

    A Pod table with a header row carries :header-row(0) in its config.

More from this test: Stringification (2).

pod-block-str-and-rakuRaku++ passesRakudo passes2026-11-08 · 7279b2ad
  1. 3

    V<…> in Pod is its text, run into the text around it, not a formatting code object.

More from this test: Stringification (2).

pod-blocks-and-textRaku++ passesRakudo passes2026-09-16 · a4289568
  1. 1

    The Pod::* classes can be constructed directly, as in Pod::Block::Para.new(...).

  2. 2

    A Pod block is a Pod::Block and not a Map or Associative, so Array.new($block) keeps it whole and it binds a Pod::Block parameter.

  3. 3

    =begin table parses into a Pod table that has rows.

  4. 4

    A constructed Pod::FormattingCode has a meta, as a parsed one does, so the two can be is-deeply equal.

More from this test: Modules (1).

pod-finish-not-a-blockRaku++ passesRakudo passes2026-11-09 · 57cc8291
  1. 1

    The text after =finish is available as $=finish and adds no block to $=pod.

    a program with one pod block and a =finish section has one block in $=pod

pod-para-block-is-namedRaku++ passesRakudo passes2026-11-08 · a3f00087
  1. 1

    =for para and =begin para are a Pod::Block::Named called "para" holding the Pod::Block::Para, with the config on the Named block, as the abbreviated =para is.

    its .gist shows Pod::Block::Named{:name("para")}

  2. 2

    --doc=Text renders a para block as its paragraphs, not under its name.

pod-verbatim-marginRaku++ passesRakudo does not pass2026-09-16 · a4289568
  1. 1

    A Pod block's margin is the indent of its own =begin delimiter, and text indented past that margin is a Pod::Block::Code.

    an example indented under a =begin pod at column 0 is a code block

  2. 2

    A verbatim Pod run spans internal blank lines while it stays at or right of where it started; a line indented less than the run's first line ends it and opens a new one.

process-scope-and-sigilless-whileRaku++ passesRakudo passes2026-08-04 · e89a2d46
  1. 3

    Rakudo::Internals.REGISTER-DYNAMIC registers an initializer for a process-wide dynamic variable and leaves an existing binding alone.

    after PROCESS::<$RX-PRESET> = 'mine', registering an initializer for $*RX-PRESET keeps mine

More from this test: Scoping & phasers (1), Syntax & parsing (1), divergences (1).

rakudo-t-language-gaps-1Raku++ passesRakudo passes2026-10-05 · 892e6c61
  1. 4

    A Label knows its name, file and line.

More from this test: Compile-time errors (1), Containers & assignment (1), Lists & laziness (1), Classes, roles & the MOP (2), Operators (1), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Stringification (2), Strings & Unicode (1), Syntax & parsing (1).

rakudo-t-language-gaps-5Raku++ passesRakudo passes2026-10-05 · 98ddcee4
  1. 7

    cmp-ok finds an operator the caller declared, and an unknown operator is a failed test.

  2. 8

    skip with its arguments backwards, skip 2, 'reason', dies.

More from this test: Compile-time errors (1), Concurrency (1), Classes, roles & the MOP (1), Signatures & dispatch (2), Stringification (1).

repl-echo-ruleRaku++ passesRakudo cannot run it2026-09-04 · 507d8edb · #66
  1. 2

    The REPL echoes a statement's value unless the statement wrote at least one byte to standard output; output to standard error or an empty print "" does not suppress the echo.

    say 42 shows 42 only; print "" still echoes True

More from this test: Exceptions & control flow (1).

roast-3log-batch2Raku++ passesRakudo passes2026-09-28 · bda6f720
  1. 9

    A test that fails inside a regex code block is reported at its own source line, not at "line 1". inferred

More from this test: Exceptions & control flow (1), Modules (1), Numerics (1), Classes, roles & the MOP (6), Regexes & grammars (5), Scoping & phasers (1), Syntax & parsing (1).

roast-sweep-runtimeRaku++ passesRakudo cannot run it2026-09-28 · 2cc896bd
  1. 27

    A call to a routine marked is DEPRECATED<x> is reported when the program ends, naming x as the replacement. inferred

More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (2), Exceptions & control flow (2), Hashes & sets (4), I/O & processes (3), Lists & laziness (5), Modules (2), Classes, roles & the MOP (8), Operators (4), Regexes & grammars (1), Scoping & phasers (14), Stringification (1), Strings & Unicode (1), Types & coercion (3).

scalars-nil-junction-complex-dateRaku++ passesRakudo passes2026-07-27 · ebbe10f3
  1. 11

    isa-ok uses the same default description whether the object is exactly of the type or inherits from it. inferred

More from this test: Concurrency (1), Containers & assignment (1), Dates & times (1), Numerics (3), Classes, roles & the MOP (1), Operators (1), Stringification (1), Syntax & parsing (1), Types & coercion (1).

sigilless-param-arity-at-run-timeRaku++ passesRakudo passes2026-10-15 · 5549bf83
  1. 2

    to-json(:pretty) called with no value dies with a run-time arity error instead of writing null.

More from this test: Signatures & dispatch (1).

subtest-tap-formatRaku++ passesRakudo passes2026-08-28 · 82d03385
  1. 1

    subtest prints a # Subtest: <name> banner line before the nested test output.

  2. 2

    A subtest whose body declares no plan ends its nested output with an indented plan line 1..N.

test-exit-statusRaku++ passesRakudo passes2026-10-20 · 07456d29
  1. 1

    An explicit exit anywhere in a Test file (mainline, a sub, MAIN, LEAVE, END, CATCH) keeps its own exit status.

    an explicit exit 0 after a failed test exits 0

  2. 2

    A Test file with failed tests exits with the number of failures, capped at 254, checked before the plan and overriding a die's status.

    plan 3; ok 0; ok 0 exits 2; three failures and a die exit 3

  3. 3

    A Test file with no failed tests whose run count misses the declared plan exits 255, also when a die ended it.

    plan 2; ok 1; die exits 255

  4. 4

    A Test file that dies with no failed test and no missed plan keeps the die's exit status 1.

  5. 5

    In Test's exit status, TODO failures do not count and a failed subtest counts once.

  6. 6

    Test prints its "# You planned …" summary also when the file ends with a die.

  7. 7

    An ok after a done-testing with no declared plan is not counted as a plan mismatch in the exit status. inferred

test-failure-line-is-the-callersRaku++ passesRakudo passes2026-09-02 · fd3af378
  1. 1

    Test's failure diagnostic # Failed test '…' at FILE line N names the file and line of the assertion call, even when evaluating its arguments ran routines in other files.

top100-four-roots-2026-09-02Raku++ passesRakudo cannot run it2026-09-02 · 3f24e005
  1. 3

    Pod formatting codes parse to Pod::FormattingCode nodes with a .type letter and nested .contents, with plain text between them as Str, and L<text|url> puts the URL in .meta.

    L<Raku|https://raku.org> has contents Raku and meta https://raku.org

More from this test: Lists & laziness (1), Modules (1), Native types & NativeCall (1), Operators (1).

type-object-needle-and-signature-blobRaku++ passesRakudo passes2026-09-17 · 2e994990
  1. 2

    $*VM.signature and $*DISTRO.signature are Blobs.

More from this test: Strings & Unicode (1).

usage-lists-every-aliasRaku++ passesRakudo passes2026-11-06 · b245ef4e
  1. 1

    $*USAGE lists an option under every name it answers to.

    :f(:$file) is -f|--file=<Str> and :v(:verbose(:$loud)) is -v|--verbose|--loud

  2. 2

    $*USAGE lists a required option before the optional ones.

  3. 3

    With %*SUB-MAIN-OPTS<named-anywhere> set, $*USAGE puts the positionals before the options; without it the options lead the line.

  4. 4

    An untyped renamed MAIN option (:w(:$wide), :q($quiet)) keeps its #= description, in the usage message's option list and in .WHY.

use-trace-pragmaRaku++ passesRakudo passes2026-11-13 · 3a3fc21e · rakudo#5546
  1. 1

    use trace announces each statement on $*ERR before it runs, with its line number, until no trace or the end of the block.

vm-config-hashRaku++ passesRakudo passes2026-08-24 · 6095c4fa
  1. 1

    $*VM.config is a Hash of build configuration, so $*VM.config<obj> is a hash lookup.

vm-name-overrideRaku++ passesRakudo passes2026-09-15 · c79d96f3
  1. 2

    $*VM.name is one of $*RAKU.VMnames.

    $*VM.name eq any($*RAKU.VMnames) is true