aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/Tests/LexerTest/tst_lexertest.cpp')
-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"