Tests: Add test for ed04128a74

Add a test for table and column names in single quotes for which support
was added in ed04128a74.
This commit is contained in:
Martin Kleusberg
2013-07-18 20:45:27 +02:00
parent e80f445c53
commit b924859392
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -146,7 +146,17 @@ void TestTable::parseSQLForeignKey()
QVERIFY(tab.name() == "grammar_test");
QVERIFY(tab.fields().at(0)->name() == "id");
QVERIFY(tab.fields().at(1)->name() == "test");
}
void TestTable::parseSQLSingleQuotes()
{
QString sSQL = "CREATE TABLE 'test'('id','test');";
Table tab = Table::parseSQL(sSQL);
QVERIFY(tab.name() == "test");
QVERIFY(tab.fields().at(0)->name() == "id");
QVERIFY(tab.fields().at(1)->name() == "test");
}
QTEST_MAIN(TestTable)
+1
View File
@@ -12,5 +12,6 @@ private slots:
void parseSQLdefaultexpr();
void parseSQLMultiPk();
void parseSQLForeignKey();
void parseSQLSingleQuotes();
};