]> 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:

Move test/folding.md to test/folding.vader
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Tue, 8 Dec 2015 06:36:34 +0000 (15:36 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Tue, 8 Dec 2015 09:06:53 +0000 (18:06 +0900)
Fix #73

test/folding.md [deleted file]
test/folding.vader [new file with mode: 0644]

diff --git a/test/folding.md b/test/folding.md
deleted file mode 100644 (file)
index 09ede4d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Title
-
-## Chapter 1
-
-```
-This is code block
-# This is just a comment
-```
-
-## Capter 2
-
-foobar
-
-==+ Fold Level 1
-
---+ Fold Level 2
diff --git a/test/folding.vader b/test/folding.vader
new file mode 100644 (file)
index 0000000..ee20975
--- /dev/null
@@ -0,0 +1,38 @@
+Before:
+  source ../after/ftplugin/markdown.vim
+
+After:
+  setlocal foldexpr=0
+  setlocal foldmethod=manual
+
+Given markdown;
+# Title
+
+## Chapter 1
+
+```
+This is code block
+# This is just a comment
+```
+
+## Capter 2
+
+foobar
+
+Execute (fold level # in code block):
+  AssertEqual foldlevel(1), 0, '# Title'
+  AssertEqual foldlevel(3), 1, '## Chapter 1'
+  AssertEqual foldlevel(7), 2, '# This is just a comment'
+  AssertEqual foldlevel(8), 2, '```'
+  AssertEqual foldlevel(10), 1, '## Chapter 2'
+  AssertEqual foldlevel(12), 2, 'foobar'
+
+Given markdown;
+
+==+ Fold Level 1
+
+--+ Fold Level 2
+
+Execute (fold level ==+, --+):
+  AssertEqual foldlevel(2), 1, '==+'
+  AssertEqual foldlevel(4), 2, '--+'