summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/Tests/LexerTest
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
commit3565aad630864ecdbe53fdaa501ea708555b3c7c (patch)
treec743e4ad0bad39ebdb2f514c7cc52d34a257ebbe /SQLiteStudio3/Tests/LexerTest
parent1fdc150116cad39aae5c5da407c3312b47a59e3a (diff)
New upstream version 3.4.4+dfsg.upstream/3.4.4+dfsg
Diffstat (limited to 'SQLiteStudio3/Tests/LexerTest')
-rw-r--r--SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp b/SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp
index 0e44e7d..abdc76f 100644
--- a/SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp
+++ b/SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp
@@ -16,6 +16,7 @@ class LexerTest : public QObject
void testHex1();
void testHex2();
void testBindParam1();
+ void testBlobLiteral();
};
LexerTest::LexerTest()
@@ -89,6 +90,16 @@ void LexerTest::testBindParam1()
QVERIFY(bindTokens[4]->value == "@id");
}
+void LexerTest::testBlobLiteral()
+{
+ QString sql = "SELECT X'010f0E'";
+
+ Lexer lex;
+ TokenList tokens = lex.tokenize(sql);
+ QCOMPARE(tokens.size(), 3);
+ QCOMPARE(tokens[2]->value, "X'010f0E'");
+}
+
QTEST_APPLESS_MAIN(LexerTest)
#include "tst_lexertest.moc"