Skip to content

Commit

Permalink
Rollup merge of rust-lang#96143 - Urgau:rustdoc-fix-snapshot-bless, r…
Browse files Browse the repository at this point in the history
…=GuillaumeGomez

Fix snapshot --bless not working anymore in htmldocck

I broke it in rust-lang#95933

r? ```@GuillaumeGomez```
  • Loading branch information
Dylan-DPC authored Apr 18, 2022
2 parents a6ad139 + 06ec80a commit 9c1c8b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/etc/htmldocck.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,12 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
else:
actual_str = flatten(actual_tree)

# Conditions:
# 1. Is --bless
# 2. Are actual and expected tree different
# 3. Are actual and expected text different
if not expected_str \
or (not normalize_to_text and
or (not normalize_to_text and \
not compare_tree(make_xml(actual_str), make_xml(expected_str), stderr)) \
or (normalize_to_text and actual_str != expected_str):

Expand Down

0 comments on commit 9c1c8b2

Please sign in to comment.