Permalink
Browse files

add test for valid_plugin_syntax?()

git-svn-id: http://hikidoc.rubyforge.org/svn/trunk@113 a4544477-fcff-0310-b425-9d56a9aeec48
  • Loading branch information...
1 parent 2a071d7 commit 471957b7ac5df1e3f081563bf4c4e2d3f9ce0fce kimuraw committed Aug 14, 2009
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/test_hikidoc.rb
View
17 test/test_hikidoc.rb
@@ -38,6 +38,23 @@ def test_plugin_with_meta_char
'a{{hoge("<a>")}}')
end
+ def test_plugin_with_default_syntax
+ assert_convert(%q!<p>{{'}}</p>! + "\n",
+ %q!{{'}}!)
+ assert_convert(%q!<p>{{\"}}</p>! + "\n",
+ %q!{{\"}}!)
+ assert_convert(%q!<div class="plugin">{{''}}</div>! + "\n",
+ %q!{{''}}!)
+ assert_convert(%q!<p>{{'"}}</p>! + "\n",
+ %q!{{'"}}!)
+ assert_convert(%q!<div class="plugin">{{'\''}}</div>! + "\n",
+ %q!{{'\''}}!)
+ assert_convert(%q!<p>{{\"""}}</p>! + "\n",
+ %q!{{\"""}}!)
+ assert_convert(%q!<div class="plugin">{{"ab\c"}}</div>! + "\n",
+ %q!{{"ab\c"}}!)
+ end
+
def test_plugin_with_custom_syntax
assert_convert("<p>{{&lt;&lt;\"End\"\nfoo's bar\nEnd\n}}</p>\n",
"{{<<\"End\"\nfoo's bar\nEnd\n}}")

0 comments on commit 471957b

Please sign in to comment.