Skip to content

Text-based snapshots break across platforms due to line ending differences #815

Open
@brianmichel

Description

@brianmichel

Describe the bug
When generating snapshots for text-based snapshots they are encoded with whatever the recording platform's line ending format is. When attempting to reuse these snapshots on a different platform that uses a different line-ending format the snapshots will fail to validate.

To Reproduce
Zip up a project that reproduces the behavior and attach it by dragging it here.

// And/or enter code that reproduces the behavior here.

Expected behavior
I would expect to have these line endings somehow ignored across platforms, or otherwise adaptable across multiple platforms in which Swift run on.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • swift-snapshot-testing: 1.8.1
  • Xcode N/A
  • Swift: 5.11-dev
  • OS: Windows 11 Pro

Additional context
Add any more context about the problem here.

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