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 }}
```
{%- endif -%}
{%- endif %}
{%- if verbose and issue.debug -%}
--------------------
### Debugging Information:
{{ issue.debug }}
{%- endif -%}
{%- endfor -%}
{%- endif %}
{% endfor -%}
{%- else -%}
The analysis was completed successfully. No issues were detected.
{%- endif -%}

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

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

Loading…
Cancel
Save