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 17, 2022
2 parents d76f3c1 + 06ec80a commit 3d5c88f
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 3d5c88f

Please sign in to comment.