mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
test: add several testcases
This commit is contained in:
parent
f3dff7b0cf
commit
1bca88f8fa
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
2
test/features/openLinksInNewWindow/simple-cases.html
Normal file
2
test/features/openLinksInNewWindow/simple-cases.html
Normal 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>
|
3
test/features/openLinksInNewWindow/simple-cases.md
Normal file
3
test/features/openLinksInNewWindow/simple-cases.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[foo](www.google.com)
|
||||||
|
|
||||||
|
a link <http://www.google.com>
|
|
@ -1,17 +1,17 @@
|
||||||
1. Hi, I am a thing
|
1. Hi, I am a thing
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
||||||
$ git clone thing.git
|
$ git clone thing.git
|
||||||
|
|
||||||
dfgdfg
|
dfgdfg
|
||||||
```
|
```
|
||||||
|
|
||||||
1. I am another thing!
|
1. I am another thing!
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
||||||
$ git clone other-thing.git
|
$ git clone other-thing.git
|
||||||
|
|
||||||
foobar
|
foobar
|
||||||
```
|
```
|
||||||
|
|
|
@ -7,7 +7,8 @@ var bootstrap = require('../bootstrap.js'),
|
||||||
testsuite = bootstrap.getTestSuite('test/features/'),
|
testsuite = bootstrap.getTestSuite('test/features/'),
|
||||||
tableSuite = bootstrap.getTestSuite('test/features/tables/'),
|
tableSuite = bootstrap.getTestSuite('test/features/tables/'),
|
||||||
simplifiedAutoLinkSuite = bootstrap.getTestSuite('test/features/simplifiedAutoLink/'),
|
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 () {
|
describe('makeHtml() features testsuite', function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -129,4 +130,14 @@ describe('makeHtml() features testsuite', function () {
|
||||||
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
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));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user