Skip to content

Commit

Permalink
Add a group of old test documents
Browse files Browse the repository at this point in the history
These are being added as text files only for now.  No ert tests actually
use these files yet.  Thanks to all who contributed these many test
cases in years past.

Also, ignore a bunch of other directories in my local working copy :)
  • Loading branch information
jrblevin committed Jan 15, 2016
1 parent b1eff38 commit e5c414d
Show file tree
Hide file tree
Showing 7 changed files with 828 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.elc
index.text
archive
reference
attic
patches
extra
143 changes: 143 additions & 0 deletions tests/GFM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Strikethrough

~~This text should be parsed as _strikethroughed_.~~

~~There may be __bold__ or _italic_ text inside strikethroughed text.~~

~~There may be a keyboard shortcut like <kbd>Enter</kbd> inside strikethroughed text.~~

__There may be ~~strikethroughed text~~ inside bold text.__
_There may be ~~strikethroughed text~~ inside italic text._

~~ If there is a space in the beginning or end, it won't work as per the [GFM][GFM] docs ~~

~~Strikethrough can be applied to
multiple lines. Just keep in mind
not to put any space in the beginning or end.~~

# Underscore In Words

The word `complicated` must be neither bold nor italic below:

perform_complicated_task
perform__complicated__task

But the first part below is italic and bold respectively:

_perform_complicated_task
__perform__complicated__task

# Keyboard Shortcuts

Keyboard shortcuts below should be highlighted:

---

A keyboard shortcut <kbd>Enter</kbd> can be in paragraph.

* A keyboard shortcut <kbd>Enter</kbd> can be in list.

_A keyboard shortcut <kbd>Enter</kbd> can be in italic._
__A keyboard shortcut <kbd>Enter</kbd> can be in bold.__

~~A keyboard shortcut <kbd>Enter</kbd> can be in deleted text.~~

<p>A keyboard shortcut <kbd>Enter</kbd> can be in HTML.</p>

<div>
A keyboard shortcut <kbd>Enter</kbd> can be in block level tags.
</div>

# Fenced Code Blocks

## In / Near List Items

Below fenced code blocks _should_ be highlighted.

---

* List item

```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

* List item

```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

---

Below are _not_ valid fenced code blocks according to the [GFM docs][GFM]. It says there must be a blank line before the code block. However, GitHub highlights them. So, they _should_ be highlighted.

---

* List item
```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

* List item
```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

## In / Near Paragraphs

Below is _not_ a _fenced_ code block, just a normal code block.

---

Paragraph

```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

---

Below 2 blocks are fenced code blocks. They _should_ be highlighted.

---

Paragraph

```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

Paragraph
```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

---

Below is not any type of code block. It _should not_ be highlighted.

---

Paragraph
```js
for (var i = 0; i < 10; i++) {
console.log(i);
}
```

[GFM]: https://help.github.com/articles/github-flavored-markdown
120 changes: 120 additions & 0 deletions tests/Markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Source: https://github.com/textmate/markdown.tmbundle/blob/master/Tests/test-minimal.markdown

Inline styles
===============

_italic_

_italic one_ not italic _italic two_

_italic\__

_italic \__

stuff * not italic*

*italic__*

_all _ italic_

_italic
end italic_

\\\\_italic\\_

\\\\_italic\\\_\\\\_

\\\\_italic\\_

\_ not italic _

_not italic _

\\\\_not italic\_

_not italic \_

\\\_not italic\\_

_not italic

not end italic_

__bold__

**bold\***

___bold_and_italic___

***bold_and_italic***

`raw more`

``dobule ` raw``

`raw \` more`

Headings
================

heading 2
----------

## heading 2

### heading 3

###### heading 6

Horizontal lines
=================

***

* * *

___

__ __ __

- - -

----------------


Block formatting
================

Lists
----------------

* This *is a list!*
* This is another list item.
But this one spans *two* lines.
* Another list item with __inline__ formatting
* This one is tricky
* *This is a list*

Because this should still be a list item.

1. This is a list item too
2. This list is numbered

1986\. This shouldn't be a list.

Code block
---------------

asdfsdafasdf
This is code.
Isn't it pretty!

Quotes
---------------

> Here is a quote block
This quote continues on. Line breaking is OK in markdown
> Here it is again
> Lah-di-dah
> I should really match headings in here too:
> ## This is a heading in a block quote
19 changes: 19 additions & 0 deletions tests/itex.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LaTeX/itex Tests
================

Test unnumbered display mode equation:
$$ y = mx + b $$

Test unnumbered display mode equation on multiple lines:
$$
y = mx + b
$$

Test numbered display mode equation:
\[ y = mx + b \]

Test numbered display mode equation on multiple lines:
\[
\label{test}
y = \psi(mx + b)
\]
57 changes: 57 additions & 0 deletions tests/more-lists.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Ordered, without paragraphs:

1. Foo
2. Bar

Unordered, with paragraphs:

* A list item.

With multiple paragraphs.

* Bar

Nested lists:

* Bubbles
1. bunk
2. bupkis
* BELITTLER
3. burper
* Abacus
* answer
* Cunning

A complex, multiply-nested list:

* Unordered stuff
with overhang

4. fourth nested

2. second nested

0. zeroth nested

* More unordered stuff

0. zeroth nested
2. second nested
4. fourth nested

Nested ordered lists:

1. first

0. zeroth nested
2. second nested
4. fourth nested

2. second

1. first nested
3. third nested

3. third

4. fourth
30 changes: 30 additions & 0 deletions tests/r-markdown-test.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% Test example
% Mathieu Basille
% September 11, 2013

# First section

## And a sub-section

```{r sum}
2+2
```

Some text...


## Second sub-section

Some more text, and the faulty chunk with comments:

```{r comments}
2+2
## Wait, still 4?
```

And text you will never see again!


# Second section

More text...
Loading

0 comments on commit e5c414d

Please sign in to comment.