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

fix expect![[]] #38

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

xxchan
Copy link
Contributor

@xxchan xxchan commented May 18, 2023

fix #37

src/lib.rs Outdated
@@ -850,7 +855,7 @@ line1
);

// Check `expect![[ ]]` as well.
assert_eq!(locate_end("]]"), Some(0));
assert_eq!(locate_end("[]]"), Some(2));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests should have [ at the beginning.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Is the original test still relevant?
  • If so, should we leave in both assertions?
  • If so, what should it equal?
Suggested change
assert_eq!(locate_end("[]]"), Some(2));
assert_eq!(locate_end("]]"), todo!());
assert_eq!(locate_end("[]]"), Some(2));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, I think actually it's not relevant. Because locate is used for update. But when update is called, the syntax has to be correct.

@xxchan
Copy link
Contributor Author

xxchan commented May 18, 2023

It seems to break in #27. ping @ecstatic-morse @matklad to take a look

@xxchan
Copy link
Contributor Author

xxchan commented May 15, 2024

@quad @matklad Could you take a look? It would be frustrating that the documented quickstart fails.

@quad
Copy link
Collaborator

quad commented May 16, 2024

@xxchan Is the PR ready to be merged? I'm taking a look now…

xxchan added 3 commits May 16, 2024 22:22
Signed-off-by: xxchan <xxchan22f@gmail.com>
@xxchan xxchan force-pushed the xxchan/nursing-bovid branch from 207bbe3 to 5d4cb8e Compare May 16, 2024 14:28
Signed-off-by: xxchan <xxchan22f@gmail.com>
@xxchan
Copy link
Contributor Author

xxchan commented May 16, 2024

I just came up with a better solution

Signed-off-by: xxchan <xxchan22f@gmail.com>
@xxchan xxchan force-pushed the xxchan/nursing-bovid branch from 75e4580 to 7178666 Compare May 16, 2024 15:14
@xxchan xxchan requested a review from quad May 16, 2024 15:14
@sthornington
Copy link

is this project abandoned? I just came here inquiring about the same issue and I see it's not been merged after months...

@quad
Copy link
Collaborator

quad commented Oct 23, 2024 via email

@xxchan
Copy link
Contributor Author

xxchan commented Dec 19, 2024

kindly ping @quad

xxchan added a commit to xxchan/expect-test that referenced this pull request Dec 19, 2024
Currently recommended `expect![[]]` is broken rust-analyzer#37, and rust-analyzer#38 is blocked for long time, so maybe we can update the recommendation to a safer option instead.

Signed-off-by: xxchan <xxchan22f@gmail.com>
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.

Couldn't find closing delimiter for [[]]
3 participants