Browse Source

Started adding remarkable-specific tests

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
4e4a43a0a5
  1. 13
      test/fixtures/remarkable/README.md
  2. 8
      test/fixtures/remarkable/code/fence_matching.html
  3. 10
      test/fixtures/remarkable/code/fence_matching.md
  4. 24
      test/fixtures/remarkable/code/fenced_code_blocks.html
  5. 35
      test/fixtures/remarkable/code/fenced_code_blocks.md
  6. 5
      test/fixtures/remarkable/strikeout.txt
  7. 30
      test/fixtures/remarkable/typographer.txt
  8. 5
      test/remarkable.js

13
test/fixtures/remarkable/README.md

@ -1,13 +0,0 @@
We need to track compatibility with another implementation.
- By default try to use fixtures from another packs
- `remarked` / `marked` fixtures are preferable, because stmd data
is partially outdated.
- If fixtures are missed or conflicting - create new ones here.
Rules:
1. Keep folders structure similar to [stmd](https://github.com/jgm/stmd) tests.
2. Don't forget to write case descriptions in fixtures.
3. Keep file name in lowercase, with underline for words separation.

8
test/fixtures/remarkable/code/fence_matching.html

@ -1,8 +0,0 @@
<pre><code class="abc">```
</code></pre>
<pre><code class="blah">
`````
````
</code></pre>

10
test/fixtures/remarkable/code/fence_matching.md

@ -1,10 +0,0 @@
````abc
```
````
``````blah
`````
````
```````````

24
test/fixtures/remarkable/code/fenced_code_blocks.html

@ -1,24 +0,0 @@
<p>This is a fenced code block:</p>
<pre><code class="haskell">pairs :: [(Int,Char)]
pairs = [(x,y) | x &lt;- [0..10], y &lt;- ['a'..'z']]
</code></pre>
<p>Here is one with tildes:</p>
<pre><code class="haskell">pairs :: [(Int,Char)]
pairs = [(x,y) | x &lt;- [0..10], y &lt;- ['a'..'z']]
</code></pre>
<p>More metadata:</p>
<pre><code class="haskell">pairs :: [(Int,Char)]
pairs = [(x,y) | x &lt;- [0..10], y &lt;- ['a'..'z']]
</code></pre>
<p>More backticks:</p>
<pre><code class="haskell">pairs :: [(Int,Char)]
pairs = [(x,y) | x &lt;- [0..10], y &lt;- ['a'..'z']]
backticks :: String
backticks = &quot;`````&quot;
</code></pre>
<p>Without an end:</p>
<pre><code>code with
no end
</code></pre>

35
test/fixtures/remarkable/code/fenced_code_blocks.md

@ -1,35 +0,0 @@
This is a fenced code block:
```haskell
pairs :: [(Int,Char)]
pairs = [(x,y) | x <- [0..10], y <- ['a'..'z']]
```
Here is one with tildes:
~~~ haskell
pairs :: [(Int,Char)]
pairs = [(x,y) | x <- [0..10], y <- ['a'..'z']]
~~~
More metadata:
```haskell numberLines start=50
pairs :: [(Int,Char)]
pairs = [(x,y) | x <- [0..10], y <- ['a'..'z']]
```
More backticks:
```````` haskell
pairs :: [(Int,Char)]
pairs = [(x,y) | x <- [0..10], y <- ['a'..'z']]
backticks :: String
backticks = "`````"
`````````````
Without an end:
```
code with
no end

5
test/fixtures/remarkable/strikeout.txt

@ -0,0 +1,5 @@
.
~~Strikeout~~
.
<p><del>Strikeout</del></p>
.

30
test/fixtures/remarkable/typographer.txt

@ -0,0 +1,30 @@
copyright
.
(c) (C)
.
<p>© ©</p>
.
reserved
.
(r) (R)
.
<p>® ®</p>
.
trademark
.
(tm) (TM)
.
<p>™ ™</p>
.
plus-minus
.
+/-5
.
<p>±5</p>
.

5
test/remarkable.js

@ -12,8 +12,9 @@ var Remarked = require('../');
describe('Default', function () { describe('Default', function () {
var md = new Remarked({ var md = new Remarked({
breaks: false, breaks: false,
langPrefix: '' langPrefix: '',
typographer: true
}); });
utils.addTests(path.join(__dirname, 'fixtures/remarkable'), md); utils.addSpecTests(path.join(__dirname, 'fixtures/remarkable'), md);
}); });

Loading…
Cancel
Save