Skip to content

checkForTokenDefinitionsInWrongPath rejects test fixtures on Windows #986

@MrLightspeed

Description

@MrLightspeed

Summary

Running ./gradlew run on Windows fails because checkForTokenDefinitionsInWrongPath only whitelists paths that contain the hard-coded substring /test_tokens/. Windows paths use backslashes, so the guard misses src\test\resources\test_tokens and throws.

Steps to reproduce

  1. Checkout master at e0794ee on Windows 11.
  2. Ensure Java 17 is installed (Temurin 17.0.13+11).
  3. Run gradlew.bat run inside the repo.

Actual result

> Task :run FAILED
There is a token definition file (0x1234...json) placed in a directory where it does not belong (C:\Users\me\tokens\src\test\resources\test_tokens)

The walk treats the Windows-absolute path as unknown because it looks for /test_tokens/.

Expected result

The guard should allow test fixtures regardless of platform path separator so Windows contributors can run the task successfully.

Environment

  • Commit: e0794ee
  • OS: Windows 11 Pro 23H2
  • JDK: Temurin 17.0.13+11

Related PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions