• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

peczenyj / GDPR-IAB-TCFv2 / 25466121077
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: devel
DEFAULT BRANCH: main
Ran 06 May 2026 11:16PM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 May 2026 11:06PM UTC coverage: 94.398% (+0.2%) from 94.191%
25466121077

push

github

web-flow
test: drive Validator across the golden corpus via fixed scenarios (#58)

* test: drive Validator across the golden corpus via fixed scenarios

Reuse the 1024-entry golden corpus that already validates dump output
to also exercise GDPR::IAB::TCFv2::Validator.  A canonical list of 8
scenarios in t/corpus/validator_scenarios.pl is replayed against
every parseable TC string; the per-string (valid, reasons) outcomes
are stored as a new tests.validator section in golden.jsonl.gz, and
t/08-golden-validator.t replays the scenarios at test time and diffs
against the recorded outcomes.

Scenarios cover:
  - vendor 284 baseline (no purpose constraints)
  - vendor 284 standard consent / LI checks
  - vendor 99999 (out of range) -- pins the negative path
  - flexible-purpose dispatch with both default bases (consent / LI)
  - min_policy_version gate
  - check_disclosed_vendors

Variance across the corpus (after regen):

  scenario                     valid  invalid
  v284_baseline                 1024        0
  v99999_consent_p1                0     1024  (always fails by design)
  v284_check_disclosed          1023        1
  v284_consent_p1               1003       21
  v284_flex_p2_consent          1002       22
  v284_flex_p7_li                994       30
  v284_li_p7                     701      323
  v284_min_policy_v5            1012       12

Backward-compatible: the consumer skips any entry without a
tests.validator section, so the test runs vacuously against an old
corpus and only fails meaningfully after regen.

To regenerate after intentionally changing validator behavior:

  REGEN_CORPUS=1 prove -lr t/07-golden.t

then commit the regenerated golden.jsonl.gz alongside the code change.

* chore(corpus): regenerate golden.jsonl.gz with tests.validator section

Adds the per-string outcomes for the 8 Validator scenarios from
t/corpus/validator_scenarios.pl across all 1024 parseable entries
(8192 new assertion points).  Generated by:

    perl t/generate... (continued)

910 of 964 relevant lines covered (94.4%)

12095.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25466121077.1 06 May 2026 11:16PM UTC 13
94.4
GitHub Action Run
Source Files on build 25466121077
  • Tree
  • List 13
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2354abb5 on github
  • Prev Build on devel (#25465081412)
  • Next Build on devel (#25466563934)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc