mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 10:20:17 -06:00
add a unittest for the keyword in column name issue
This commit is contained in:
@@ -159,5 +159,16 @@ void TestTable::parseSQLSingleQuotes()
|
||||
QVERIFY(tab.fields().at(1)->name() == "test");
|
||||
}
|
||||
|
||||
void TestTable::parseSQLKeywordInIdentifier()
|
||||
{
|
||||
QString sSQL = "CREATE TABLE deffered(key integer primary key, if text);";
|
||||
|
||||
Table tab = Table::parseSQL(sSQL);
|
||||
|
||||
QVERIFY(tab.name() == "deffered");
|
||||
QVERIFY(tab.fields().at(0)->name() == "key");
|
||||
QVERIFY(tab.fields().at(1)->name() == "if");
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestTable)
|
||||
//#include "testsqlobjects.moc"
|
||||
|
||||
@@ -13,5 +13,6 @@ private slots:
|
||||
void parseSQLMultiPk();
|
||||
void parseSQLForeignKey();
|
||||
void parseSQLSingleQuotes();
|
||||
void parseSQLKeywordInIdentifier();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user