Skip to content

Commit 55d8c9f

Browse files
committed
add a test with create table with IN
1 parent b02b36b commit 55d8c9f

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/tests/testsqlobjects.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,18 @@ void TestTable::parseNonASCIIChars()
208208
QVERIFY(tab.fields().at(0)->name() == "Fieldöäüß");
209209
}
210210

211+
void TestTable::createTableWithIn()
212+
{
213+
QString sSQL = "CREATE TABLE not_working("
214+
"_id PRIMARY KEY NOT NULL,"
215+
"value NVARCHAR(5) CHECK (value IN ('a', 'b', 'c'))"
216+
");";
217+
218+
Table tab = Table::parseSQL(sSQL);
219+
QVERIFY(tab.name() == "not_working");
220+
221+
QVERIFY(tab.fields().at(1)->check() == "value IN ('a', 'b', 'c')");
222+
}
223+
211224
QTEST_MAIN(TestTable)
212225
//#include "testsqlobjects.moc"

src/tests/testsqlobjects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ private slots:
1717
void parseSQLKeywordInIdentifier();
1818
void parseSQLWithoutRowid();
1919
void parseNonASCIIChars();
20+
void createTableWithIn();
2021
};
2122

0 commit comments

Comments
 (0)