diff --git a/test/results/eval_suppressed.xhtml b/test/results/eval_suppressed.xhtml index 0ad97d9b..70887a75 100644 --- a/test/results/eval_suppressed.xhtml +++ b/test/results/eval_suppressed.xhtml @@ -2,8 +2,8 @@

Me!

-

All

-
-

This

- Should render +

All

+
+

This

+Should render
diff --git a/test/results/helpers.xhtml b/test/results/helpers.xhtml index 8f1f8b0f..89c2b442 100644 --- a/test/results/helpers.xhtml +++ b/test/results/helpers.xhtml @@ -1,70 +1,72 @@ &&&&&&&&&&&
-

Title

-

- Woah this is really crazy - I mean wow, - man. -

+

Title

+

+Woah this is really crazy +I mean wow, +man. +

+
-

Title

-

- Woah this is really crazy - I mean wow, - man. -

+

Title

+

+Woah this is really crazy +I mean wow, +man. +

+
-

Title

-

- Woah this is really crazy - I mean wow, - man. -

+

Title

+

+Woah this is really crazy +I mean wow, +man. +

+

foo

-

reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong

+

reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong

-
-
-

Big!

-

Small

- -
-
-

foo

-

bar

-
-
- (parentheses!) +
+
+

Big!

+

Small

+ +
+
+

foo

+

bar

+
+
+(parentheses!)
*Not really click here.

baz

-

boom

+

boom

foo -
  • google
  • -

    - foo -

    - bar -
    - boom - baz - boom, again +
  • google
  • +foo +

    +bar +
    +boom +baz +boom, again

    - - - - + + + +
    - strong! - data - - more_data -
    +strong! +data + +more_data +

    diff --git a/test/results/helpful.xhtml b/test/results/helpful.xhtml index 042291d3..93c05a52 100644 --- a/test/results/helpful.xhtml +++ b/test/results/helpful.xhtml @@ -1,10 +1,13 @@
    -

    Hello

    -
    World
    +

    Hello

    +
    World
    id
    class
    id class
    boo
    moo
    -
    foo
    \ No newline at end of file +
    foo
    + +Boo + diff --git a/test/results/just_stuff.xhtml b/test/results/just_stuff.xhtml index 0df460f8..d31dd78b 100644 --- a/test/results/just_stuff.xhtml +++ b/test/results/just_stuff.xhtml @@ -20,30 +20,30 @@ Embedded? one af"t"er another! stuff followed by whitespace block with whitespace

    - Escape - - character - %p foo - yee\ha - don't lstrip me +Escape +- character +%p foo +yee\ha + don't lstrip me

    class attribute should appear!

    this attribute shouldn't appear

    testtest
    @@ -53,7 +53,7 @@ testtest
    - Nested content +Nested content

    Blah

    Blah

    @@ -64,8 +64,8 @@ Woah inner quotes

    - hello -

    - -
    +hello +
    + +
    diff --git a/test/results/list.xhtml b/test/results/list.xhtml index 05d22018..c4818117 100644 --- a/test/results/list.xhtml +++ b/test/results/list.xhtml @@ -1,12 +1,12 @@ !Not a Doctype! diff --git a/test/results/nuke_inner_whitespace.xhtml b/test/results/nuke_inner_whitespace.xhtml index 71d55d87..4a7bf839 100644 --- a/test/results/nuke_inner_whitespace.xhtml +++ b/test/results/nuke_inner_whitespace.xhtml @@ -1,40 +1,40 @@

    - Foo +Foo

    - Foo +Foo

    - Foo - Bar +Foo +Bar

    - Foo - Bar +Foo +Bar

    - Foo - Bar +Foo +Bar

    - Foo - Bar +Foo +Bar

    -

    - Foo - Bar -
    +
    +Foo +Bar +

    -

    - Foo - Bar -
    +
    +Foo +Bar +

    - foo - - bar - +foo + +bar +

    diff --git a/test/results/nuke_outer_whitespace.xhtml b/test/results/nuke_outer_whitespace.xhtml index a31cde3a..c33af098 100644 --- a/test/results/nuke_outer_whitespace.xhtml +++ b/test/results/nuke_outer_whitespace.xhtml @@ -1,148 +1,140 @@

    -

    - Foo -

    +

    +Foo +

    -

    - Foo -

    +

    +Foo +

    -

    Foo

    +

    Foo

    -

    Foo

    +

    Foo

    -

    - Foo -

    +

    +Foo +

    -

    - Foo -

    +

    +Foo +

    -

    Foo

    +

    Foo

    -

    Foo

    +

    Foo

    -

    - Foo - Bar -

    +

    +Foo +Bar +

    -

    - Foo - Bar -

    +

    +Foo +Bar +

    -

    - Foo - Bar -

    +

    Foo +Bar

    -

    - Foo - Bar -

    +

    Foo +Bar

    -

    - foo - Foo - bar -

    +

    +foo +Foo +bar +

    -

    - foo - Foo - bar -

    +

    +foo +Foo +bar +

    -

    - fooFoobar -

    +

    +fooFoobar +

    -

    - fooFoobar -

    +

    +fooFoobar +

    -

    - foo - Foo - bar -

    +

    +foo +Foo +bar +

    -

    - foo - Foo - bar -

    +

    +foo +Foo +bar +

    -

    - fooFoobar -

    +

    +fooFoobar +

    -

    - fooFoobar -

    +

    +fooFoobar +

    -

    - foo - Foo - Bar - bar -

    +

    +foo +Foo +Bar +bar +

    -

    - foo - Foo - Bar - bar -

    +

    +foo +Foo +Bar +bar +

    -

    - foo - Foo - Bar - bar -

    +

    +fooFoo +Barbar +

    -

    - foo - Foo - Bar - bar -

    +

    +fooFoo +Barbar +

    -

    +

    -

    +

    -

    +

    -

    +

    diff --git a/test/results/original_engine.xhtml b/test/results/original_engine.xhtml index dd0e9f98..d62f0897 100644 --- a/test/results/original_engine.xhtml +++ b/test/results/original_engine.xhtml @@ -1,20 +1,20 @@ - - Stop. haml time -
    -

    This is a title!

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit

    -

    Cigarettes!

    -

    Man alive!

    - -
    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?
    -
    - + +Stop. haml time +
    +

    This is a title!

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit

    +

    Cigarettes!

    +

    Man alive!

    + +
    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?
    +
    + diff --git a/test/results/partial_layout.xhtml b/test/results/partial_layout.xhtml index 53b96e3b..6a601019 100644 --- a/test/results/partial_layout.xhtml +++ b/test/results/partial_layout.xhtml @@ -1,5 +1,6 @@

    Partial layout used with for block:

    -

    This is inside a partial layout

    -

    Some content within a layout

    -
    \ No newline at end of file +

    This is inside a partial layout

    +

    Some content within a layout

    + + diff --git a/test/results/partial_layout_erb.xhtml b/test/results/partial_layout_erb.xhtml index 1ac1bc0a..fe433e95 100644 --- a/test/results/partial_layout_erb.xhtml +++ b/test/results/partial_layout_erb.xhtml @@ -1,5 +1,6 @@

    Partial layout used with for block:

    -

    This is inside a partial layout

    - Some content within a layout -
    \ No newline at end of file +

    This is inside a partial layout

    +Some content within a layout + + diff --git a/test/results/partials.xhtml b/test/results/partials.xhtml index 12366ffa..09d4a231 100644 --- a/test/results/partials.xhtml +++ b/test/results/partials.xhtml @@ -1,21 +1,22 @@

    - @foo = - value one +@foo = +value one

    - @foo = - value two +@foo = +value two

    - @foo = - value two +@foo = +value two

    Toplevel? false

    - @foo = - value three +@foo = +value three

    +

    - @foo = - value three +@foo = +value three

    diff --git a/test/results/silent_script.xhtml b/test/results/silent_script.xhtml index 3b2010d2..b058caf6 100644 --- a/test/results/silent_script.xhtml +++ b/test/results/silent_script.xhtml @@ -1,68 +1,68 @@
    -

    I can count!

    - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -

    I know my ABCs!

    - -

    I can catch errors!

    - Oh no! "foo" happened! -

    - "false" is: - false -

    - Even! - Odd! - Even! - Odd! - Even! +

    I can count!

    +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +

    I know my ABCs!

    + +

    I can catch errors!

    +Oh no! "foo" happened! +

    +"false" is: +false +

    +Even! +Odd! +Even! +Odd! +Even!
    - foobar +foobar
    0 1 @@ -70,5 +70,5 @@ 3 4
    -

    boom

    +

    boom

    diff --git a/test/results/standard.xhtml b/test/results/standard.xhtml index 6897fc30..c83619a7 100644 --- a/test/results/standard.xhtml +++ b/test/results/standard.xhtml @@ -1,162 +1,159 @@ - - Hampton Catlin Is Totally Awesome - - - - -
    - 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 -
    -
    Quotes should be loved! Just like people!
    - 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.| -

    - Holy cow multiline tags! A pipe (|) even! - PipesIgnored|PipesIgnored|PipesIgnored| - 1|2|3 -

    -
    - this shouldn't evaluate but now it should! -
    - -
    with this text
    - foo - - + +Hampton Catlin Is Totally Awesome + + + + +
    +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 +
    +
    Quotes should be loved! Just like people!
    +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.| +

    +Holy cow multiline tags! A pipe (|) even! +PipesIgnored|PipesIgnored|PipesIgnored| +1|2|3 +

    +
    +this shouldn't evaluate but now it should! +
    + +
    with this text
    +foo + diff --git a/test/results/tag_parsing.xhtml b/test/results/tag_parsing.xhtml index e8178aa1..a575d861 100644 --- a/test/results/tag_parsing.xhtml +++ b/test/results/tag_parsing.xhtml @@ -1,23 +1,23 @@
    - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11
    -

    -
    a
    -
    b
    -
    c
    -
    d
    -
    e
    -
    f
    -
    g
    +

    +
    a
    +
    b
    +
    c
    +
    d
    +
    e
    +
    f
    +
    g
    diff --git a/test/results/very_basic.xhtml b/test/results/very_basic.xhtml index 6a4cd257..20e7c9c1 100644 --- a/test/results/very_basic.xhtml +++ b/test/results/very_basic.xhtml @@ -1,5 +1,5 @@ - - + + diff --git a/test/results/whitespace_handling.xhtml b/test/results/whitespace_handling.xhtml index dd1b2f50..27f34040 100644 --- a/test/results/whitespace_handling.xhtml +++ b/test/results/whitespace_handling.xhtml @@ -1,90 +1,91 @@
    -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    -
    - -
    - -
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    - Foo bar -
    foo bar
    -
    foo
    bar
    -

    foo
    bar

    -

    - foo - bar -

    +Foo bar +
    foo bar
    +
    foo
    bar
    +

    foo
    bar

    +

    foo +bar

    - 13 - +13 -
    +a + +
    -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    -
    - -
    - -
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    - Foo bar -
    foo bar
    -
    foo
    bar
    -

    foo
    bar

    -

    - foo - bar -

    -
                                                     ___
                                                  ,o88888
                                               ,o8888888'
                         ,:o:o:oooo.        ,8O88Pd8888"
                     ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"
                   ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"
                  , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"
                 , ..:.::o:ooOoOO8O888O8O,COCOO"
                , . ..:.::o:ooOoOOOO8OOOOCOCO"
                 . ..:.::o:ooOoOoOO8O8OCCCC"o
                    . ..:.::o:ooooOoCoCCC"o:o
                    . ..:.::o:o:,cooooCo"oo:o:
                 `   . . ..:.:cocoooo"'o:o:::'
                 .`   . ..::ccccoc"'o:o:o:::'
                :.:.    ,c:cccc"':.:.:.:.:.'
              ..:.:"'`::::c:"'..:.:.:.:.:.'  http://www.chris.com/ASCII/
            ...:.'.:.::::"'    . . . . .'
           .. . ....:."' `   .  . . ''
         . . . ...."'
         .. . ."'     -hrr-
        .
    
    
                                                  It's a planet!
    %strong This shouldn't be bold!
    - This should! - +Foo bar +
    foo bar
    +
    foo
    bar
    +

    foo
    bar

    +

    foo +bar

    +
                                                     ___
                                                  ,o88888
                                               ,o8888888'
                         ,:o:o:oooo.        ,8O88Pd8888"
                     ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"
                   ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"
                  , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"
                 , ..:.::o:ooOoOO8O888O8O,COCOO"
                , . ..:.::o:ooOoOOOO8OOOOCOCO"
                 . ..:.::o:ooOoOoOO8O8OCCCC"o
                    . ..:.::o:ooooOoCoCCC"o:o
                    . ..:.::o:o:,cooooCo"oo:o:
                 `   . . ..:.:cocoooo"'o:o:::'
                 .`   . ..::ccccoc"'o:o:o:::'
                :.:.    ,c:cccc"':.:.:.:.:.'
              ..:.:"'`::::c:"'..:.:.:.:.:.'  http://www.chris.com/ASCII/
            ...:.'.:.::::"'    . . . . .'
           .. . ....:."' `   .  . . ''
         . . . ...."'
         .. . ."'     -hrr-
        .
    
    
                                                  It's a planet!
    %strong This shouldn't be bold!
    +This should! +
    - 13 +13
           __     ______        __               ______
    .----.|  |--.|__    |.----.|  |--..--------.|  __  |
    |  __||     ||__    ||  __||    < |        ||  __  |
    |____||__|__||______||____||__|__||__|__|__||______|
    foo
    -bar
    \ No newline at end of file +bar diff --git a/test/template_test.rb b/test/template_test.rb index 60fc1631..a68e41b6 100644 --- a/test/template_test.rb +++ b/test/template_test.rb @@ -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