比较文件中增加单行x忽略比较

This commit is contained in:
2025-09-07 00:52:17 +08:00
parent 806b27474f
commit 3678b24318

View File

@@ -56,9 +56,13 @@ def compare_files(source_file, target_file):
tgt_values = tgt_line.strip().split()
if len(src_values) != len(tgt_values):
if len(src_values) != 1:
print(f"Error: Line {i+1}: The number of values in {source_file} and {target_file} do not match.")
all_match = False
continue
else:
if src_values[0].strip().lower() == 'x':
continue
line_match = True