Skip to content

A way for tests to look up file! paths at runtime #15885

@epage

Description

@epage

Problem

In tests, I want to be able to

  • Update snapshots in the test's source
  • Read or write to files from a path relative to the test

Proposed Solution

Provide the base path for file! as an environment variable

Note: Rust 1.89 specified the base path for file!

Notes

Split out of #3946

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-environment-variablesArea: environment variablesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-benchCommand-testS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions