2024-03-27 10:33:25 +08:00
|
|
|
import { MySQL } from 'src/parser/mysql';
|
2023-11-27 15:25:40 +08:00
|
|
|
|
|
|
|
describe('MySQL Lexer tests', () => {
|
2024-03-27 10:33:25 +08:00
|
|
|
const mysql = new MySQL();
|
2023-11-27 15:25:40 +08:00
|
|
|
|
|
|
|
const sql = 'select id,name,sex from user1;';
|
2024-03-27 10:33:25 +08:00
|
|
|
const tokens = mysql.getAllTokens(sql);
|
2023-11-27 15:25:40 +08:00
|
|
|
|
|
|
|
test('token counts', () => {
|
|
|
|
expect(tokens.length).toBe(12);
|
|
|
|
});
|
|
|
|
});
|