diff --git a/test/data/mysql_test_case_6.html b/test/data/mysql_test_case_6.html new file mode 100644 index 00000000..584c6bef --- /dev/null +++ b/test/data/mysql_test_case_6.html @@ -0,0 +1,226 @@ + +
+ +
+ + diff --git a/test/parser.js b/test/parser.js index 466b9eb4..f98128cc 100644 --- a/test/parser.js +++ b/test/parser.js @@ -382,6 +382,40 @@ module.exports = function () { done(); }); }); + test('test case 6', function (done) { + const $ = cheerio.load(fs.readFileSync(__dirname + '/data/mysql_test_case_6.html')); + MySQL.parsePage($, function (resultData) { + expect(resultData).to.deep.equal([ + { + cli: '--auto-increment-increment=#', + default: '1', + dynamic: true, + id: 'sysvar_auto_increment_increment', + name: 'auto_increment_increment', + range: { + from: 1, + to: 65535, + }, + scope: ['global', 'session'], + type: 'integer', + }, + { + cli: '--auto-increment-offset=#', + default: '1', + dynamic: true, + id: 'sysvar_auto_increment_offset', + name: 'auto_increment_offset', + range: { + from: 1, + to: 65535, + }, + scope: ['global', 'session'], + type: 'integer', + }, + ]); + done(); + }); + }); }); suite('MariaDB parser', function () { test('test case 1', function (done) {