Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the data from an ExpectFile accessible #43

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

quad
Copy link
Collaborator

@quad quad commented Jul 12, 2023

I'm using expect-test in probably a weird semi-abusive way.

I'm writing tests for a network protocol. My tests run in one of three modes:

  1. Record: a normal expect-test flow with UPDATE_EXPECT=1; records both the inputs and outputs to the live system
  2. Check: a normal expect-test flow with UPDATE_EXPECT=0; asserts on both the inputs and outputs and fails if they've changed
  3. Replay: uses .data to supply the inputs and asserts only on the outputs from the implementation.

It would be helpful if ExpectFile let me see into underlying data as easily as Expect does.

@matklad
Copy link
Member

matklad commented Mar 28, 2024

This definitely makes sense. Could you bump a version in Cargo.toml to 1.5.0 so that this automatically gets released?

@matklad
Copy link
Member

matklad commented Mar 28, 2024

Oh, and mention this in the changelog!

@quad quad added this pull request to the merge queue Apr 1, 2024
Merged via the queue into rust-analyzer:master with commit f8b409f Apr 1, 2024
@quad quad deleted the patch-1 branch April 1, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants