diff --git a/test/test1983.js b/test/test1983.js new file mode 100644 index 000000000..88299b109 --- /dev/null +++ b/test/test1983.js @@ -0,0 +1,27 @@ +if (typeof exports === 'object') { + var assert = require('assert'); + var alasql = require('..'); +} + +const test = '1983'; // insert test file number + +describe('Test 1983 - multiple statements', function () { + + before(function () { + alasql('create database test' + test); + alasql('use test' + test); + alasql('CREATE TABLE a (anything string);') + }); + + after(function () { + alasql('drop database test' + test); + }); + + it('USING followed by name', function () { + assert.doesNotThrow(() => alasql('SELECT * FROM a a1 JOIN a a2 USING c;')); + }); + + it('USING followed by name in parathesis', function () { + assert.doesNotThrow(() => alasql('SELECT * FROM a a1 JOIN a a2 USING (c);')); + }); +});