Fixes newline mismatches in text tests

pull/206/head
Josh Asplund 7 years ago
parent 262461549d
commit 0c1c5c9fdd
  1. 7
      mythril/analysis/templates/report_as_markdown.jinja2
  2. 8
      mythril/analysis/templates/report_as_text.jinja2
  3. 8
      tests/report_test.py

@ -23,14 +23,15 @@ In file: {{ issue.filename }}:{{ issue.lineno }}
``` ```
{{ issue.code }} {{ issue.code }}
``` ```
{%- endif -%} {%- endif %}
{%- if verbose and issue.debug -%} {%- if verbose and issue.debug -%}
-------------------- --------------------
### Debugging Information: ### Debugging Information:
{{ issue.debug }} {{ issue.debug }}
{%- endif -%} {%- endif %}
{%- endfor -%}
{% endfor -%}
{%- else -%} {%- else -%}
The analysis was completed successfully. No issues were detected. The analysis was completed successfully. No issues were detected.
{%- endif -%} {%- endif -%}

@ -10,17 +10,17 @@ PC address: {{ issue.address }}
{% if issue.filename and issue.lineno -%} {% if issue.filename and issue.lineno -%}
In file: {{ issue.filename }}:{{ issue.lineno }} In file: {{ issue.filename }}:{{ issue.lineno }}
{%- endif %} {%- endif %}
{% if issue.code -%} {% if issue.code %}
--------------------
{{ issue.code }} {{ issue.code }}
{%- endif -%}
--------------------
{% endif -%}
{% if verbose and issue.debug -%} {% if verbose and issue.debug -%}
-------------------- --------------------
DEBUGGING INFORMATION: DEBUGGING INFORMATION:
{{ issue.debug }} {{ issue.debug }}
{%- endif %} {%- endif %}
{% endfor -%} {% endfor -%}
{%- else -%} {%- else -%}
The analysis was completed successfully. No issues were detected. The analysis was completed successfully. No issues were detected.

@ -74,12 +74,12 @@ def _get_changed_files(postfix, report_builder, reports):
yield input_file yield input_file
# def test_json_report(reports): def test_json_report(reports):
# _assert_empty(_get_changed_files('.json', lambda report: _fix_path(_fix_debug_data(report.as_json())).strip(), reports), '.json') _assert_empty(_get_changed_files('.json', lambda report: _fix_path(_fix_debug_data(report.as_json())).strip(), reports), '.json')
# def test_markdown_report(reports): def test_markdown_report(reports):
# _assert_empty(_get_changed_files('.markdown', lambda report: _fix_path(report.as_markdown()), reports), '.markdown') _assert_empty(_get_changed_files('.markdown', lambda report: _fix_path(report.as_markdown()), reports), '.markdown')
def test_text_report(reports): def test_text_report(reports):

Loading…
Cancel
Save