Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails on MacOS #19

Closed
lowks opened this issue Apr 14, 2015 · 1 comment
Closed

Test fails on MacOS #19

lowks opened this issue Apr 14, 2015 · 1 comment

Comments

@lowks
Copy link
Contributor

lowks commented Apr 14, 2015

Hi I am running on MacOS 10.10.2
Elixir version 1.0.4
When I try running the tests using mix test --trace I get the following one failure:

1) test handles multi-paragraph footnote bodies (FootnoteTest)
     test/footnote_test.exs:60
     Assertion with == failed
     code: result == expected
     lhs:  [%Earmark.Block.Para{attrs: nil,
             lines: ["This is a footnote[^fn-1]"]},
            %Earmark.Block.Para{attrs: nil,
             lines: ["[^fn-1]: line 1", "line 2"]},
            %Earmark.Block.Code{attrs: nil, language: nil,
             lines: ["Para 2 line 1", "Para 2 line 2", "", "* List Item 1",
              "  List Item 1 Cont", "* List Item 2"]}]
     rhs:  [%Earmark.Block.Para{attrs: nil,
             lines: ["This is a footnote[^fn-1]"]},
            %Earmark.Block.FnDef{attrs: nil,
             blocks: [%Earmark.Block.Para{attrs: nil,
               lines: ["line 1", "line 2"]},
              %Earmark.Block.Para{attrs: nil,
               lines: ["Para 2 line 1", "Para 2 line 2"]},
              %Earmark.Block.List{attrs: nil,
               blocks: [%Earmark.Block.ListItem{attrs: nil,
                 blocks: [%Earmark.Block.Para{attrs: nil,
                   lines: ["List Item 1", "  List Item 1 Cont"]}],
                 spaced: false, type: :ul},
                %Earmark.Block.ListItem{attrs: nil,
                 blocks: [%Earmark.Block.Para{attrs: nil,
                   lines: ["List Item 2"]}], spaced: false, type: :ul}],
               type: :ul}], id: "fn-1", number: nil}]
     stacktrace:
       test/footnote_test.exs:82
lowks added a commit to lowks/earmark that referenced this issue Apr 14, 2015
@pragdave
Copy link
Owner

Thanks for this.

Actually, looking at the test, it was clearly wrong to test against the intermediate form—the correct test is the second part, which tests the output. This is because footnote support is an option which is handled post-parse.

I've pushed an update that removes the failing assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants