Permalink
Browse files

Copy test files (#134)

  • Loading branch information...
1 parent 1a250bf commit d61650cbc80b72cbeb44cca52006a6310b61bd20 @kaos kaos committed Mar 1, 2014
Showing with 941 additions and 0 deletions.
  1. +15 −0 test/erlydtl_custom_tags.erl
  2. +8 −0 test/files/expect/autoescape
  3. +11 −0 test/files/expect/block_super
  4. +15 −0 test/files/expect/comment
  5. +23 −0 test/files/expect/custom_call
  6. +33 −0 test/files/expect/custom_tag
  7. +47 −0 test/files/expect/cycle
  8. +3 −0 test/files/expect/extend_recursive_block
  9. +11 −0 test/files/expect/extends
  10. +14 −0 test/files/expect/extends_path
  11. +10 −0 test/files/expect/extends_path2
  12. +47 −0 test/files/expect/filters
  13. +13 −0 test/files/expect/for
  14. +7 −0 test/files/expect/for_list
  15. +7 −0 test/files/expect/for_list_preset
  16. +13 −0 test/files/expect/for_preset
  17. +13 −0 test/files/expect/for_records
  18. +23 −0 test/files/expect/for_records_preset
  19. +7 −0 test/files/expect/for_tuple
  20. +4 −0 test/files/expect/if
  21. +4 −0 test/files/expect/if_preset
  22. +28 −0 test/files/expect/ifequal
  23. +28 −0 test/files/expect/ifequal_preset
  24. +28 −0 test/files/expect/ifnotequal
  25. +28 −0 test/files/expect/ifnotequal_preset
  26. +2 −0 test/files/expect/include
  27. +12 −0 test/files/expect/include_path
  28. +14 −0 test/files/expect/include_template
  29. +6 −0 test/files/expect/recursive_block
  30. +2 −0 test/files/expect/ssi
  31. +1 −0 test/files/expect/trans
  32. +5 −0 test/files/expect/var
  33. +9 −0 test/files/expect/var_preset
  34. +8 −0 test/files/input/autoescape
  35. +11 −0 test/files/input/base
  36. +3 −0 test/files/input/block_super
  37. +17 −0 test/files/input/comment
  38. +7 −0 test/files/input/custom_call
  39. +12 −0 test/files/input/custom_tag
  40. +1 −0 test/files/input/custom_tag1
  41. +1 −0 test/files/input/custom_tag2
  42. +1 −0 test/files/input/custom_tag3
  43. +1 −0 test/files/input/custom_tag4
  44. +9 −0 test/files/input/cycle
  45. +5 −0 test/files/input/extend_recursive_block
  46. +3 −0 test/files/input/extends
  47. +4 −0 test/files/input/extends2
  48. +3 −0 test/files/input/extends3
  49. +3 −0 test/files/input/extends_path
  50. +6 −0 test/files/input/extends_path2
  51. +47 −0 test/files/input/filters
  52. +9 −0 test/files/input/for
  53. +3 −0 test/files/input/for_list
  54. +3 −0 test/files/input/for_list_preset
  55. +9 −0 test/files/input/for_preset
  56. +9 −0 test/files/input/for_records
  57. +15 −0 test/files/input/for_records_preset
  58. +3 −0 test/files/input/for_tuple
  59. +4 −0 test/files/input/if
  60. +4 −0 test/files/input/if_preset
  61. +43 −0 test/files/input/ifequal
  62. +43 −0 test/files/input/ifequal_preset
  63. +43 −0 test/files/input/ifnotequal
  64. +43 −0 test/files/input/ifnotequal_preset
  65. +1 −0 test/files/input/include
  66. +1 −0 test/files/input/include.html
  67. +5 −0 test/files/input/include_path
  68. +3 −0 test/files/input/include_template
  69. +11 −0 test/files/input/now
  70. +6 −0 test/files/input/path1/base1
  71. +5 −0 test/files/input/path1/base2
  72. +1 −0 test/files/input/path1/include1
  73. +5 −0 test/files/input/path1/template1
  74. +14 −0 test/files/input/path2/base2
  75. +2 −0 test/files/input/path2/template2
  76. +6 −0 test/files/input/recursive_block
  77. +1 −0 test/files/input/ssi
  78. +1 −0 test/files/input/ssi_include.html
  79. +1 −0 test/files/input/trans
  80. +5 −0 test/files/input/var
  81. +9 −0 test/files/input/var_preset
@@ -0,0 +1,15 @@
+-module(erlydtl_custom_tags).
+
+-export([custom1/1, custom2/2, custom3/2, custom4/1]).
+
+custom1(_TagVars = []) ->
+ <<"b1">>.
+
+custom2([], _RenderOptions = [{locale, ru}, {foo, bar}]) ->
+ <<"b2">>.
+
+custom3([], _RenderOptions = [{locale, ru}]) ->
+ <<"b3">>.
+
+custom4(_TagVars = [<<"a">>]) ->
+ <<"a">>.
@@ -0,0 +1,8 @@
+
+ This is escaped: &lt;b&gt;bold&lt;/b&gt;
+
+ This is not escaped: <b>bold</b>
+
+ This is escaped: &lt;b&gt;bold&lt;/b&gt;
+
+
@@ -0,0 +1,11 @@
+base-barstring
+
+base template
+
+extending title: "base title"
+
+more of base template
+
+replacing the base content - variable: test-barstring after variable. Was: base content
+
+end of base template
View
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Test Comment</title>
+ </head>
+ <body>
+
+ bla
+
+ blue
+
+ black
+ </body>
+</html>
@@ -0,0 +1,23 @@
+>>>> before custom call tag 'comment'
+before
+
+<ul>
+
+ <li>preset-apple</li>
+
+ <li>preset-banana</li>
+
+ <li>preset-coconut</li>
+
+</ul>
+
+after
+>>>> after custom call tag 'comment'
+
+>>>> before custom call tag 'if'
+One but not two: two
+Two but not one: one
+One:
+None:
+
+>>>> after custom call tag 'if'
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Test variable</title>
+ </head>
+ <body>
+ before
+ <object id="myvideo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
+ <param name="movie" value="/static/mediaplayer.swf">
+ <param name="allowfullscreen" value="true">
+ <param name="menu" value="false">
+ <param name="flashvars" value="file=/myvid.mp4&image=/mypic.jpg">
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="/static/mediaplayer.swf" width="800" height="620">
+ <param name="allowfullscreen" value="true">
+ <param name="menu" value="false">
+ <param name="flashvars" value="file=/myvid.mp4&image=/mypic.jpg">
+ <!--<![endif]-->
+ <h2>To view the Video:</h2>
+ <p>
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player">
+ </a>
+ </p>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+</object>
+
+ after
+ </body>
+</html>
View
@@ -0,0 +1,47 @@
+before
+
+<ul>
+
+<li>1. 1 - Apple</li>
+
+<li>2. 2 - Banana</li>
+
+<li>3. 3 - Cherry</li>
+
+<li>4. 4 - Apple</li>
+
+<li>5. 5 - Banana</li>
+
+<li>6. 6 - Cherry</li>
+
+<li>7. 7 - Apple</li>
+
+<li>8. 8 - Banana</li>
+
+<li>9. 9 - Cherry</li>
+
+<li>10. 10 - Apple</li>
+
+<li>11. 11 - Banana</li>
+
+<li>12. 12 - Cherry</li>
+
+<li>13. 13 - Apple</li>
+
+<li>14. 14 - Banana</li>
+
+<li>15. 15 - Cherry</li>
+
+<li>16. 16 - Apple</li>
+
+<li>17. 17 - Banana</li>
+
+<li>18. 18 - Cherry</li>
+
+<li>19. 19 - Apple</li>
+
+<li>20. 20 - Banana</li>
+
+</ul>
+
+after
@@ -0,0 +1,3 @@
+
+ extended content
+
View
@@ -0,0 +1,11 @@
+base-barstring
+
+base template
+
+replacing the base title
+
+more of base template
+
+replacing the base content - variable: test-barstring after variable
+
+end of base template
@@ -0,0 +1,14 @@
+base-barstring
+
+base2 template
+
+replacing the base title
+block title 2 from base1
+
+more of base2 template
+
+replacing the base content - variable: test-barstring after variable
+
+block content2 in base 2, should pass through
+
+end of base2 template
@@ -0,0 +1,10 @@
+pre content
+
+
+start_content
+This is include1
+
+end_content
+
+
+post
View
@@ -0,0 +1,47 @@
+
+Add: 2 + 2 = 4
+
+Capfirst: Capitalized
+
+Centered:
+<pre>
+ center
+</pre>
+
+Date format: Thu, 24 Jul 1975
+DateTime format: Thu, 24 Jul 1975 07:13:01
+
+Escape JS: \u0022 \u0027
+
+First letter: f
+
+Fix ampersands: &amp;
+
+Force_escape: &lt;b&gt;&lt;/b&gt;
+
+Joined: eins, zwei, drei
+
+Last: t
+
+Length: 3
+
+Length is 2?: false
+
+Left adjust:
+<pre>
+left
+</pre>
+
+Line breaks: Line 1<br />Line 2<br />Line 3
+
+Lowercase: lowercase
+
+Right adjust:
+<pre>
+ right
+</pre>
+
+Uppercase: UPPERCASE
+
+URL Encode: Let%27s%20go%21
+
View
@@ -0,0 +1,13 @@
+before
+
+<ul>
+
+<li>1. apple</li>
+
+<li>2. banana</li>
+
+<li>3. coconut</li>
+
+</ul>
+
+after
@@ -0,0 +1,7 @@
+
+More than one apple is called "apples". Only $1 each!
+
+More than one banana is called "bananas". Only $2 each!
+
+More than one coconut is called "coconuts". Only $500 each!
+
@@ -0,0 +1,7 @@
+
+More than one apple is called "apples".
+
+More than one banana is called "bananas".
+
+More than one coconut is called "coconuts".
+
@@ -0,0 +1,13 @@
+before
+
+<ul>
+
+ <li>preset-apple</li>
+
+ <li>preset-banana</li>
+
+ <li>preset-coconut</li>
+
+</ul>
+
+after
@@ -0,0 +1,13 @@
+before
+
+<ul>
+
+ <li><a href="http://amazon.com">Amazon</a></li>
+
+ <li><a href="http://google.com">Google</a></li>
+
+ <li><a href="http://microsoft.com">Microsoft</a></li>
+
+</ul>
+
+after
@@ -0,0 +1,23 @@
+before
+
+<ul>
+
+ <li><a href="http://canon.com">Canon</a></li>
+
+ <li><a href="http://leica.com">Leica</a></li>
+
+ <li><a href="http://nikon.com">Nikon</a></li>
+
+</ul>
+
+<ul>
+
+ <li><a href="http://amazon.com">Amazon (preset)</a></li>
+
+ <li><a href="http://google.com">Google (preset)</a></li>
+
+ <li><a href="http://microsoft.com">Microsoft (preset)</a></li>
+
+</ul>
+
+after
@@ -0,0 +1,7 @@
+
+One apple, two apples!
+
+One banana, two bananas!
+
+One coconut, two coconuts!
+
View
@@ -0,0 +1,4 @@
+One but not two: one
+Two but not one: two
+One: one
+None:
@@ -0,0 +1,4 @@
+One but not two: one
+Two but not one: two
+One: one
+None:
View
@@ -0,0 +1,28 @@
+
+if: var1="foo" and var2="foo" are equal
+
+
+
+if: var1="foo" and var2="foo" are equal
+
+
+
+
+
+else: var1="foo" and var3="bar" are not equal
+
+
+
+if: "foo" and "foo" are equal
+
+
+
+else: "foo" and "bar" are not equal
+
+
+
+if: 99 and 99 are equal
+
+
+
+else: 77 and 99 are not equal
Oops, something went wrong.

0 comments on commit d61650c

Please sign in to comment.