Skip to content

Commit

Permalink
tests: add like_operator_outside_orm_error.vv/.out (related #22075) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 authored Aug 20, 2024
1 parent cf0fb83 commit 5045764
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
6 changes: 6 additions & 0 deletions vlib/v/checker/tests/like_operator_outside_orm_1_error.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vlib/v/checker/tests/like_operator_outside_orm_1_error.vv:3:15: error: unexpected name `like`, expecting `)`
1 | fn main() {
2 | name := 'Luke'
3 | println(name like 'L%')
| ~~~~
4 | }
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
fn main() {
name := 'Luke'

println(name like 'L%')
}
7 changes: 7 additions & 0 deletions vlib/v/checker/tests/like_operator_outside_orm_2_error.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
vlib/v/checker/tests/like_operator_outside_orm_2_error.vv: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 | }
5 changes: 5 additions & 0 deletions vlib/v/checker/tests/like_operator_outside_orm_2_error.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fn main() {
name := 'Luke'
ret := name like 'L%'
println(ret)
}
6 changes: 0 additions & 6 deletions vlib/v/checker/tests/like_operator_outside_orm_error.out

This file was deleted.

0 comments on commit 5045764

Please sign in to comment.