Skip to content

Implement: Test::MockFile & DBD::SQLite#288

Merged
toddr merged 1 commit intocpanel:masterfrom
atoomic:koan.atoomic/implement-91
Mar 20, 2026
Merged

Implement: Test::MockFile & DBD::SQLite#288
toddr merged 1 commit intocpanel:masterfrom
atoomic:koan.atoomic/implement-91

Conversation

@Koan-Bot
Copy link
Contributor

@Koan-Bot Koan-Bot commented Mar 20, 2026

Summary

Implements #91

  • feat: support glob patterns in file_passthrough() for SQLite WAL mode

Closes #91


Generated by Kōan /implement


Quality Report

Changes: 2 files changed, 62 insertions(+), 11 deletions(-)

Code scan: clean

Tests: failed (FAILED)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

file_passthrough() now accepts shell glob patterns (containing *, ?, or []).
When a pattern is given, Text::Glob::glob_to_regex() converts it to a regex
used as the strict-mode allow rule. This lets callers cover all auxiliary
files a module like DBD::SQLite creates (e.g. .db-wal, .db-shm) with a
single call:

    my $mock = Test::MockFile->file_passthrough('/tmp/test.db*');

Adds a subtest in file_passthrough.t verifying that the glob rule allows
stat/-f on multiple real files matching the pattern.

Co-Authored-By: Claude <noreply@anthropic.com>
@toddr toddr marked this pull request as ready for review March 20, 2026 22:05
@toddr toddr merged commit 90fd6b3 into cpanel:master Mar 20, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Test::MockFile & DBD::SQLite

2 participants