Skip to content

test: add use strict and use warnings to test files#253

Draft
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/test-strict-warnings
Draft

test: add use strict and use warnings to test files#253
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/test-strict-warnings

Conversation

@toddr-bot
Copy link
Copy Markdown
Collaborator

What

Add missing use strict and use warnings to 9 test files.

Why

These test files were the only ones in the suite without strict/warnings, making them inconsistent and allowing silent issues like undeclared variables ($parser in t/file.t).

How

  • 6 files: added both use strict and use warnings
  • 3 files: added use warnings (already had use strict)
  • t/file.t: added missing my on $parser
  • t/file_open_scalar.t: quoted Test::More in use if for strict compatibility

Testing

Full make test passes — 59 test programs, 677 subtests, 0 failures.

🤖 Generated with Claude Code

Nine test files were missing strict, warnings, or both. This
makes them consistent with the rest of the test suite and catches
accidental bareword or undeclared variable issues at test time.

- 6 files: add both use strict and use warnings
- 3 files: add use warnings (already had use strict)
- t/file.t: add missing my on $parser
- t/file_open_scalar.t: quote module name in use-if for strict compat

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.73%. Comparing base (45216a7) to head (2f3ff35).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #253   +/-   ##
=======================================
  Coverage   75.73%   75.73%           
=======================================
  Files           1        1           
  Lines        1092     1092           
  Branches      342      342           
=======================================
  Hits          827      827           
  Misses         59       59           
  Partials      206      206           
Flag Coverage Δ
perl 75.73% <ø> (ø)
xs 75.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant