Skip to content

Tests for --file-lines #7112

Description

@Manishearth

I think the existing formatting tests can be made to work for testing --file-lines.

Basically, what you can do is run diff between source/target, and identify the source lines that get formatted. Then use --file-lines to:

  • only format those lines, check if it produces something identical to target
  • only format lines that aren't those, check if it produces something identical to source

This may cover many of the cases @randomPoison has been finding.

There may be cleverer ways of doing this that cover more cases

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions