mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
tests: Add test to check escaping quotes by using two of them
This commit is contained in:
@@ -213,6 +213,17 @@ void TestTable::parseNonASCIIChars()
|
||||
QVERIFY(tab.fields().at(0)->name() == "Fieldöäüß");
|
||||
}
|
||||
|
||||
void TestTable::parseSQLEscapedQuotes()
|
||||
{
|
||||
QString sSql = "CREATE TABLE double_quotes(a text default 'a''a');";
|
||||
|
||||
Table tab = Table::parseSQL(sSql).first;
|
||||
|
||||
QCOMPARE(tab.name(), QString("double_quotes"));
|
||||
QCOMPARE(tab.fields().at(0)->name(), QString("a"));
|
||||
QCOMPARE(tab.fields().at(0)->defaultValue(), QString("a''a"));
|
||||
}
|
||||
|
||||
void TestTable::createTableWithIn()
|
||||
{
|
||||
QString sSQL = "CREATE TABLE not_working("
|
||||
|
||||
Reference in New Issue
Block a user