{"atom":"regression/dist-suite-quartet","family":"regression","slug":"dist-suite-quartet","header":{"atom":"regression/dist-suite-quartet","kind":"whole-program — a minimal repro, not yet reduced to an atom","source":"curated"},"axes":null,"cols":null,"engines":["rakudo-2026.07","rakupp-3.14.0"],"kinds":["ref","pp"],"defFrom":"rakupp:t/regression/dist-suite-quartet.raku","counts":{"a":1,"f":0,"d":0,"c":0,"r":0,"n":0},"files":["atoms/regression/dist-suite-quartet.grid"],"records":[["0001","","# Regression: the general fixes behind the Config + XML + Text::Utils +\n# Log::Async zef-suite batch (2026-08-05, session 3):\n#   1.  a `Str:D` parameter REFUSES an IO::Path (Config's read(Str:D) recursed\n#       forever re-dispatching to itself); IO::Path is Cool, does IO, NOT Stringy.\n#   2.  object .Str carries the object's identity (isnt $a, $a.clone) while\n#       eqv/is-deeply compare objects STRUCTURALLY (a clone eqv its source).\n#   3.  `$obj[$i] = v` writes the real element through `return-rw @!arr[$i]`\n#       (lvalue-mode method invocation).\n#   4.  s/// interpolation escapes whitespace (a ' '-valued var matched EMPTY)\n#       and accepts kebab-case names ($comment-char).\n#   5.  qqww quote protection + escape processing; `<<:TRACE(1) DEBUG>>`\n#       colonpair words are Pairs (and seed enum numbering).\n#   6.  open(:nl-in(\"||\")) honoured by .lines.\n#   7.  attr defaults evaluate in the DECLARING class's scope (class-body\n#       constants visible from another compilation unit's .new).\n#   8.  `my $x will leave {…} = v` runs the block at scope exit with $x as topic.\n#   9.  a but-mixed Code stays callable; a method wrapped via\n#       .^find_method(...).wrap runs the wrapper (self, |args) with callsame;\n#       a |c parameter binds a real Capture (named parts reachable).\n#   10. cmp-ok's numeric fast path only fires for numerics (Version cmp works).\n#   11. DateTime.now carries fractional seconds.\n#   12. Exception.throw records a backtrace; frames answer .file/.line.\n#   13. \"$?LINE\" interpolates (with the right line number).\n#   14. an enum VALUE is callable like its type: WARNING(TRACE) → TRACE.\n# Contract: exit 0 + last line PASS.\nmy @fail;\n\n# 1. Str:D vs IO::Path dispatch\n{\n    my class P {}\n    my class PN is P {}\n    my class C {\n        multi method read (%data) { \"HASH\" }\n        multi method read (IO() $path, P:U $parser?) { \"IO\" }\n        multi method read (Str:D $path, P:U $parser?) { \"STR->\" ~ self.read($path.IO, $parser) }\n    }\n    @fail.push('io-dispatch') unless C.read('x'.IO, PN) eq 'IO';\n    @fail.push('str-dispatch') unless C.read('x', PN) eq 'STR->IO';\n    @fail.push('iopath-not-str') if 'x'.IO ~~ Str;\n    @fail.push('iopath-not-stringy') if 'x'.IO ~~ Stringy;\n    @fail.push('iopath-is-io') unless 'x'.IO ~~ IO;\n    @fail.push('version-not-cool') if v1.2 ~~ Cool;\n}\n\n# 2. object identity in .Str, structure in eqv\n{\n    my class K { has $.a }\n    my $x = K.new(a => 1);\n    my $y = $x.clone;\n    @fail.push('clone-str-differs') unless $x.Str ne $y.Str;\n    @fail.push('clone-eqv') unless $x eqv $y;\n    @fail.push('eqv-attr-differs') if K.new(a => 1) eqv K.new(a => 2);\n    my $o = K.new(a => 3);\n    @fail.push('pair-obj-key') unless ($o => 1) eqv (K.new(a => 3) => 1);\n}\n\n# 3. return-rw element write-back\n{\n    my class A does Positional {\n        has @.arr;\n        method AT-POS($i) { return-rw @!arr[$i] }\n    }\n    my $p = A.new;\n    $p[1] = 7;\n    $p[0] = 5;\n    @fail.push('return-rw-write') unless $p.arr eqv [5, 7];\n    $p[1]++;\n    @fail.push('return-rw-incr') unless $p.arr[1] == 8;\n}\n\n# 4. substitution interpolation: whitespace + kebab-case\n{\n    my constant $WS = ' ';\n    my $s = \"a  b   c\";\n    $s ~~ s:g/ $WS ** 2..* /$WS/;\n    @fail.push('subst-ws-var') unless $s eq 'a b c';\n    my $comment-char = '#';\n    my $line = \"# note\";\n    @fail.push('kebab-interp') unless $line ~~ /^ \\h* $comment-char /;\n    my $l2 = \"x # y\";\n    $l2 ~~ s/ \\h* $comment-char .* //;\n    @fail.push('kebab-subst') unless $l2 eq 'x';\n}\n\n# 5. qqww + colonpair words\n{\n    my @le = qqww{ \"\\n\" || 'a b' };\n    @fail.push('qqww') unless @le eqv [\"\\n\", \"||\", \"a b\"];\n    enum LV <<:TRACE(1) DEBUG INFO>>;\n    @fail.push('enum-cp-value') unless TRACE.Int == 1 && DEBUG.Int == 2;\n    @fail.push('enum-cp-str') unless TRACE.Str eq 'TRACE';\n    my @lst = <<:x(5) plain>>;\n    @fail.push('anglepair') unless @lst[0] ~~ Pair && @lst[0].value == 5 && @lst[1] eq 'plain';\n}\n\n# 6. :nl-in\n{\n    my $f = $*TMPDIR.add(\"rakupp-nlin-$*PID.txt\");\n    $f.spurt(\"a||b||c\");\n    my $fh = open $f.Str, :r, :nl-in(\"||\");\n    my @l = $fh.lines;\n    $fh.close;\n    $f.unlink;\n    @fail.push('nl-in') unless @l eqv [\"a\", \"b\", \"c\"];\n}\n\n# 7. class-body constant visible to attr defaults cross-unit is covered by the\n#    module battery; same-unit shape still guards the env chain:\n{\n    my class G {\n        my %H = a => 1;\n        has $.g = %H;\n    }\n    @fail.push('attr-default-scope') unless G.new.g<a> == 1;\n}\n\n# 8. will leave\n{\n    my @ran;\n    sub f() {\n        my $x will leave { @ran.push($_) } = 42;\n        $x;\n    }\n    f();\n    @fail.push('will-leave') unless @ran eqv [42];\n}\n\n# 9. wrap + but-Code + capture param\n{\n    my $fmt = -> $m { \"fmt:$m\" };\n    my $wrapped = $fmt but role { method is-hidden-from-backtrace { True } };\n    @fail.push('but-code-call') unless $wrapped(\"x\") eq 'fmt:x';\n    my class W { method add($blk, :$opt) { \"got(\" ~ $blk() ~ \")\" } }\n    my $cap;\n    W.^find_method('add').wrap: -> \\s, |q { $cap = q; callsame };\n    my $r = W.new.add({ 9 }, opt => 3);\n    @fail.push('wrap-ran') unless $r eq 'got(9)';\n    @fail.push('wrap-capture-named') unless $cap<opt> == 3;\n}\n\n# 10. cmp-ok on Versions (Test-free check: the operator applied by name)\n{\n    @fail.push('version-gt') unless v0.0.7 > v0.0.0;\n    @fail.push('version-cmp') unless (v0.0.7 cmp v0.0.0) eq 'More';\n}\n\n# 11. DateTime.now fractional seconds (two samples so a .000000 boundary\n#     can't flake: at least one must carry a fraction)\n{\n    my $a = DateTime.now.Str;\n    my $b = DateTime.now.Str;\n    @fail.push('dt-frac') unless $a ~~ /'.' \\d+/ or $b ~~ /'.' \\d+/;\n}\n\n# 12. Exception backtrace frames\n{\n    my $e = Exception.new;\n    try $e.throw;\n    my @bt = $e.backtrace.list;\n    @fail.push('bt-nonempty') unless @bt.elems >= 1;\n    @fail.push('bt-file') unless @bt[0].file.Str.chars > 0;\n    @fail.push('bt-line') unless @bt[0].line > 0;\n}\n\n# 13. $?LINE interpolation\n{\n    my $s = \"at $?LINE\";\n    my $expect = $?LINE - 1;\n    @fail.push(\"qline ($s)\") unless $s eq \"at $expect\";\n}\n\n# 14. enum value callable as its type\n{\n    enum L2 <A2 B2 C2>;\n    my $v = B2;\n    @fail.push('enum-call-enum') unless $v(C2) === C2;\n    @fail.push('enum-call-int') unless $v(2) === C2;\n}\n\nif @fail {\n    say \"FAILED: @fail[]\";\n    say \"FAIL\";\n    exit 1;\n}\nsay \"PASS\";","output PASS","a",["PASS","PASS"],0,[["budget","20s"]]]]}