Skip to content

Commit

Permalink
test: add several testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Apr 23, 2017
1 parent f3dff7b commit 1bca88f
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 25 deletions.
40 changes: 29 additions & 11 deletions dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

Empty file.
2 changes: 2 additions & 0 deletions test/features/openLinksInNewWindow/simple-cases.html
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions test/features/openLinksInNewWindow/simple-cases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[foo](www.google.com)

a link <http://www.google.com>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
1. Hi, I am a thing

```sh
```sh

$ git clone thing.git
$ git clone thing.git

dfgdfg
```
dfgdfg
```

1. I am another thing!

```sh
```sh
$ git clone other-thing.git
$ git clone other-thing.git
foobar
```
foobar
```
13 changes: 12 additions & 1 deletion test/node/testsuite.features.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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));
}
});
});

0 comments on commit 1bca88f

Please sign in to comment.