Raku Cases › I/O & processes

I/O & processes

Paths, handles, sockets, run, shell and Proc::Async.

223 rules from 127 tests. 112 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.

handle-readsRaku++ matches Rakudo on 14 of 37 probes2026-11-28 · 04a1722e · #262
  1. 1

    A reader takes from a handle only what it returns, so the next reader continues exactly where the last one stopped.

  2. 2

    .tell on a text handle counts bytes.

path-methods-by-kindRaku++ matches Rakudo on 37 of 41 probes2026-11-28 · e2a4dd59
  1. 1

    The methods of IO::Path answer only for an IO::Path; a value of another kind has only the methods its own type has.

    (1..3).add("x"), Date.new(…).parent and v1.2.basename are X::Method::NotFound, while v1.2.parts is the Version's own

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

    From 6.e unlink takes one path and returns a Bool; before 6.e it returns the list of paths.

    unlink("/tmp/no-such-file-abc123").raku is Bool::True under 6.e and ["/tmp/no-such-file-abc123"] under 6.d

  2. 33

    IO::Path.stem exists only from 6.e: it drops all extensions, or the last N.

    under 6.e "foo.tar.gz".IO.stem is foo and "foo.tar.gz".IO.stem(1) is foo.tar

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

absolute-is-idempotentRaku++ passesRakudo passes2026-09-10 · 9888057e
  1. 1

    .absolute is idempotent: applied to an already absolute path it returns the same path.

    $*EXECUTABLE.absolute is a path that can start a process

  2. 2

    On Unix a name like C:foo is an ordinary relative filename, and .absolute resolves it against the current directory.

argfilesRaku++ passesRakudo passes2026-07-31 · f7a60733 · #14
  1. 1

    $*ARGFILES is a handle over the concatenated content of every file in @*ARGS, or over $*IN when there are none.

    $*ARGFILES.lines>>.words.classify(*[1]) reads the files named on the command line

  2. 2

    $*ARGFILES is built on access, so a program that never mentions it reads no files and does not block on stdin.

  3. 3

    .lines on the captured output handle of run(…, :out) yields the child's output lines.

    run(…, :out).out.lines returns the lines the child printed

array-op-args-getc-get-and-friendsRaku++ passesRakudo passes2026-09-17 · 2e994990
  1. 6

    $fh.getc and $fh.get share one read position, so a get after a getc continues after the character already read.

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

async-listen-close-keeps-pendingRaku++ passesRakudo passes2026-10-01 · e70b90ed
  1. 1

    Closing an IO::Socket::Async listen tap still delivers to the tap's callback the connections that were completed before the close.

async-socket-udpRaku++ passesRakudo passes2026-09-28 · bda6f720
  1. 1

    IO::Socket::Async.bind-udp binds at once, so a second bind of a taken port dies, and closing the socket frees the port for an immediate rebind even with a live tap.

  2. 2

    IO::Socket::Async.udp makes a client whose print-to / write-to send one datagram each and keep their Promise with the byte count; write-to takes a Blob only.

  3. 3

    A UDP socket's Supply emits once per datagram, decoded whole: a lone combining mark is its own emit, an empty datagram is "", and :bin gives Buf[uint8].

  4. 4

    On a UDP socket's Supply, :datagram wraps each datagram with its sender and :enc sets the socket's encoding.

  5. 5

    Closing a UDP IO::Socket::Async ends its taps with done, and whenever on its Supply works in a react.

async-socket-unix-pathRaku++ passesRakudo passes2026-11-13 · 9a6eeb85 · #5359 · rakudo#5358
  1. 1

    IO::Socket::Async.listen-path and .connect-path open UNIX-domain sockets.

  2. 2

    For a UNIX-domain IO::Socket::Async, the listening tap names the path, a connection's ends have no port, and connecting to a missing path breaks the Promise.

async-socket-write-queuedRaku++ passesRakudo passes2026-10-30 · c067446c
  1. 1

    IO::Socket::Async's write and print queue their bytes for the event loop and return a Promise at once, which is kept once the bytes are out.

audited-language-gaps-3Raku++ passesRakudo passes2026-10-04 · 74895f1e
  1. 5

    A Complex given as the limit of IO::Path.lines is taken by its value. inferred

More from this test: Hashes & sets (1), Lists & laziness (1), Native types & NativeCall (1), Strings & Unicode (1).

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

    .IO.open on a path that cannot be opened fails as open() does, instead of returning a live handle.

    "/nope".IO.open does not return a usable handle

  2. 8

    slurp($p, :bin) returns the raw bytes as a Blob.

  3. 9

    The .spurt method refuses an existing file under :createonly, as the sub does.

More from this test: Lists & laziness (2), Numerics (1), Everything else (2), Scoping & phasers (1).

battery-proto-new-x-stash-write-positionRaku++ passesRakudo passes2026-10-10 · 0c3540cf
  1. 3

    A handle opened :w writes at its own position, not at the end of the file: after another writer rewrote the file, its next write lands over the new content, not after it.

More from this test: Modules (1), Classes, roles & the MOP (1).

battery-regressions-v5Raku++ passesRakudo passes2026-09-29 · 78d68426
  1. 2

    $*SPEC ~~ IO::Spec is True.

    $*SPEC ~~ IO::Spec is True

More from this test: Hashes & sets (1), Modules (2), Classes, roles & the MOP (1), Operators (1), Regexes & grammars (1), Signatures & dispatch (2).

binary-handle-refuses-text-readsRaku++ passesRakudo passes2026-10-21 · f01c2ef2
  1. 1

    A binary handle (open(:bin), .encoding(Nil) or .encoding("bin")) dies with X::IO::BinaryMode on .get, .lines, .words, .getc, .readchars, .comb and .split.

    .get on a :bin handle dies "Cannot do 'get' on a handle in binary mode"

  2. 2

    On a binary handle .slurp and .read answer bytes, and .encoding("utf8") makes it a text handle again.

  3. 3

    $*IN keeps a binary encoding setting, so lines() and words() die on it too.

  4. 4

    .readchars(-1) on a handle dies.

channel-pipe-clone-issues-144-148Raku++ passesRakudo passes2026-10-11 · c87cceb7 · #148
  1. 3

    .read(N) on a live process pipe returns the bytes that have arrived without waiting for the child to exit.

More from this test: Concurrency (1), Containers & assignment (1).

child-output-liveRaku++ passesRakudo cannot run it2026-08-31 · 9bd8b08a · #51
  1. 1

    A child started by run or shell without :out writes to the parent's own standard output, so its output appears while it runs.

  2. 2

    A Proc::Async .stdout tap receives each chunk as it is read while the process runs, not everything once at the end.

class-begin-and-run-sinkRaku++ passesRakudo passes2026-08-15 · 281a0ff0
  1. 2

    run(…, :out($fh)) sends the child's output to the given handle.

    after run |@cmd, :out($out-fh) the file holds the child's output

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

closed-write-handle-registryRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 2

    What was written to a :w handle the program never closes still reaches its file at exit.

concurrent-outputRaku++ passesRakudo passes2026-08-10 · 862f352f
  1. 2

    printf and .printf write to the current $*OUT, so rebinding $*OUT redirects them.

    my $*OUT = open(…); printf(…) writes to the file

conformance-io-pathRaku++ passesRakudo passes2026-07-26 · a5a99678
  1. 2

    .extension(:parts(…)) with an Int returns exactly that many dot-separated tail segments (empty when the name has fewer), and with a Range the largest count in the range that the name has.

  2. 3

    For .extension a leading dot counts as a separator.

    ".bashrc".IO.extension is bashrc

  3. 4

    IO::Path has .SPEC and .CWD, IO::Spec::Unix has .new and .dir-sep, and an IO::Spec type object gists by its short name. inferred

More from this test: Stringification (1).

conformance-missing-routinesRaku++ passesRakudo passes2026-07-26 · 38c08132
  1. 4

    indir($path, &code) runs the code with the process directory changed and restores it however the code exits, an exception included.

More from this test: Stringification (1), Types & coercion (1), divergences (1).

conformance-phase2-introspectionRaku++ passesRakudo passes2026-07-25 · 5103b4d7
  1. 9

    IO::Path.parts returns an IO::Path::Parts object.

More from this test: Containers & assignment (1), Exceptions & control flow (2), Hashes & sets (1), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (2), Types & coercion (1).

contextualizer-modifiers-and-dirRaku++ passesRakudo does not pass2026-07-24 · c85fe2f8
  1. 2

    dir() yields IO::Path objects, not strings.

More from this test: Syntax & parsing (1).

copy-move-refuse-a-directoryRaku++ passesRakudo does not pass2026-09-07 · fd6eab64 · #71
  1. 1

    copy and move refuse a directory, while rename works on one.

  2. 2

    copy, move and rename report an error as a Failure rather than throwing, so my $ok = copy(…); if $ok {…} works.

cro-install-engine-fixesRaku++ passesRakudo passes2026-10-10 · 29f5aa55
  1. 4

    An Encoding::Decoder decodes in its own encoding; its default line separators take a CRLF whole, and an explicit "\n" separator leaves a CR alone.

More from this test: Concurrency (4), Lists & laziness (1), Classes, roles & the MOP (1), Regexes & grammars (1), Signatures & dispatch (7), Strings & Unicode (1), Syntax & parsing (2).

dash-path-is-standard-streamRaku++ passesRakudo passes2026-10-08 · 452e775a
  1. 1

    The path '-' is the process's standard stream in every spelling: open('-'), open('-'.IO) and '-'.IO.open are $*IN, and with :w, :x or :a (or :mode<wo>) they are $*OUT.

    open('-', :w) is $*OUT, not a file named -

  2. 2

    Opening '-' with :rw, :update, :ra or :rx, or with :r beside a write mode, dies because no standard stream has that mode.

    open('-', :rw) dies Cannot open standard stream in mode 'rw'

  3. 3

    :create, :append, :truncate and :exclusive given alone when opening '-' choose no mode, so the stream stays standard input.

  4. 4

    '-'.IO.lines, .words, .comb, '-'.IO.slurp and slurp('-') read standard input.

  5. 5

    Language version 6.d deprecates open('-') and '-'.IO as names for the standard stream, but not slurp('-'), and the deprecation report names them.

  6. 6

    :bin and :enc given when opening '-' set the standard stream's mode and encoding. inferred

dir-test-without-pathRaku++ passesRakudo passes2026-09-03 · a993a482 · #62
  1. 1

    The path of sub dir is its first positional and defaults to ., so dir(test => /csv$/) lists the current directory filtered by the test.

  2. 2

    dir on a directory that cannot be read is an X::IO::Dir error, not an empty list.

  3. 3

    Sub dir gives the same listing as IO::Path.dir, including the shape of its entries and the handling of a Block as :test. inferred

directory-slurp-and-linesRaku++ passesRakudo passes2026-11-08 · 23822660
  1. 1

    .slurp of a directory dies with X::AdHoc "Tried to open directory <its absolute path>".

  2. 2

    .lines of a directory dies with X::IO::Directory, from the .open it starts with.

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

    open(:nl-in("||")) sets the separator that .lines splits on.

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

distro-macosRaku++ passesRakudo passes2026-09-02 · c710d047
  1. 1

    On macOS $*DISTRO carries what sw_vers reports: .version is the product version as a Version, .release the build, .auth is Apple Inc., and .desc the marketing name.

    $*DISTRO.desc is Tahoe 26 on macOS 26

doc-missing-methodsRaku++ passesRakudo cannot run it2026-07-28 · ccc187ec
  1. 2

    Proc::Async.command is the argument list the object was created with. inferred

    Proc::Async.new('cat', 'some', 'files').command gists (cat some files)

  2. 6

    IO::Path::Parts is Positional as well as Associative: a subscript gives a Pair, in declaration order (volume, dirname, basename). inferred

    IO::Path::Parts.new('C:', '/some/dir', 'foo.txt')[2] gists basename => foo.txt

More from this test: Stringification (2), Types & coercion (2), divergences (1).

dynamic-handle-rebindRaku++ passesRakudo passes2026-08-07 · d7972732
  1. 1

    my $*OUT = $handle reroutes say/print/put to the handle and my $*ERR = $handle reroutes note, until the enclosing block ends.

eco-blockers-2026-09-14Raku++ passesRakudo passes2026-09-14 · 3b6b50af
  1. 1

    IO::Handle.new creates an unopened handle, and its .path is not the handle itself.

  2. 2

    .print-nl writes the handle's output line separator.

More from this test: Exceptions & control flow (1), Operators (2), Signatures & dispatch (1), Stringification (1), Syntax & parsing (2).

ecosweep-1000-batchRaku++ passesRakudo cannot run it2026-09-09 · 91831a84
  1. 1

    run(:merge) and shell(:merge) capture the child's standard output and standard error together in .out.

More from this test: Modules (1).

ecosweep-2026-09Raku++ passesRakudo passes2026-09-05 · ebe0953e
  1. 10

    The enum SeekType and the dynamic variable $*DEFAULT-READ-ELEMS exist.

  2. 11

    The .nl-out of an IO::Handle subclass instance is writable per instance.

More from this test: Modules (3), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (2), Signatures & dispatch (1), Types & coercion (1).

ecosweep-900-batchRaku++ passesRakudo passes2026-09-09 · 063a5a1a
  1. 3

    An IO::Handle's .chomp is assignable ($fh.chomp = False), its nl-in can be set explicitly and defaults to a pair of separators, and .seek moves the read position. inferred

More from this test: Containers & assignment (1), Lists & laziness (4), Numerics (1), Operators (2), Regexes & grammars (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1).

env-delete-reaches-childrenRaku++ passesRakudo passes2026-10-11 · 86cefeee · #157
  1. 1

    %*ENV<X>:delete takes X out of the environment that a child started by run afterwards inherits.

error-messages-rakudo-settledRaku++ passesRakudo passes2026-11-14 · 13902c52 · rakudo#1266
  1. 5

    IO::Socket::Async.listen on a port already in use fails with a message that says so and gives the address. inferred

    "address already in use (address: 127.0.0.1:$port)"

More from this test: Exceptions & control flow (2), Hashes & sets (1), divergences (1).

exe-args-in-a-moduleRaku++ passesRakudo passes2026-11-12 · c31bc9eb · #255
  1. 2

    @*ARGS is an Array, not a List.

file-write-reaches-disk-at-onceRaku++ passesRakudo passes2026-10-02 · 925260b1
  1. 1

    A write to a file handle opened :w reaches the file at once, so another process sees it before .close.

fresh100-parse-cluster-and-hostnameRaku++ passesRakudo passes2026-08-20 · 66345296
  1. 1

    Kernel.hostname, called on the type object, answers the machine's host name.

More from this test: Signatures & dispatch (1), Syntax & parsing (4).

grand-review-c1-interpRaku++ passesRakudo passes2026-09-06 · fa74f74f · #73
  1. 1

    A Proc that is the return value of a routine or of a do block is not sunk there, so a failed run does not throw X::Proc::Unsuccessful until the caller sinks it.

    sub run-it { run |@cmd }; my $p = run-it; $p.exitcode works

    Also held by main-return-value-is-sunk.

More from this test: Containers & assignment (1), Exceptions & control flow (3), Numerics (7), Operators (4), Scoping & phasers (4), Signatures & dispatch (3), Stringification (1), Strings & Unicode (1).

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

    IO::Path.created is the file's birth time, which stays put when the file is appended to, and is not another name for .modified.

  2. 11

    The IO::Path mutators report an error as a Failure, not a quiet False: spurt into a missing directory, rmdir or chmod of a missing path, and spurt(:createonly) on an existing file.

    $f.spurt("b", :createonly) on an existing file fails and leaves the file alone

  3. 12

    A plain Str has no unlink, spurt or mkdir method.

    $f.Str.unlink dies and the file is still there

  4. 13

    open of a missing file returns a Failure rather than throwing.

  5. 14

    $fh.put writes its argument and a newline to that handle.

    after $fh.put("line") the file holds line\n

  6. 15

    $*KERNEL.version is a Version and $*KERNEL.archname names the machine's architecture.

More from this test: Hashes & sets (1), Lists & laziness (1), Numerics (4), Everything else (1), Strings & Unicode (3).

grand-review-c3-procsRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 1

    A child killed by a signal reports .exitcode 0 and .signal as the signal number, is false in boolean context, and throws when sunk.

    a SIGKILLed child has .exitcode 0 and .signal 9

  2. 2

    Proc.pid is the child's real process id.

  3. 3

    With Proc::Async.new(:w, …), .print feeds the child's standard input and its Promise is kept with the byte count; .print or .close-stdin without :w dies.

    Proc::Async.new('cat').print('x') dies

  4. 4

    Proc::Async.kill sends SIGHUP by default, and the awaited Proc reports it in .signal with .exitcode 0.

  5. 5

    IO::Socket::INET.new throws when the connection is refused or the :family is unknown.

    IO::Socket::INET.new(:host<127.0.0.1>, :port(1)) dies

More from this test: Numerics (1).

handle-closed-getc-astral-proc-signalRaku++ passesRakudo passes2026-11-14 · 7f8773e2
  1. 1

    .getc hands out one whole character: an astral character is not split into surrogates and a combining mark stays on its base.

    .getc on U+1F600 does not return its high surrogate 55357

  2. 2

    A closed handle refuses to read or write with X::IO::Closed (.get, .lines, .slurp, .getc, .print).

  3. 3

    A Proc whose child was killed by a signal has exit code 0, that signal in .signal, and is not a success.

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

    IO::Handle.flush writes what has been buffered to the file at once, and later writes and the close append after it.

More from this test: Everything else (5).

handle-getc-readchars-graphemesRaku++ passesRakudo passes2026-10-21 · 5e474d7d
  1. 1

    A handle's .getc and .readchars hand out graphemes, and a CR LF reads as "\n".

    over "q\x[301]xy\r\nz" the reads give "q\x[301]", "xy", "\n", "z"

  2. 2

    $*IN.getc waits for the character after the one it hands out, since it may be a combining mark, and a .get or .lines that follows still sees that next character.

handle-read-get-one-positionRaku++ passesRakudo passes2026-11-15 · 27e35b21
  1. 1

    A file handle has one position, shared by .read and the text readers (.get, .lines, .getc, .readchars, .slurp).

    .get after .read(3) does not answer the first line whole, and .read after .get does not start at the top of the file

  2. 2

    A line that ended in CR LF counts both bytes for a following .read and for .tell.

handle-spurt-closeRaku++ passesRakudo passes2026-08-23 · 1eb2480d
  1. 1

    IO::Handle.spurt($content, :close) writes the content and closes the handle, so the file can be read back at once.

    after $fh.spurt($text, :close), slurping the path returns $text

handle-write-binds-a-blobRaku++ passesRakudo passes2026-11-12 · 7800a133 · #257
  1. 1

    A handle's .write binds exactly one Blob:D and refuses a Str, an Int, a List, no argument or two; .print is the text form.

    $fh.write("é") is refused, and .print("é") on a Latin-1 handle writes (233)

  2. 2

    A named argument passed to a handle's .write still binds, taken by the method's *%_.

io-cwd-captureRaku++ passesRakudo passes2026-08-25 · ce7ccb11 · #26
  1. 1

    An IO::Path captures $*CWD at creation, and .absolute resolves against that captured directory, not the process directory at call time.

  2. 2

    $*CWD is a logical name: chdir and indir keep the spelling the program used, symlinks unresolved, and . and .. collapse textually.

io-native-descriptorRaku++ passesRakudo passes2026-09-13 · f3aa6cb1
  1. 1

    IO::Handle.native-descriptor answers the OS file descriptor as an Int, exactly the real descriptors for the standard handles, and never Nil.

    $*IN.native-descriptor is an Int

More from this test: divergences (1).

io-path-chownRaku++ passesRakudo passes2026-10-29 · 17a71667 · #213
  1. 1

    IO::Path.chown answers True and keeps the file's own id for a uid or gid left out, a refusal is a Failure carrying X::IO::Chown, and the chown sub answers the paths it changed.

    $file.chown(uid => 0, gid => 0)

io-path-cwd-operationsRaku++ passesRakudo passes2026-08-28 · 82d03385
  1. 1

    File operations on an IO::Path created with :CWD (.e, .lines, open and the like) resolve a relative path against the path's own :CWD, not the process's current directory.

    IO::Path.new($rel, :CWD($dir)).lines reads the file under $dir

io-path-extension-and-flavorsRaku++ passesRakudo passes2026-07-26 · c40771a1
  1. 1

    .extension($new, :parts, :joiner) replaces the extension; the joiner defaults to the empty string for an empty replacement and to . otherwise, and nothing is replaced when no extension of the requested size exists.

    .extension('') removes the dot too, while :joiner<_> leaves a joiner behind

  2. 2

    .cleanup squeezes repeated separators and drops . segments but keeps .., and returns an IO::Path.

  3. 3

    .add and .child take several parts, or one list, and append each as a path segment.

  4. 4

    A flavored path such as IO::Path::Win32 stringifies as its path, and its .basename/.parts follow that flavor's IO::Spec, so a UNC volume comes out whole.

  5. 5

    IO::Path.new(…, :CWD(…)) remembers the directory it was given.

io-path-methods-undefinedRaku++ passesRakudo passes2026-09-08 · 9f566ca5 · #62
  1. 1

    Any has no path methods: .basename, .is-absolute, .contents and the like on an undefined non-path invocant are method-not-found errors.

    Any.basename dies

  2. 2

    IO::Handle.path is an IO::Path, and IO::Path.path is the path as a Str.

    $fh.path.unlink works

io-path-subclass-boxedRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    An instance of a user class deriving from IO::Path answers .e, .slurp, .lines and .Str as the built-in does, and keeps doing so with a role mixed in by but.

    class IO::Path::AutoDecompress is IO::Path { … }

More from this test: Classes, roles & the MOP (1).

io-path-user-group-modeRaku++ passesRakudo passes2026-09-10 · da4bc1a6 · #74
  1. 1

    IO::Path.user and .group answer the file's own owner and group ids.

  2. 2

    IO::Path.mode is an IntStr whose numeric side is the permission bits and whose string side is their octal digits.

    "/tmp".IO.mode stringifies as 1777; sprintf("%07o", $f.mode) round-trips the permissions

io-path-watch-directoryRaku++ passesRakudo passes2026-10-02 · 925260b1 · #115
  1. 1

    IO::Path.watch on a directory emits the changes of its entries as IO::Notification::Change objects with an absolute .path and a FileChangeEvent.

  2. 2

    The events of IO::Path.watch on a file are IO::Notification::Change objects, not Hashes.

iospec-parts-and-numeric-identityRaku++ passesRakudo passes2026-07-27 · 5ee18c68
  1. 1

    IO::Spec's catdir and catfile take *@parts, so one list argument spreads into its parts.

  2. 2

    IO::Spec's splitdir and splitpath return a List, not an Array.

  3. 3

    IO::Spec::*.split returns an IO::Path::Parts.

  4. 4

    In IO::Spec's .split, a trailing . or .. joins the dirname only once a separator has matched.

    a bare . splits as ("", "", ".")

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

iospec-versioning-enums-filetestRaku++ passesRakudo passes2026-07-27 · 20fa90d5
  1. 1

    IO::Spec::Unix.path returns a Seq, also when PATH is empty.

  2. 2

    IO::Spec::Unix.split('') gives an empty dirname, not ..

  3. 3

    IO::Spec::Unix.splitpath honours :nofile.

  4. 6

    A junction of filetest adverbs smartmatches a path by applying each filetest, as in $path.IO ~~ :d & :x.

More from this test: Classes, roles & the MOP (1), Types & coercion (1).

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

    .tell on a handle answers the byte position: the bytes written on a write handle, the bytes read on a read handle.

  2. 17

    warn writes through $*ERR, as note does.

  3. 18

    open(:mode<wo>, :create) creates an empty file.

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

issue34-io-path-relativeRaku++ passesRakudo passes2026-08-26 · 27b07a35 · #34
  1. 1

    IO::Path.relative($base) is purely lexical: it climbs out of the base with .. for every component the two do not share, then descends into the path.

    $cwd.add($path.relative($cwd)) round-trips a path outside $cwd

issue35-zef-after-installRaku++ passesRakudo cannot run it2026-10-07 · 808e24eb · #35
  1. 2

    &*EXIT is declared and is exit until it is rebound.

    &*EXIT(1) exits

More from this test: Containers & assignment (1), Hashes & sets (1), Lists & laziness (1), Modules (1), Types & coercion (1).

listop-terms-and-empty-container-failuresRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 6

    In open :w, $path the path is the first positional argument, even when an adverb precedes it.

More from this test: Hashes & sets (1), Lists & laziness (4), Syntax & parsing (2).

logical-newlinesRaku++ passesRakudo passes2026-08-26 · e25ccecb · #34
  1. 2

    A file handle's .lines splits only on its nl-in, by default ["\n", "\r\n"].

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

main-return-value-is-sunkRaku++ passesRakudo passes2026-09-10 · a82bbb0e · #73
  1. 1

    The return value of sub MAIN is sunk, so a failed Proc returned from MAIN throws X::Proc::Unsuccessful and the program exits non-zero.

    a program whose MAIN ends in a failing run @cmd exits non-zero

mkdir-failure-is-a-failureRaku++ passesRakudo cannot run it2026-08-25 · ad787f66 · #26
  1. 1

    mkdir, as a sub and as a method, returns the IO::Path on success, creating parents as needed, and an already-existing directory is success.

  2. 2

    A failed mkdir returns a Failure wrapping X::IO::Mkdir with the message "Failed to create directory '<path>' with mode '0oNNN': ...", false when boolified and thrown when sunk.

    mkdir $root in sink context dies when the path is shadowed by a regular file

  3. 3

    mkdir takes the mode positionally as a sub, and as $mode or :mode on the method.

  4. 4

    IO::Path.mode returns an IntStr.

modinfo-ecosystem-clusterRaku++ passesRakudo passes2026-08-02 · 2d99420e
  1. 17

    IO::Path.dir(:test) returns only the entries whose names match the given test.

    $tmp.dir(test => /'.raku' $/) returns a.raku and not b.txt

More from this test: Hashes & sets (1), Lists & laziness (1), Operators (1), Regexes & grammars (3), Scoping & phasers (2), Signatures & dispatch (3), Syntax & parsing (7), Types & coercion (1).

module-compat-clusterRaku++ passesRakudo passes2026-08-09 · 74aac52a
  1. 11

    The parent of the path . is ...

    '.'.IO.parent.Str is ..

More from this test: Classes, roles & the MOP (4), Operators (1), Scoping & phasers (3), Signatures & dispatch (2).

nqp-nextfiledir-end-of-dirRaku++ passesRakudo passes2026-10-10 · e1663c0c
  1. 1

    nqp::nextfiledir never hands out . and .. and answers the empty string at the end of the directory, so its result fits a native str.

open-failure-is-loudRaku++ passesRakudo does not pass2026-09-07 · fd6eab64 · #71
  1. 1

    open($p, :w) on a path that cannot be opened, such as one in a missing directory, returns a Failure instead of a usable handle.

    open("/gone/f", :w) is a Failure

  2. 4

    Opening a directory with open fails with X::IO::Directory.

  3. 5

    spurt to a path that cannot be written is a Failure, not a quiet False.

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

open-modes-bind-end-shiftRaku++ passesRakudo cannot run it2026-07-30 · bbf7c862
  1. 1

    open honours the :rw, :exclusive and :update modes.

    open($path, :rw, :exclusive) creates a fresh file instead of failing as nonexistent

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

open-undefined-encoding-is-defaultRaku++ passesRakudo passes2026-11-02 · 42618157
  1. 1

    open with an undefined :enc (a Str type object or Nil) uses the default encoding, utf8.

    open($f, :enc(Str)) opens the file as utf8

  2. 2

    open with a defined :enc naming an unknown encoding is refused.

out-bufferRaku++ passesRakudo passes2026-08-31 · 9bd8b08a · #51
  1. 1

    IO::Handle.out-buffer sets the output buffer size: $*OUT.out-buffer = 0 or open $f, :w, :!out-buffer makes every write reach the file or pipe immediately.

path-methods-need-a-pathRaku++ passesRakudo passes2026-09-15 · 02003b9f
  1. 1

    .absolute, .cleanup and .canonpath exist on IO::Path only, so calling one on a non-path value is an error.

    Int.^can('absolute') is false, and 7.absolute does not answer a path

path-methods-on-any-valueRaku++ passesRakudo passes2026-11-25 · 43558c4f · #275
  1. 1

    IO::Path methods (add, child, sibling, parent, basename, extension, open …) called on a defined value that is neither a Str nor an IO::Path throw X::Method::NotFound.

    42.add('x') throws X::Method::NotFound

    Also held by path-methods.

More from this test: Classes, roles & the MOP (1), divergences (1).

path-methods-on-type-objectsRaku++ passesRakudo passes2026-11-26 · e6278cea · #275
  1. 1

    IO::Path methods called on a type object other than IO::Path throw X::Method::NotFound.

    Any.add('x') and Int.parent throw X::Method::NotFound

    Also held by path-methods.

  2. 2

    IO::Path methods called on Nil answer Nil.

  3. 3

    IO::Path instance methods called on the IO::Path type object throw X::Parameter::InvalidConcreteness.

pdf-family-2026-09Raku++ passesRakudo passes2026-09-14 · a3586267
  1. 50

    seek and tell on a :bin handle work in byte offsets.

More from this test: Containers & assignment (8), Exceptions & control flow (1), Lists & laziness (1), Modules (1), Numerics (1), Classes, roles & the MOP (14), Operators (1), Regexes & grammars (3), Scoping & phasers (4), Signatures & dispatch (9), Syntax & parsing (11), Types & coercion (3).

proc-async-in-supply-blockRaku++ passesRakudo passes2026-10-02 · 925260b1
  1. 3

    Proc::Async.start(:ENV(…)) gives the child that environment.

More from this test: Concurrency (2).

proc-in-streamsRaku++ passesRakudo passes2026-09-04 · 0272cd9a
  1. 1

    run(cmd, :in, :out, :err) captures the child's standard error in .err as well as its standard output in .out.

  2. 2

    run(cmd, :in) without :out or :err lets the child write to the parent's own streams.

  3. 3

    Closing $p.in without writing anything still runs the child, which sees end of input, and .out then holds its output.

proc-new-runs-laterRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    Proc.new(:out) builds a Proc before anything runs, choosing what the eventual run captures, and .shell or .spawn then runs a command on it.

proc-pipe-close-reports-a-failed-childRaku++ passesRakudo passes2026-09-10 · c95a6569
  1. 1

    .close on a Proc's .out or .err pipe returns the Proc, so a bare $p.err.close; statement sinks it and throws X::Proc::Unsuccessful when the child failed.

  2. 2

    .close on a plain file handle returns a Bool.

proc-sink-throws-inside-tryRaku++ passesRakudo passes2026-11-15 · 69e90f7a
  1. 1

    .sink on a Proc that exited unsuccessfully throws X::Proc::Unsuccessful at the call, so a try around the call catches it.

    try $p.sink catches the exception

proc-stream-tap-fidelityRaku++ passesRakudo passes2026-08-28 · 82d03385
  1. 1

    A plain Proc::Async .stdout tap emits decoded Str chunks; .stdout(:bin) is the form that emits bytes.

  2. 2

    .lines(:!chomp) on a Proc::Async output supply keeps the trailing newline of each line.

More from this test: Concurrency (3).

prompt-takes-no-namedsRaku++ passesRakudo cannot run it2026-09-09 · a65c6b51
  1. 1

    prompt has exactly the signatures () and ($msg), so any named argument is an error.

    prompt(:hidden) is a caller error

rakuglaze-round-6Raku++ passesRakudo passes2026-10-09 · 8902cac9
  1. 3

    A Str has no .CWD method.

More from this test: Concurrency (1), Exceptions & control flow (1), Hashes & sets (2), Lists & laziness (2), Classes, roles & the MOP (1), Regexes & grammars (1), Scoping & phasers (1), Syntax & parsing (2).

regex-closure-and-io-dotRaku++ passesRakudo passes2026-08-05 · f1028af9
  1. 3

    A bare . parent directory contributes nothing to a path built under it. inferred

  2. 4

    .dir's default :test is what excludes . and ..; an explicit :test replaces it.

More from this test: Regexes & grammars (2), Types & coercion (1).

resolve-completely-failsRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    IO::Path.resolve(:completely) answers a Failure when a component of the path does not exist.

roast-3log-batch1Raku++ passesRakudo passes2026-09-28 · ea9f1388
  1. 1

    Text reads from a Proc's captured pipes fold CRLF into a newline, as file reads do.

  2. 2

    The pipes of run(:bin) give Bufs.

  3. 9

    '-'.IO stands for standard input.

More from this test: Dates & times (1), Exceptions & control flow (2), Hashes & sets (1), Lists & laziness (2).

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

    A file handle nothing has read from is not at .eof, even over an empty file. inferred

  2. 50

    After a seek into the middle of a line, the next line read is the rest of that line. inferred

  3. 57

    The root path's .basename is the root, and a user IO::Spec class in $*SPEC becomes the SPEC of paths made under it. inferred

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

routine-scoped-match-and-when-lastRaku++ passesRakudo passes2026-08-05 · 73e24219
  1. 3

    .slurp is a method of IO::Path, not of every Str.

More from this test: Exceptions & control flow (1), Classes, roles & the MOP (1), Regexes & grammars (1).

run-adverbs-keep-undo-rule-captureRaku++ passesRakudo passes2026-07-25 · 85e74a52
  1. 1

    run(:!out, :!err) discards those streams, an unspecified stream is inherited from the parent, and :out/:err capture.

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

run-child-process-groupRaku++ passesRakudo passes2026-09-09 · 8b860fdf · #72
  1. 1

    A child started by run stays in the parent's process group, so it can read from and configure the terminal.

    run 'stty', '-echo' completes

run-child-sigpipe-defaultRaku++ passesRakudo passes2026-10-10 · a27de4ac
  1. 1

    A child process started by run, shell, qx or Proc::Async starts with SIGPIPE at its default disposition and an empty signal mask, so a writer whose reader went away is killed by SIGPIPE.

    shell 'yes | head -n 1' prints no Broken pipe on stderr; a yes feeding head dies of signal 13

run-env-adverb-shapesRaku++ passesRakudo passes2026-09-12 · 572af909
  1. 1

    run and shell take .hash of whatever :env holds, so a Hash, a Pair, a list of Pairs, and a hash followed by Pairs are all accepted.

  2. 2

    :env replaces the child's environment: :env(PROBE => 'M') gives the child an environment holding only that variable.

    run(…, :env(PROBE => 'M')) runs the child with one environment variable

run-env-cwdRaku++ passesRakudo passes2026-07-30 · 26b015da
  1. 1

    run's :env replaces the child's environment and :cwd sets its working directory, also when :in is used.

run-in-file-handleRaku++ passesRakudo passes2026-09-02 · 4272a0e2
  1. 1

    run or shell with :in($handle) gives the child the file handle's own descriptor as its standard input.

    test -f /dev/stdin holds in the child

run-in-non-handle-closes-stdinRaku++ passesRakudo passes2026-11-12 · 5b6a2753 · #258
  1. 1

    For run, :in(True) is a pipe the program writes, :in('-') inherits the parent's stdin, and any other value that is not a handle — False, a Str, a number, Any, Nil — closes the child's stdin, so a read there meets EOF at once.

    run(:in("x"), "cat", :out) does not deadlock: cat meets EOF

  2. 2

    shell with :in gives the child a stdin pipe that .in.print writes to. inferred

run-in-with-out-sinkRaku++ passesRakudo passes2026-10-10 · f2933ed3
  1. 1

    A handle given to :out or :err of run receives the child's stream, also when a bare :in is given and the child starts only once its stdin is closed.

    run 'cat', :in, :out($fh) writes the child's output into $fh

run-live-pipesRaku++ passesRakudo passes2026-10-04 · fb6b80d4
  1. 1

    run with :in / :out / :err returns while the child runs on live pipes: .out.get and .out.lines read output as it arrives, and .in.say reaches the running child, so a write-read-write conversation works.

run-main-protocolRaku++ passesRakudo passes2026-07-25 · de4d146d
  1. 1

    RUN-MAIN(&main, $mainline) drives the command-line protocol: @*ARGS pass through ARGS-TO-CAPTURE, &main is dispatched, a failed dispatch calls GENERATE-USAGE (or the legacy USAGE), and the process exits via &*EXIT.

  2. 2

    A user sub named ARGS-TO-CAPTURE or GENERATE-USAGE replaces the built-in step, &*ARGS-TO-CAPTURE/&*GENERATE-USAGE name the original while it runs, and MAIN_HELPER is never called.

run-positional-pair-argumentRaku++ passesRakudo passes2026-11-08 · 04db6160
  1. 1

    A Pair passed to run as a positional is an argument, its Str the key, a tab and the value; a named argument, or a hash slipped in as named ones, is still an adverb.

    the positional Pair's argument is "a\t1"

run-refuses-unknown-namedRaku++ passesRakudo passes2026-11-08 · db0fdbca
  1. 1

    run and shell refuse a named argument they do not take, while Proc::Async's .start stays lenient.

    run(…, :ENV(%env)) is refused

More from this test: divergences (1).

run-stderr-inheritRaku++ passesRakudo passes2026-08-24 · 7d6914e6
  1. 1

    run and shell without an :err adverb let the child inherit the parent's stderr, while :!err discards it.

shell-cwd-adverbRaku++ passesRakudo passes2026-09-12 · b423d513
  1. 1

    shell honours its :cwd adverb and runs the command in the named directory, as run does.

  2. 2

    shell with a :cwd naming a directory that does not exist does not run the command in the caller's directory and exit 0. inferred

shell-out-to-a-handleRaku++ passesRakudo passes2026-09-11 · cc95e49f
  1. 1

    shell(CMD, :out($fh)) sends the child's output to the handle's file, and the bytes are in the file when the child exits, even with the handle still open.

slurp-leaves-handle-at-endRaku++ passesRakudo passes2026-10-08 · 5e758f19
  1. 1

    .slurp (and .comb, which slurps) on an open handle leaves it at its end: .eof is True and .get, .getc, .lines and a second .slurp find nothing, on a file, on $*IN and on a captured Proc stream.

  2. 2

    .tell after a .seek into the middle of a file counts from where the seek landed.

socket-host-carries-portRaku++ passesRakudo passes2026-09-17 · 034ba7d6
  1. 1

    IO::Socket::INET.new(:host<name:port>) takes the port from the host string.

    :host<localhost:3137> connects to localhost on port 3137

  2. 2

    For IO::Socket::INET.new, an explicit :port wins over a port in the host string, a non-numeric tail is dropped, and an IPv6 literal with several colons is not split.

socket-inet-ipv6Raku++ passesRakudo passes2026-11-13 · a247fad2 · rakudo#1879
  1. 1

    IO::Socket::INET works over IPv6 when given :family(PF_INET6).

socket-read-and-stringyRaku++ passesRakudo passes2026-08-04 · 8032326a
  1. 2

    A listening IO::Socket::INET binds by hostname as well as by address.

    IO::Socket::INET.new(:listen, :localhost<localhost>, :localport(0)) is defined

  2. 3

    On a socket bound with :localport(0), .localport answers the port the OS assigned, and .localhost answers the name as given.

    $srv.localport > 0 and $srv.localhost is localhost

  3. 4

    .read($n) on a socket returns exactly $n bytes, blocking across packets until it has them, while .recv($n) returns at most $n.

    $cl.read(10) returns 10 bytes when the peer sends 4 and then 6

More from this test: Stringification (1), Syntax & parsing (1).

socket-recv-counts-charactersRaku++ passesRakudo passes2026-10-21 · f01c2ef2
  1. 1

    IO::Socket::INET's text .recv($n) hands out up to $n whole characters (graphemes), not bytes: from its buffer if it holds them, else after one more read, else all it has.

    .recv(3) of "Å\r\nö…" keeps the CR LF together

  2. 2

    On an IO::Socket::INET, .recv and .read continue from what an earlier .get read ahead into the buffer.

socket-role-and-recv-infRaku++ passesRakudo passes2026-08-16 · f4cd2c51
  1. 1

    IO::Socket is a role that a synchronous socket does: it is not a parent (.isa is False, .^mro does not list it) and it is not an IO.

    a socket binds to IO::Socket $s

  2. 2

    recv(Inf) on a socket returns whatever has arrived.

    $s.recv(Inf, :bin)

sparrow6-blockersRaku++ passesRakudo passes2026-08-23 · e0c46be1
  1. 1

    IO::Path.absolute returns a Str, as .relative does, while .cleanup returns an IO::Path.

    "x".IO.absolute('/base') is the Str /base/x

More from this test: Concurrency (2), Syntax & parsing (1).

stdin-is-one-handleRaku++ passesRakudo passes2026-10-08 · a59a0283
  1. 1

    Standard input is one handle however $*IN is reached: a copy stays === to $*IN after reads, and $*IN.close closes it for every later $*IN, a copy made before, $*ARGFILES with no files named and another thread's $*IN.

    after $*IN.close, $*IN.opened is False

  2. 2

    $*IN.lines(:close) and $*IN.words(:close) close standard input.

  3. 3

    A closed standard input refuses get, lines and words, as methods and as subs, with X::IO::Closed, and its .eof is True.

  4. 4

    open('-') opens a closed standard input again.

stdin-lines-streamsRaku++ passesRakudo passes2026-10-04 · fb6b80d4
  1. 1

    $*IN.lines over a pipe hands out each line as it arrives, without waiting for the writer to close.

stdin-read-bytes-and-eofRaku++ passesRakudo passes2026-10-02 · 99f09017 · #111
  1. 1

    $*IN.read(1) on a pipe returns each byte in turn.

  2. 2

    $*IN.eof turns True only after a read has met the end of input, and asking it consumes nothing.

stdin-read-returns-what-arrivedRaku++ passesRakudo passes2026-10-03 · 72e93f3c · #121
  1. 1

    .read(N) on stdin, or on a handle opened on a FIFO or terminal, returns what has arrived once at least one byte has, without waiting for N bytes or the end.

superscript-call-but-bool-redo-copy-and-friendsRaku++ passesRakudo passes2026-09-17 · 2e994990
  1. 6

    The sub form spurt($fh, …) on an open handle is the handle's spurt method and does not take the handle for a path.

More from this test: Exceptions & control flow (1), Lists & laziness (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1), Types & coercion (1).

supply-await-list-read-chdir-pathRaku++ passesRakudo passes2026-11-14 · fa8d1ea7
  1. 3

    .read(n) on a handle hands out n bytes, raw, so input that is not UTF-8 survives.

  2. 4

    A relative IO::Path made before a chdir still names the file it named, because it keeps the $*CWD it was made under.

More from this test: Concurrency (3).

text-slurp-crlfRaku++ passesRakudo passes2026-08-05 · a2d04ca2
  1. 1

    A text-mode file read translates CRLF to LF, the handle's default :nl-in being ["\n", "\r\n"], while a :bin read keeps every CR.

tmpdir-existsRaku++ passesRakudo passes2026-09-10 · 0635e224
  1. 1

    $*TMPDIR is a directory that exists, on every platform.

worker-lock-wait-exits-promptlyRaku++ passesRakudo passes2026-09-27 · 572ad1e2
  1. 2

    A start block or the mainline waiting in a blocking .lock on a file handle gets the lock once its holder releases it.

zef-ecosystem-clusterRaku++ passesRakudo passes2026-07-25 · 0cefd08b
  1. 5

    IO::Path.basename ignores trailing slashes.

    "http://x/".IO.basename is x

  2. 6

    IO::Path.relative($base) gives the path relative to $base when $base is a prefix of it. inferred

More from this test: Regexes & grammars (3), Scoping & phasers (1), Types & coercion (1).