1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Set ugly: true in TemplateTest

This commit is contained in:
Takashi Kokubun 2017-02-07 21:14:30 +09:00
parent 99dcf5c6e7
commit 554dab0708
17 changed files with 553 additions and 554 deletions

View file

@ -2,8 +2,8 @@
<p></p>
<h1>Me!</h1>
<div id='foo'>
<p id='bar'>All</p>
<br />
<p class='baz'>This</p>
Should render
<p id='bar'>All</p>
<br />
<p class='baz'>This</p>
Should render
</div>

View file

@ -1,70 +1,72 @@
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;
<div>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
</div>
<div>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
</div>
<div>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
<p class='title'>Title</p>
<p class='text'>
Woah this is really crazy
I mean wow,
man.
</p>
</div>
<p>foo</p>
<p>reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong</p>
<p>reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong</p>
<div class='woah'>
<div id='funky'>
<div>
<h1>Big!</h1>
<p>Small</p>
<!-- Invisible -->
</div>
<div class='dilly'>
<p>foo</p>
<h1>bar</h1>
</div>
</div>
(<strong>parentheses!</strong>)
<div id='funky'>
<div>
<h1>Big!</h1>
<p>Small</p>
<!-- Invisible -->
</div>
<div class='dilly'>
<p>foo</p>
<h1>bar</h1>
</div>
</div>
(<strong>parentheses!</strong>)
</div>
*<span class='small'>Not really</span>
click
<a href='thing'>here</a>.
<p>baz</p>
<p>boom</p>
<p>boom</p>
foo
<li><a href='http://www.google.com'>google</a></li>
<p>
foo
<div>
bar
</div>
boom
baz
boom, again
<li><a href='http://www.google.com'>google</a></li><p>
foo
<div>
bar
</div>
boom
baz
boom, again
</p>
<table>
<tr>
<td class='cell'>
<strong>strong!</strong>
data
</td>
<td>
more_data
</td>
</tr>
<tr>
<td class='cell'>
<strong>strong!</strong>
data
</td>
<td>
more_data
</td>
</tr>
</table>
<hr />
<div></div>

View file

@ -1,10 +1,13 @@
<div class='article' id='article_1'>
<h1>Hello</h1>
<div>World</div>
<h1>Hello</h1>
<div>World</div>
</div>
<div class='article' id='id_article_1'>id</div>
<div class='article class' id='article_1'>class</div>
<div class='article class' id='id_article_1'>id class</div>
<div class='article full' id='article_1'>boo</div>
<div class='article full' id='article_1'>moo</div>
<div class='article articleFull' id='article_1'>foo</div>
<div class='article articleFull' id='article_1'>foo</div>
<span>
Boo
</span>

View file

@ -20,30 +20,30 @@ Embedded? one af"t"er another!
stuff followed by whitespace
<strong>block with whitespace</strong>
<p>
Escape
- character
%p foo
yee\ha
don't lstrip me
Escape
- character
%p foo
yee\ha
don't lstrip me
</p>
<!-- Short comment -->
<!--
This is a block comment
cool, huh?
<strong>there can even be sub-tags!</strong>
Or script!
This is a block comment
cool, huh?
<strong>there can even be sub-tags!</strong>
Or script!
-->
<p class=''>class attribute should appear!</p>
<p>this attribute shouldn't appear</p>
<!--[if lte IE6]> conditional comment! <![endif]-->
<!--[if gte IE7]>
<p>Block conditional comment</p>
<div>
<h1>Cool, eh?</h1>
</div>
<p>Block conditional comment</p>
<div>
<h1>Cool, eh?</h1>
</div>
<![endif]-->
<!--[if gte IE5.2]>
Woah a period.
Woah a period.
<![endif]-->
testtest
<br />
@ -53,7 +53,7 @@ testtest
<link />
<script>Inline content</script>
<br>
Nested content
Nested content
</br>
<p class='article bar foo' id='article_1'>Blah</p>
<p class='article foo' id='article_1'>Blah</p>
@ -64,8 +64,8 @@ Woah inner quotes
<p class='dynamic_quote' dyn='3' quotes="single '"></p>
<p class='dynamic_self_closing' dyn='3' />
<body>
hello
<div>
<img />
</div>
hello
<div>
<img />
</div>
</body>

View file

@ -1,12 +1,12 @@
!Not a Doctype!
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
<li>g</li>
<li>h</li>
<li>i</li>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
<li>g</li>
<li>h</li>
<li>i</li>
</ul>

View file

@ -1,40 +1,40 @@
<p>
<q>Foo</q>
<q>Foo</q>
</p>
<p>
<q a='2'>Foo</q>
<q a='2'>Foo</q>
</p>
<p>
<q>Foo
Bar</q>
<q>Foo
Bar</q>
</p>
<p>
<q a='2'>Foo
Bar</q>
<q a='2'>Foo
Bar</q>
</p>
<p>
<q>Foo
Bar</q>
<q>Foo
Bar</q>
</p>
<p>
<q a='2'>Foo
Bar</q>
<q a='2'>Foo
Bar</q>
</p>
<p>
<q><div>
Foo
Bar
</div></q>
<q><div>
Foo
Bar
</div></q>
</p>
<p>
<q a='2'><div>
Foo
Bar
</div></q>
<q a='2'><div>
Foo
Bar
</div></q>
</p>
<p>
<q>foo</q>
<q a='2'>
bar
</q>
<q>foo</q>
<q a='2'>
bar
</q>
</p>

View file

@ -1,148 +1,140 @@
<p>
<p><q>
Foo
</q></p>
<p><q>
Foo
</q></p>
</p>
<p>
<p><q a='2'>
Foo
</q></p>
<p><q a='2'>
Foo
</q></p>
</p>
<p>
<p><q>Foo</q></p>
<p><q>Foo</q></p>
</p>
<p>
<p><q a='2'>Foo</q></p>
<p><q a='2'>Foo</q></p>
</p>
<p>
<p><q>
Foo
</q></p>
<p><q>
Foo
</q></p>
</p>
<p>
<p><q a='2'>
Foo
</q></p>
<p><q a='2'>
Foo
</q></p>
</p>
<p>
<p><q>Foo</q></p>
<p><q>Foo</q></p>
</p>
<p>
<p><q a='2'>Foo</q></p>
<p><q a='2'>Foo</q></p>
</p>
<p>
<p><q>
Foo
Bar
</q></p>
<p><q>
Foo
Bar
</q></p>
</p>
<p>
<p><q a='2'>
Foo
Bar
</q></p>
<p><q a='2'>
Foo
Bar
</q></p>
</p>
<p>
<p><q>
Foo
Bar
</q></p>
<p><q>Foo
Bar</q></p>
</p>
<p>
<p><q a='2'>
Foo
Bar
</q></p>
<p><q a='2'>Foo
Bar</q></p>
</p>
<p>
<p>
foo<q>
Foo
</q>bar
</p>
<p>
foo<q>
Foo
</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>
Foo
</q>bar
</p>
<p>
foo<q a='2'>
Foo
</q>bar
</p>
</p>
<p>
<p>
foo<q>Foo</q>bar
</p>
<p>
foo<q>Foo</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>Foo</q>bar
</p>
<p>
foo<q a='2'>Foo</q>bar
</p>
</p>
<p>
<p>
foo<q>
Foo
</q>bar
</p>
<p>
foo<q>
Foo
</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>
Foo
</q>bar
</p>
<p>
foo<q a='2'>
Foo
</q>bar
</p>
</p>
<p>
<p>
foo<q>Foo</q>bar
</p>
<p>
foo<q>Foo</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>Foo</q>bar
</p>
<p>
foo<q a='2'>Foo</q>bar
</p>
</p>
<p>
<p>
foo<q>
Foo
Bar
</q>bar
</p>
<p>
foo<q>
Foo
Bar
</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>
Foo
Bar
</q>bar
</p>
<p>
foo<q a='2'>
Foo
Bar
</q>bar
</p>
</p>
<p>
<p>
foo<q>
Foo
Bar
</q>bar
</p>
<p>
foo<q>Foo
Bar</q>bar
</p>
</p>
<p>
<p>
foo<q a='2'>
Foo
Bar
</q>bar
</p>
<p>
foo<q a='2'>Foo
Bar</q>bar
</p>
</p>
<p>
<p><q></q></p>
<p><q></q></p>
</p>
<p>
<p><q /></p>
<p><q /></p>
</p>
<p>
<p><q a='2'></q></p>
<p><q a='2'></q></p>
</p>
<p>
<p><q a='2' /></p>
<p><q a='2' /></p>
</p>

View file

@ -1,20 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Stop. haml time</title>
<div id='content'>
<h1>This is a title!</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class='foo'>Cigarettes!</p>
<h2>Man alive!</h2>
<ul class='things'>
<li>Slippers</li>
<li>Shoes</li>
<li>Bathrobe</li>
<li>Coffee</li>
</ul>
<pre>This is some text that's in a pre block!
Let's see what happens when it's rendered! What about now, since we're on a new line?</pre>
</div>
</head>
<head>
<title>Stop. haml time</title>
<div id='content'>
<h1>This is a title!</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class='foo'>Cigarettes!</p>
<h2>Man alive!</h2>
<ul class='things'>
<li>Slippers</li>
<li>Shoes</li>
<li>Bathrobe</li>
<li>Coffee</li>
</ul>
<pre>This is some text that's in a pre block!
Let's see what happens when it's rendered! What about now, since we're on a new line?</pre>
</div>
</head>
</html>

View file

@ -1,5 +1,6 @@
<h1>Partial layout used with for block:</h1>
<div class='partial-layout'>
<h2>This is inside a partial layout</h2>
<p>Some content within a layout</p>
</div>
<h2>This is inside a partial layout</h2>
<p>Some content within a layout</p>
</div>

View file

@ -1,5 +1,6 @@
<h1>Partial layout used with for block:</h1>
<div class='partial-layout'>
<h2>This is inside a partial layout</h2>
Some content within a layout
</div>
<h2>This is inside a partial layout</h2>
Some content within a layout
</div>

View file

@ -1,21 +1,22 @@
<p>
@foo =
value one
@foo =
value one
</p>
<p>
@foo =
value two
@foo =
value two
</p>
<p>
@foo =
value two
@foo =
value two
</p>
Toplevel? false
<p>
@foo =
value three
@foo =
value three
</p>
<p>
@foo =
value three
@foo =
value three
</p>

View file

@ -1,68 +1,68 @@
<div>
<h1>I can count!</h1>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<h1>I know my ABCs!</h1>
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
<li>g</li>
<li>h</li>
<li>i</li>
<li>j</li>
<li>k</li>
<li>l</li>
<li>m</li>
<li>n</li>
<li>o</li>
<li>p</li>
<li>q</li>
<li>r</li>
<li>s</li>
<li>t</li>
<li>u</li>
<li>v</li>
<li>w</li>
<li>x</li>
<li>y</li>
<li>z</li>
</ul>
<h1>I can catch errors!</h1>
Oh no! "foo" happened!
<p>
"false" is:
false
</p>
Even!
Odd!
Even!
Odd!
Even!
<h1>I can count!</h1>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<h1>I know my ABCs!</h1>
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
<li>g</li>
<li>h</li>
<li>i</li>
<li>j</li>
<li>k</li>
<li>l</li>
<li>m</li>
<li>n</li>
<li>o</li>
<li>p</li>
<li>q</li>
<li>r</li>
<li>s</li>
<li>t</li>
<li>u</li>
<li>v</li>
<li>w</li>
<li>x</li>
<li>y</li>
<li>z</li>
</ul>
<h1>I can catch errors!</h1>
Oh no! "foo" happened!
<p>
"false" is:
false
</p>
Even!
Odd!
Even!
Odd!
Even!
</div>
<div class='foo'>
<strong>foobar</strong>
<strong>foobar</strong>
</div>
<strong>0</strong>
<strong>1</strong>
@ -70,5 +70,5 @@
<strong>3</strong>
<strong>4</strong>
<div class='test'>
<p>boom</p>
<p>boom</p>
</div>

View file

@ -1,162 +1,159 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Hampton Catlin Is Totally Awesome</title>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
</head>
<body>
<!-- You're In my house now! -->
<div class='header'>
Yes, ladies and gentileman. He is just that egotistical.
Fantastic! This should be multi-line output
The question is if this would translate! Ahah!
20
</div>
<div id='body'> Quotes should be loved! Just like people!</div>
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Wow.|
<p code='3'>
Holy cow multiline tags! A pipe (|) even!
PipesIgnored|PipesIgnored|PipesIgnored|
1|2|3
</p>
<div class='silent' foo='17'>
this shouldn't evaluate but now it should!
</div>
<ul class='really cool'>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
</ul>
<div class='of_divs_with_underscore' id='combo'>with this text</div>
foo
<div class='footer'>
<strong class='shout'>
This is a really long ruby quote. It should be loved and wrapped because its more than 50 characters. This value may change in the future and this test may look stupid.
So, I'm just making it *really* long. God, I hope this works
</strong>
</div>
</body>
<head>
<title>Hampton Catlin Is Totally Awesome</title>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
</head>
<body>
<!-- You're In my house now! -->
<div class='header'>
Yes, ladies and gentileman. He is just that egotistical.
Fantastic! This should be multi-line output
The question is if this would translate! Ahah!
20
</div>
<div id='body'> Quotes should be loved! Just like people!</div>
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Wow.|
<p code='3'>
Holy cow multiline tags! A pipe (|) even!
PipesIgnored|PipesIgnored|PipesIgnored|
1|2|3
</p>
<div class='silent' foo='17'>
this shouldn't evaluate but now it should!
</div>
<ul class='really cool'>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
</ul>
<div class='of_divs_with_underscore' id='combo'>with this text</div>
foo<div class='footer'>
<strong class='shout'>This is a really long ruby quote. It should be loved and wrapped because its more than 50 characters. This value may change in the future and this test may look stupid.
So, I'm just making it *really* long. God, I hope this works</strong>
</div>
</body>
</html>

View file

@ -1,23 +1,23 @@
<div class='tags'>
<foo>1</foo>
<FOO>2</FOO>
<fooBAR>3</fooBAR>
<fooBar>4</fooBar>
<foo_bar>5</foo_bar>
<foo-bar>6</foo-bar>
<foo:bar>7</foo:bar>
<foo class='bar'>8</foo>
<fooBAr_baz:boom_bar>9</fooBAr_baz:boom_bar>
<foo13>10</foo13>
<foo2u>11</foo2u>
<foo>1</foo>
<FOO>2</FOO>
<fooBAR>3</fooBAR>
<fooBar>4</fooBar>
<foo_bar>5</foo_bar>
<foo-bar>6</foo-bar>
<foo:bar>7</foo:bar>
<foo class='bar'>8</foo>
<fooBAr_baz:boom_bar>9</fooBAr_baz:boom_bar>
<foo13>10</foo13>
<foo2u>11</foo2u>
</div>
<div class='classes'>
<p class='foo bar' id='boom'></p>
<div class='fooBar'>a</div>
<div class='foo-bar'>b</div>
<div class='foo_bar'>c</div>
<div class='FOOBAR'>d</div>
<div class='foo16'>e</div>
<div class='123'>f</div>
<div class='foo2u'>g</div>
<p class='foo bar' id='boom'></p>
<div class='fooBar'>a</div>
<div class='foo-bar'>b</div>
<div class='foo_bar'>c</div>
<div class='FOOBAR'>d</div>
<div class='foo16'>e</div>
<div class='123'>f</div>
<div class='foo2u'>g</div>
</div>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head></head>
<body></body>
<head></head>
<body></body>
</html>

View file

@ -1,90 +1,91 @@
<div id='whitespace_test'>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
<div id='flattened'>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
</div>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
<div id='flattened'><div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
</div>
</div>
<div class='hithere'>
Foo bar
<pre>foo bar</pre>
<pre>foo&#x000A;bar</pre>
<p><pre>foo&#x000A;bar</pre></p>
<p>
foo
bar
</p>
Foo bar
<pre>foo bar</pre>
<pre>foo&#x000A;bar</pre>
<p><pre>foo&#x000A;bar</pre></p>
<p>foo
bar</p>
</div>
<div class='foo'>
13
<textarea>
a
</textarea>
13
<textarea>
a</textarea>
</div>
a
</textarea>
<textarea>
a</textarea></div>
<div id='whitespace_test'>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
<div id='flattened'>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
</div>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH
</textarea>
<div class='text_area_test_area'>
<textarea>Oneline</textarea>
</div>
<textarea>BLAH</textarea>
<div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
<div id='flattened'><div class='text_area_test_area'>
<textarea>Two&#x000A;lines</textarea>
</div>
<textarea>BLAH</textarea>
</div>
</div>
<div class='hithere'>
Foo bar
<pre>foo bar</pre>
<pre>foo&#x000A;bar</pre>
<p><pre>foo&#x000A;bar</pre></p>
<p>
foo
bar
</p>
<pre> ___&#x000A; ,o88888&#x000A; ,o8888888'&#x000A; ,:o:o:oooo. ,8O88Pd8888"&#x000A; ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"&#x000A; ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"&#x000A; , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"&#x000A; , ..:.::o:ooOoOO8O888O8O,COCOO"&#x000A; , . ..:.::o:ooOoOOOO8OOOOCOCO"&#x000A; . ..:.::o:ooOoOoOO8O8OCCCC"o&#x000A; . ..:.::o:ooooOoCoCCC"o:o&#x000A; . ..:.::o:o:,cooooCo"oo:o:&#x000A; ` . . ..:.:cocoooo"'o:o:::'&#x000A; .` . ..::ccccoc"'o:o:o:::'&#x000A; :.:. ,c:cccc"':.:.:.:.:.'&#x000A; ..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/&#x000A; ...:.'.:.::::"' . . . . .'&#x000A; .. . ....:."' ` . . . ''&#x000A; . . . ...."'&#x000A; .. . ."' -hrr-&#x000A; .&#x000A;&#x000A;&#x000A; It's a planet!&#x000A;%strong This shouldn't be bold!</pre>
<strong>This should!</strong>
<textarea> ___ ___ ___ ___ &#x000A; /\__\ /\ \ /\__\ /\__\&#x000A; /:/ / /::\ \ /::| | /:/ /&#x000A; /:/__/ /:/\:\ \ /:|:| | /:/ / &#x000A; /::\ \ ___ /::\~\:\ \ /:/|:|__|__ /:/ / &#x000A; /:/\:\ /\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/__/ &#x000A; \/__\:\/:/ / \/__\:\/:/ / \/__/~~/:/ / \:\ \ &#x000A; \::/ / \::/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\__\&#x000A; \/__/ \/__/ \/__/ \/__/&#x000A; &#x000A; Many&#x000A; thanks&#x000A; to&#x000A; http://www.network-science.de/ascii/
<strong>indeed!</strong></textarea>
Foo bar
<pre>foo bar</pre>
<pre>foo&#x000A;bar</pre>
<p><pre>foo&#x000A;bar</pre></p>
<p>foo
bar</p>
<pre> ___&#x000A; ,o88888&#x000A; ,o8888888'&#x000A; ,:o:o:oooo. ,8O88Pd8888"&#x000A; ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"&#x000A; ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"&#x000A; , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"&#x000A; , ..:.::o:ooOoOO8O888O8O,COCOO"&#x000A; , . ..:.::o:ooOoOOOO8OOOOCOCO"&#x000A; . ..:.::o:ooOoOoOO8O8OCCCC"o&#x000A; . ..:.::o:ooooOoCoCCC"o:o&#x000A; . ..:.::o:o:,cooooCo"oo:o:&#x000A; ` . . ..:.:cocoooo"'o:o:::'&#x000A; .` . ..::ccccoc"'o:o:o:::'&#x000A; :.:. ,c:cccc"':.:.:.:.:.'&#x000A; ..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/&#x000A; ...:.'.:.::::"' . . . . .'&#x000A; .. . ....:."' ` . . . ''&#x000A; . . . ...."'&#x000A; .. . ."' -hrr-&#x000A; .&#x000A;&#x000A;&#x000A; It's a planet!&#x000A;%strong This shouldn't be bold!</pre>
<strong>This should!</strong>
<textarea> ___ ___ ___ ___ &#x000A; /\__\ /\ \ /\__\ /\__\&#x000A; /:/ / /::\ \ /::| | /:/ /&#x000A; /:/__/ /:/\:\ \ /:|:| | /:/ / &#x000A; /::\ \ ___ /::\~\:\ \ /:/|:|__|__ /:/ / &#x000A; /:/\:\ /\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/__/ &#x000A; \/__\:\/:/ / \/__\:\/:/ / \/__/~~/:/ / \:\ \ &#x000A; \::/ / \::/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\__\&#x000A; \/__/ \/__/ \/__/ \/__/&#x000A; &#x000A; Many&#x000A; thanks&#x000A; to&#x000A; http://www.network-science.de/ascii/
<strong>indeed!</strong></textarea>
</div>
<div class='foo'>
13
13
</div>
<pre> __ ______ __ ______&#x000A;.----.| |--.|__ |.----.| |--..--------.| __ |&#x000A;| __|| ||__ || __|| < | || __ |&#x000A;|____||__|__||______||____||__|__||__|__|__||______|</pre>
<pre>foo
bar</pre>
bar</pre>

View file

@ -13,7 +13,7 @@ end
module Haml::Helpers
def test_partial(name, locals = {})
Haml::Engine.new(File.read(File.join(TemplateTest::TEMPLATE_PATH, "_#{name}.haml"))).render(self, locals)
Haml::Engine.new(File.read(File.join(TemplateTest::TEMPLATE_PATH, "_#{name}.haml")), Haml::Template.options).render(self, locals)
end
end
@ -82,6 +82,7 @@ class TemplateTest < Haml::TestCase
def assert_renders_correctly(name, &render_method)
old_options = Haml::Template.options.dup
Haml::Template.options[:ugly] = true
Haml::Template.options[:escape_html] = false
render_method ||= proc { |n| @base.render(:file => n) }
@ -136,14 +137,14 @@ class TemplateTest < Haml::TestCase
def test_templates_should_render_correctly_with_render_proc
assert_renders_correctly("standard") do |name|
engine = Haml::Engine.new(File.read(File.dirname(__FILE__) + "/templates/#{name}.haml"), :format => :xhtml)
engine = Haml::Engine.new(File.read(File.dirname(__FILE__) + "/templates/#{name}.haml"), ugly: true, format: :xhtml)
engine.render_proc(@base).call
end
end
def test_templates_should_render_correctly_with_def_method
assert_renders_correctly("standard") do |name|
engine = Haml::Engine.new(File.read(File.dirname(__FILE__) + "/templates/#{name}.haml"), :format => :xhtml)
engine = Haml::Engine.new(File.read(File.dirname(__FILE__) + "/templates/#{name}.haml"), ugly: true, format: :xhtml)
engine.def_method(@base, "render_standard")
@base.render_standard
end