From 3054e909176ee09333e9686e53f767c07c52693e Mon Sep 17 00:00:00 2001 From: Erindcl Date: Mon, 14 Dec 2020 11:23:40 +0800 Subject: [PATCH] feat(flin): add split sql test --- test/parser/flinksql/syntax.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/parser/flinksql/syntax.test.ts b/test/parser/flinksql/syntax.test.ts index 06e0289..f7dc3c1 100644 --- a/test/parser/flinksql/syntax.test.ts +++ b/test/parser/flinksql/syntax.test.ts @@ -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); + // }); });