]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add tests for italic and bold syntax
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Mon, 21 Dec 2015 05:16:05 +0000 (14:16 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Mon, 21 Dec 2015 05:16:05 +0000 (14:16 +0900)
Fix #137

test/syntax.vader

index bb9ef2fc06ff65d466e8b6fb77eae8b333b5f19c..607a153edc2f9cbcc714449669ec8f9a3a5ffa77 100644 (file)
@@ -1,6 +1,14 @@
 Given markdown;
 a **b** c
 
 Given markdown;
 a **b** c
 
+Execute (bold):
+  AssertNotEqual SyntaxOf('a'), 'htmlBold'
+  AssertEqual SyntaxOf('b'), 'htmlBold'
+  AssertNotEqual SyntaxOf('c'), 'htmlBold'
+
+Given markdown;
+a __b__ c
+
 Execute (bold):
   AssertNotEqual SyntaxOf('a'), 'htmlBold'
   AssertEqual SyntaxOf('b'), 'htmlBold'
 Execute (bold):
   AssertNotEqual SyntaxOf('a'), 'htmlBold'
   AssertEqual SyntaxOf('b'), 'htmlBold'
@@ -14,6 +22,48 @@ Execute (italic):
   AssertEqual SyntaxOf('b'), 'htmlItalic'
   AssertNotEqual SyntaxOf('c'), 'htmlItalic'
 
   AssertEqual SyntaxOf('b'), 'htmlItalic'
   AssertNotEqual SyntaxOf('c'), 'htmlItalic'
 
+Given markdown;
+a _b_ c
+
+Execute (italic):
+  AssertNotEqual SyntaxOf('a'), 'htmlItalic'
+  AssertEqual SyntaxOf('b'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('c'), 'htmlItalic'
+
+Given markdown;
+a \*b\* c
+
+Execute (not italic with escaped asterisks):
+  AssertNotEqual SyntaxOf('a'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('b'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('c'), 'htmlItalic'
+
+Given markdown;
+a \_b\_ c
+
+Execute (not italic with escaped underscores):
+  AssertNotEqual SyntaxOf('a'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('b'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('c'), 'htmlItalic'
+
+Given markdown;
+a _b\_c_ d
+
+Execute (italic with escaped underscores):
+  AssertNotEqual SyntaxOf('a'), 'htmlItalic'
+  AssertEqual SyntaxOf('b'), 'htmlItalic'
+  AssertEqual SyntaxOf('c'), 'htmlItalic'
+  AssertNotEqual SyntaxOf('d'), 'htmlItalic'
+
+Given markdown;
+a __b\_\_c__ d
+
+Execute (bold with escaped underscores):
+  AssertNotEqual SyntaxOf('a'), 'htmlBold'
+  AssertEqual SyntaxOf('b'), 'htmlBold'
+  AssertEqual SyntaxOf('c'), 'htmlBold'
+  AssertNotEqual SyntaxOf('d'), 'htmlBold'
+
 # Links
 
 Given markdown;
 # Links
 
 Given markdown;