Skip to content

Commit 5fd751e

Browse files
jhkim-piiclaude
andcommitted
Revert diff_files/diff_files_sorted to original return behavior
Revert error-on-mismatch back to return 1, as the new GitHub Action (github-actions-are-differences-found) now detects "Differences found" in CI output, making the error approach unnecessary. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
1 parent d19c999 commit 5fd751e

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

test/helpers.tcl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ proc diff_files_sorted { file1 file2 } {
5656
} else {
5757
for {set i 0} {$i < [llength $lines1] && $i < [llength $lines2]} {incr i} {
5858
if { [lindex $lines1 $i] ne [lindex $lines2 $i] } {
59-
error "diff_files_sorted: $file1 vs $file2 differ at sorted line $i\n< [lindex $lines1 $i]\n> [lindex $lines2 $i]"
59+
puts "Differences found (sorted)."
60+
puts "[lindex $lines1 $i]"
61+
puts "[lindex $lines2 $i]"
62+
return 1
6063
}
6164
}
62-
error "diff_files_sorted: $file1 vs $file2 differ: file lengths differ"
65+
puts "Differences found (sorted): file lengths differ."
66+
return 1
6367
}
6468
}
6569

@@ -102,7 +106,10 @@ proc diff_files { file1 file2 { ignore "" } } {
102106
close $stream1
103107
close $stream2
104108
if { $found_diff || $line1_length != $line2_length } {
105-
error "diff_files: $file1 vs $file2 differ at line $line\n< $line1\n> $line2"
109+
puts "Differences found at line $line."
110+
puts "$line1"
111+
puts "$line2"
112+
return 1
106113
} else {
107114
puts "No differences found."
108115
return 0

0 commit comments

Comments
 (0)