[PATCH] D107954: [Flang] test_symbols.py formatting fix
Ivan Zhechev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 01:54:52 PDT 2021
ijan1 created this revision.
ijan1 added reviewers: Meinersbur, awarzynski, Leporacanthicus, kiranchandramohan, jdoerfert, sscalpone, tskeith, clementval.
ijan1 requested review of this revision.
Herald added a project: LLVM.
This change pretties up the formatting in the script.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107954
Files:
flang/test/Semantics/test_symbols.py
Index: flang/test/Semantics/test_symbols.py
===================================================================
--- flang/test/Semantics/test_symbols.py
+++ flang/test/Semantics/test_symbols.py
@@ -4,7 +4,7 @@
we get the right symbols in the output, i.e. the output should be
the same as the input, except for the copyright comment.
Expects a source file passed as the first argument;
-Expects the Flang frontdriver with options as second argument."""
+Expects the Flang frontend driver with options as second argument."""
import sys
import re
@@ -44,9 +44,9 @@
diff_check = ""
# Compares the input with the output
-for line in unified_diff(diff1, diff3, n=999999,
+for line in unified_diff(diff1.split("\n"), diff3.split("\n"), n=999999,
fromfile="Expected output", tofile="Actual output"):
- diff_check += line
+ diff_check += f"{line}\n"
if diff_check != "":
print(diff_check.replace(" ", ""))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107954.365937.patch
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210812/7b3ac387/attachment.bin>
More information about the llvm-commits
mailing list