|
@@ -26,19 +26,19 @@
|
|
|
expect(result).toBeFalsy();
|
|
expect(result).toBeFalsy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should not find errors for "SEL"', function () {
|
|
|
|
|
|
|
+ it('should report incomplete statement for "SEL"', function () {
|
|
|
var result = sqlSyntaxParser.parseSyntax('SEL', '');
|
|
var result = sqlSyntaxParser.parseSyntax('SEL', '');
|
|
|
- expect(result).toBeFalsy();
|
|
|
|
|
|
|
+ expect(result.incompleteStatement).toBeTruthy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should not find errors for "SELECT"', function () {
|
|
|
|
|
|
|
+ it('should report incomplete statement for "SELECT"', function () {
|
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT', '');
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT', '');
|
|
|
- expect(result).toBeFalsy();
|
|
|
|
|
|
|
+ expect(result.incompleteStatement).toBeTruthy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should not find errors for "SELECT "', function () {
|
|
|
|
|
|
|
+ it('should not report incomplete statement for "SELECT "', function () {
|
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT ', '');
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT ', '');
|
|
|
- expect(result).toBeFalsy();
|
|
|
|
|
|
|
+ expect(result.incompleteStatement).toBeTruthy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should not find errors for "SELECT *"', function () {
|
|
it('should not find errors for "SELECT *"', function () {
|
|
@@ -46,9 +46,9 @@
|
|
|
expect(result).toBeFalsy();
|
|
expect(result).toBeFalsy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should not find errors for "SELECT * FR"', function () {
|
|
|
|
|
|
|
+ it('should not report incomplete statement for "SELECT * FR"', function () {
|
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT * FR', '');
|
|
var result = sqlSyntaxParser.parseSyntax('SELECT * FR', '');
|
|
|
- expect(result).toBeFalsy();
|
|
|
|
|
|
|
+ expect(result.incompleteStatement).toBeTruthy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should find errors for "SLELECT "', function() {
|
|
it('should find errors for "SLELECT "', function() {
|