Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Test Structure

Directory Layout

Test directories are numbered and run in order. The numbering provides natural ordering and allows insertion of new categories.

DirectoryPurposeSpeed
00-base/Gate tests (must all pass)Fast
01-parsing/Parser testsFast
02-builtins/Builtins registryFast
05-op/OperatorsFast
10-cmd/Control flowFast
15-sub/SubroutinesFast
15-modules/Module systemFast
20-data/Data structuresFast
22-unicode/Unicode handlingFast
25-regex/Regular expressionsFast
30-special/Special variablesFast
40-package/Packages and OOPFast
45-builtin/Built-in functionsFast
50-context/Context handlingFast
55-io/I/O operationsFast
60-parallel/Auto-parallelizationMedium
62-jit/JIT compilationMedium
64-auto-ffi/Auto FFIMedium
66-bytecode/Bytecode testsSlow
68-daemon/Daemon modeMedium
70-core-tier0/Core module integration (tier 0)Slow
71-core-tier1/Core module integration (tier 1)Slow
72-core-tier2/Core module integration (tier 2)Slow
80-complex/Integration testsMedium
81-xs-native/XS-native module replacementsMedium
82-native/Native module testsMedium
99-debug/Bug regression / active debuggingFast
benchmarks/Performance benchmarks (not TAP)Varies

Gate Tests (00-base)

The 00-base/ directory contains fundamental tests. If any fail, the harness stops (bail-out). These verify:

  • Basic parsing works
  • print produces output
  • Variables and assignment work
  • Basic operators function

These must always pass before any other testing is meaningful.

Tier 0 Core Modules (70-core-tier0/)

Tier 0 tests exercise core CPAN modules. They are subdivided:

RangePurposeCount
005-030Native pass modules~55 modules
035-050Fallback pass modules~20 modules
055TAP::* modules~12 modules
057Newly passing misc~3 modules
060Remaining failures~4 modules

Naming Conventions

  • Directories: NN-name/ — numbered with gaps (00, 01, 02, 05, 10, 15, …)
  • Test files: NNN-name.t — numbered within directory (005, 010, 015, …)
  • Perl5 ports: *-perl5.t suffix indicates a test ported from perl5-upstream
  • Gaps: Leave room for insertion (use increments of 5)

The 99-debug Directory

99-debug/ is a workspace for active bug investigation. Tests here follow the “complex case” debugging workflow:

  1. Create synthetic tests isolating a hypothesis
  2. Fix the bug
  3. Verify the fix
  4. Move passing tests to the appropriate category directory
  5. Clean up 99-debug

Tests should not accumulate in 99-debug permanently.

Benchmarks

The benchmarks/ directory contains performance tests. These are not TAP tests — they measure execution time and are not run by the standard harness. Key benchmarks:

  • 006-mandelbrot-bench.pl — JIT + parallelization scaling test
  • Various arithmetic and string operation benchmarks