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

test: add like_operator_outside_orm_error.vv/.out (related #22075) #22079

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Aug 20, 2024

This PR fix like_operator_outside_orm_error.vv/.out (related #22075).

fn main() {
	name := 'Luke'
	ret := name like 'L%'
	println(ret)
}

PS D:\Test\v\tt1> v run .
tt1.v:3:14: error: only `c`, `r`, `js` are recognized string prefixes, but you tried to use `like`
    1 | fn main() {
    2 |     name := 'Luke'
    3 |     ret := name like 'L%'
      |                 ~~~~
    4 |     println(ret)
    5 | }

@spytheman
Copy link
Member

Why replace the existing test?

The old message does not fail on master, running git grep 'unexpected name.*like.*expecting' shows the message is only tested in that .vv/.out pair.

I think that both the old and the new variants, are valuable to have, and creating a new .vv/.out pair, instead of replacing the existing one, may be better.

Is there something that I miss?

@yuyi98
Copy link
Member Author

yuyi98 commented Aug 20, 2024

Ok, I see. I'll add a new test and restore it.

@yuyi98 yuyi98 changed the title test: fix like_operator_outside_orm_error.vv/.out (related #22075) test: add like_operator_outside_orm_error.vv/.out (related #22075) Aug 20, 2024
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Good work.

@spytheman spytheman merged commit 5045764 into vlang:master Aug 20, 2024
54 checks passed
@yuyi98 yuyi98 deleted the fix_like_outside_orm_test branch August 20, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants