aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/Tests
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-11-25 16:48:41 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-11-25 16:48:41 -0500
commit8e640722c62692818ab840d50b3758f89a41a54e (patch)
tree38197eb1688a5afc338081ea17e15f938976e422 /SQLiteStudio3/Tests
parent9618f0ebbf4b88045247c01ce8c8f58203508ebf (diff)
Imported Upstream version 3.0.7upstream/3.0.7
Diffstat (limited to 'SQLiteStudio3/Tests')
-rw-r--r--SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp b/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
index cd8c4b2..4cec515 100644
--- a/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
+++ b/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
@@ -20,6 +20,7 @@ class ParserTest : public QObject
Parser* parser3 = nullptr;
private Q_SLOTS:
+ void testUniqConflict();
void testGetTableTokens();
void testGetTableTokens2();
void testGetDatabaseTokens();
@@ -354,6 +355,16 @@ void ParserTest::testBigNum()
QVERIFY(res);
}
+void ParserTest::testUniqConflict()
+{
+ QString sql = "CREATE TABLE test (x UNIQUE ON CONFLICT FAIL);";
+ bool res = parser3->parse(sql);
+ QVERIFY(res);
+ SqliteQueryPtr q = parser3->getQueries().first();
+ TokenList tokens = q->tokens;
+ QVERIFY(tokens[16]->type == Token::Type::PAR_RIGHT);
+}
+
void ParserTest::initTestCase()
{
initKeywords();