Skip to content

Commit

Permalink
[#145] insert_query 테스트케이스 보완
Browse files Browse the repository at this point in the history
  • Loading branch information
myyrakle committed Jul 31, 2024
1 parent a4bd21a commit 7eb0f50
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/parser/test/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ fn test_insert_query() {
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT SELECT".into(),
input: vec![Token::Insert, Token::Select],
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT INTO foo.bar(".into(),
input: vec![
Expand All @@ -282,6 +288,19 @@ fn test_insert_query() {
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT INTO foo.bar)".into(),
input: vec![
Token::Insert,
Token::Into,
Token::Identifier("foo".into()),
Token::Period,
Token::Identifier("bar".into()),
Token::RightParentheses,
],
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT INTO foo.bar(a,b".into(),
input: vec![
Expand Down Expand Up @@ -316,6 +335,23 @@ fn test_insert_query() {
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT INTO foo.bar(a,b)".into(),
input: vec![
Token::Insert,
Token::Into,
Token::Identifier("foo".into()),
Token::Period,
Token::Identifier("bar".into()),
Token::LeftParentheses,
Token::Identifier("a".into()),
Token::Comma,
Token::Identifier("b".into()),
Token::RightParentheses,
],
expected: Default::default(),
want_error: true,
},
TestCase {
name: "실패: INSERT INTO foo.bar(a, b, c) Values(1, 2), (4, 5)".into(),
input: vec![
Expand Down

0 comments on commit 7eb0f50

Please sign in to comment.