summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorit33 <iantien@gmail.com>2015-12-09 03:58:15 -0800
committerit33 <iantien@gmail.com>2015-12-09 03:58:15 -0800
commitfc6ba52bca127f3e7e022ee08327cb488fe3168d (patch)
tree3d55c360f810795b056c5c2720a877c7cf10d1d5 /doc
parent5ba6af1f6cf78d4d1172e64760d072bcc8baf1c8 (diff)
parent91724014b8c8b577f2155f27df5eacbe1cb72a66 (diff)
downloadchat-fc6ba52bca127f3e7e022ee08327cb488fe3168d.tar.gz
chat-fc6ba52bca127f3e7e022ee08327cb488fe3168d.tar.bz2
chat-fc6ba52bca127f3e7e022ee08327cb488fe3168d.zip
Merge pull request #1665 from mattermost/lfbrock-patch-2
Update markdown tests
Diffstat (limited to 'doc')
-rw-r--r--doc/developer/tests/test-markdown-lists.md53
-rw-r--r--doc/developer/tests/test-syntax-highlighting.md231
-rw-r--r--doc/developer/tests/test-tables.md80
3 files changed, 357 insertions, 7 deletions
diff --git a/doc/developer/tests/test-markdown-lists.md b/doc/developer/tests/test-markdown-lists.md
index 905350d31..d5bbd82ac 100644
--- a/doc/developer/tests/test-markdown-lists.md
+++ b/doc/developer/tests/test-markdown-lists.md
@@ -21,6 +21,7 @@ Verify that all list types render as expected.
```
**Actual:**
+
3. One
2. Two
1. Three
@@ -38,12 +39,13 @@ Verify that all list types render as expected.
```
**Actual:**
-1. Alpha
- 1. Bravo
+
+1. Alpha
+ 1. Bravo
1. Charlie
1. Delta
- 1. Echo
- 1. Foxtrot
+ 1. Echo
+ 1. Foxtrot
### Single-item Unordered List
@@ -99,6 +101,7 @@ Verify that all list types render as expected.
```
**Actual:**
+
1. One
+ Two
- Three
@@ -169,10 +172,11 @@ Verify that all list types render as expected.
```
**Actual:**
+
1. One
- - Two
-
-
+ - Two
+
+
1. One
2. Two
@@ -186,7 +190,42 @@ This text should be on a new line.
```
**Actual:**
+
1. One
- Two
This text should be on a new line.
+### Task Lists
+
+**Expected:**
+```
+[ ] One
+ [ ] Subpoint one
+ - Normal Bullet
+[ ] Two
+[x] Completed item
+```
+
+**Actual:**
+
+- [ ] One
+ - [ ] Subpoint one
+ - Normal Bullet
+- [ ] Two
+- [x] Completed item
+
+### Numbered Task Lists
+
+**Expected:**
+```
+1. [ ] One
+2. [ ] Two
+3. [x] Completed item
+```
+
+**Actual:**
+
+1. [ ] One
+2. [ ] Two
+3. [x] Completed item
+
diff --git a/doc/developer/tests/test-syntax-highlighting.md b/doc/developer/tests/test-syntax-highlighting.md
new file mode 100644
index 000000000..7f8f4cdaa
--- /dev/null
+++ b/doc/developer/tests/test-syntax-highlighting.md
@@ -0,0 +1,231 @@
+# Code Syntax Highlighting
+
+Verify the following code blocks render as code blocks and highlight properly.
+
+### Diff
+
+``` diff
+*** /path/to/original ''timestamp''
+--- /path/to/new ''timestamp''
+***************
+*** 1 ****
+! This is a line.
+--- 1 ---
+! This is a replacement line.
+It is important to spell
+-removed line
++new line
+```
+
+### Apache
+
+``` apache
+<VirtualHost *:80>
+DocumentRoot /www/example1
+ServerName www.example.com
+</VirtualHost>
+```
+
+### Makefile
+
+``` makefile
+CC=gcc
+CFLAGS=-I.
+
+hellomake: hellomake.o hellofunc.o
+ $(CC) -o hellomake hellomake.o hellofunc.o -I.
+```
+
+### HTTP
+
+``` http
+HTTP/1.1 200 OK
+Date: Sun, 28 Dec 2014 08:56:53 GMT
+Content-Length: 44
+Content-Type: text/html
+
+<html><body><h1>It works!</h1></body></html>
+```
+
+### JSON
+
+``` json
+{"employees":[
+ {"firstName":"John", "lastName":"Doe"},
+]}
+```
+
+### Markdown
+
+``` markdown
+**bold**
+*italics*
+[link](www.example.com)
+```
+
+### JavaScript
+
+``` javascript
+document.write('Hello, world!');
+```
+
+### CSS
+
+``` css
+body {
+ background-color: red;
+}
+```
+
+### NGINX
+
+``` nginx
+server { # simple reverse-proxy
+ listen 80;
+ server_name domain2.com www.domain2.com;
+ access_log logs/domain2.access.log main;
+```
+
+### Objective C
+
+``` objectivec
+#import <stdio.h>
+
+int main (void)
+{
+ printf ("Hello world!\n");
+}
+```
+
+### Python
+
+``` python
+print "Hello, world!"
+```
+
+### XML
+
+``` xml
+<employees>
+ <employee>
+ <firstName>John</firstName> <lastName>Doe</lastName>
+ </employee>
+</employees>
+```
+
+### Perl
+
+``` perl
+print "Hello, World!\n";
+```
+
+### Bash
+
+``` bash
+echo "Hello World"
+```
+
+### PHP
+
+``` php
+ <?php echo '<p>Hello World</p>'; ?>
+```
+
+### CoffeeScript
+
+``` coffee
+console.log(“Hello world!”);
+```
+
+### C#
+
+``` cs
+using System;
+class Program
+{
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("Hello, world!");
+ }
+}
+```
+
+### C++
+
+``` cpp
+#include <iostream.h>
+
+main()
+{
+ cout << "Hello World!";
+ return 0;
+}
+```
+
+### SQL
+
+``` sql
+SELECT column_name,column_name
+FROM table_name;
+```
+
+### Go
+
+``` go
+package main
+import "fmt"
+func main() {
+ fmt.Println("Hello, 世界")
+}
+```
+
+### Ruby
+
+``` ruby
+puts "Hello, world!"
+```
+
+### Java
+
+``` java
+import javax.swing.JFrame; //Importing class JFrame
+import javax.swing.JLabel; //Importing class JLabel
+public class HelloWorld {
+ public static void main(String[] args) {
+ JFrame frame = new JFrame(); //Creating frame
+ frame.setTitle("Hi!"); //Setting title frame
+ frame.add(new JLabel("Hello, world!"));//Adding text to frame
+ frame.pack(); //Setting size to smallest
+ frame.setLocationRelativeTo(null); //Centering frame
+ frame.setVisible(true); //Showing frame
+ }
+}
+```
+
+### INI
+
+``` ini
+; last modified 1 April 2011 by John Doe
+[owner]
+name=John Doe
+organization=Mattermost
+```
+
+### Latex Equation
+
+``` latex
+\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).
+```
+
+### Latex Document
+
+``` latex
+\documentclass{article}
+\begin{document}
+\noindent
+Are $a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} $ \\
+better \\
+are $a, b \in \mathbb{R}, \textrm{then applies} \, (a+b)^{2 } = a^{2 } + ab + b^{2}$\\
+\end{document}
+```
+
diff --git a/doc/developer/tests/test-tables.md b/doc/developer/tests/test-tables.md
new file mode 100644
index 000000000..87d8af856
--- /dev/null
+++ b/doc/developer/tests/test-tables.md
@@ -0,0 +1,80 @@
+# Markdown Tables
+
+Verify that all tables render as described.
+
+### Normal Tables
+
+These tables use different raw text as inputs, but all three should render as the same table.
+
+#### Table 1
+
+Raw text:
+
+```
+First Header | Second Header
+------------- | -------------
+Content Cell | Content Cell
+Content Cell | Content Cell
+```
+
+Renders as:
+
+First Header | Second Header
+------------- | -------------
+Content Cell | Content Cell
+Content Cell | Content Cell
+
+#### Table 2
+
+Raw Text:
+
+```
+| First Header | Second Header |
+| ------------- | ------------- |
+| Content Cell | Content Cell |
+| Content Cell | Content Cell |
+```
+
+Renders as:
+
+| First Header | Second Header |
+| ------------- | ------------- |
+| Content Cell | Content Cell |
+| Content Cell | Content Cell |
+
+#### Table 3
+
+Raw Text:
+
+```
+| First Header | Second Header |
+| ------------- | ----------- |
+| Content Cell | Content Cell|
+| Content Cell | Content Cell |
+```
+
+Renders as:
+
+| First Header | Second Header |
+| ------------- | ----------- |
+| Content Cell | Content Cell|
+| Content Cell | Content Cell |
+
+### Tables Containing Markdown
+
+This table should contain A1: Strikethrough, A2: Bold, B1: Italics, B2: Dolphin emoticon.
+
+| Column\Row | 1 | 2 |
+| ------------- | ------------- |------------- |
+| A | ~~Strikethrough~~ | **Bold** |
+| B | _italics_ | :dolphin: |
+
+### Table with Left, Center, and Right Aligned Columns
+
+The left column should be left aligned, the center column centered and the right column should be right aligned.
+
+| Left-Aligned | Center Aligned | Right Aligned |
+| :------------ |:---------------:| -----:|
+| 1 | this text | $100 |
+| 2 | is | $10 |
+| 3 | centered | $1 |