feat(flin): add split sql test

This commit is contained in:
Erindcl 2020-12-14 11:23:40 +08:00
parent 504f6df2ec
commit 3054e90917

View File

@ -1,5 +1,6 @@
import SQLParser from '../../../src/parser/flinksql';
import sqlMockData from '../../mock/flinkSql';
import * as utils from '../../../src/utils';
describe('FlinkSQL Syntax Tests', () => {
const parser = new SQLParser();
@ -218,4 +219,13 @@ describe('FlinkSQL Syntax Tests', () => {
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
// test('Test complex sql Statement with splitSql', () => {
// const sql = sqlMockData.allSqlStr;
// const result = [];
// utils.splitSql(sql).forEach((ele) => {
// const tempRul = parser.validate(utils.cleanSql(ele));
// result.push(...tempRul);
// });
// expect(result.length).toBe(0);
// });
});