-
Notifications
You must be signed in to change notification settings - Fork 351
[Windows] Fix unit tests #733
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
Conversation
test/ex_doc/formatter/html_test.exs
Outdated
generate_docs(doc_config()) | ||
|
||
content = File.read!("#{output_dir()}/api-reference.html") | ||
content = File.read!("#{output_dir()}/api-reference.html") |> normalize_eol() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a function call when a pipeline is only one function long
4796243
to
854ea7f
Compare
test/ex_doc/formatter/epub_test.exs
Outdated
generate_docs_and_unzip(config) | ||
|
||
content = File.read!("#{output_dir()}/OEBPS/readme.xhtml") | ||
content = "#{output_dir()}/OEBPS/readme.xhtml" |> File.read!() |> normalize_eol() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? None of those seem to be asserting on new lines?
|
||
test "site title text links to homepage_url when set" do | ||
content = Templates.sidebar_template(doc_config(), @empty_nodes_map) | ||
content = doc_config() |> Templates.sidebar_template(@empty_nodes_map) |> normalize_eol() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this. We should just remove \n
from the regexes below because \s
matches any space and we don't actually care in HTML if it is a new line or a regular space:
"a\r\nb" =~ ~r/a\s*b/
true
Hi @milmazz! I think instead of doing the eol conversion, we can adjust the regexes instead. What do you think? |
@josevalim Definitely better! Thanks for your suggestions. |
No description provided.