test: add several testcases

This commit is contained in:
Estevao Soares dos Santos 2017-04-23 02:04:13 +01:00
parent f3dff7b0cf
commit 1bca88f8fa
9 changed files with 25 additions and 9 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
<p><a href="www.google.com" target="_blank">foo</a></p>
<p>a link <a href="http://www.google.com" target="_blank">http://www.google.com</a></p>

View File

@ -0,0 +1,3 @@
[foo](www.google.com)
a link <http://www.google.com>

View File

@ -7,7 +7,8 @@ var bootstrap = require('../bootstrap.js'),
testsuite = bootstrap.getTestSuite('test/features/'),
tableSuite = bootstrap.getTestSuite('test/features/tables/'),
simplifiedAutoLinkSuite = bootstrap.getTestSuite('test/features/simplifiedAutoLink/'),
openLinksInNewWindowSuite = bootstrap.getTestSuite('test/features/openLinksInNewWindow/');
openLinksInNewWindowSuite = bootstrap.getTestSuite('test/features/openLinksInNewWindow/'),
disableForced4SpacesIndentedSublistsSuite = bootstrap.getTestSuite('test/features/disableForced4SpacesIndentedSublists/');
describe('makeHtml() features testsuite', function () {
'use strict';
@ -129,4 +130,14 @@ describe('makeHtml() features testsuite', function () {
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
}
});
// test disableForced4SpacesIndentedSublists support
describe('disableForced4SpacesIndentedSublists support in', function () {
var converter,
suite = disableForced4SpacesIndentedSublistsSuite;
for (var i = 0; i < suite.length; ++i) {
converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true});
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
}
});
});