fix(tests): normalize TOML quote style for cross-platform snapshot consistency#1958
Merged
fix(tests): normalize TOML quote style for cross-platform snapshot consistency#1958
Conversation
…nsistency On Windows, TOML serializes paths with backslashes using single quotes (literal strings). After replacing path values with placeholders during test snapshot normalization, these single quotes were preserved, causing snapshot mismatches when comparing Windows output against snapshots created on Unix (which use double quotes). Add a post-processing step in normalize_runtime_paths_for_snapshot() that converts single-quoted placeholders to double quotes, ensuring consistent snapshot format across all platforms. Fixes #1957
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Windows snapshot test failure (#1957) caused by TOML quote style mismatch.
On Windows, the TOML serializer uses single quotes for paths containing backslashes (literal strings). After test normalization replaced path values with placeholders, the single quotes were preserved, creating snapshot mismatches when comparing with Unix snapshots (which use double quotes).
Changes
normalize_runtime_paths_for_snapshot()incrates/zeph-core/src/config/types/tests/mod.rsTesting
config_default_snapshottest passesRelated