Skip to content

Commit

Permalink
add a new test for it
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Aug 20, 2024
1 parent d56d230 commit df9893f
Show file tree
Hide file tree
Showing 5 changed files with 17 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 | }
4 changes: 4 additions & 0 deletions vlib/v/checker/tests/like_operator_outside_orm_1_error.vv
Original file line number Diff line number Diff line change
@@ -0,0 +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 | }
7 changes: 0 additions & 7 deletions vlib/v/checker/tests/like_operator_outside_orm_error.out

This file was deleted.

0 comments on commit df9893f

Please sign in to comment.