aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-01-28 20:05:56 +0000
committerKen Raeburn <raeburn@cygnus>1994-01-28 20:05:56 +0000
commit57e5ec0783eee6ca5872ea824c1b5fd04dabfc16 (patch)
treed5d32e4632a4406103879b19a26508632e29d631 /ld
parentfb55f9b8ae29f5b7d30474d4322fe4573a9aceeb (diff)
downloadgdb-57e5ec0783eee6ca5872ea824c1b5fd04dabfc16.zip
gdb-57e5ec0783eee6ca5872ea824c1b5fd04dabfc16.tar.gz
gdb-57e5ec0783eee6ca5872ea824c1b5fd04dabfc16.tar.bz2
* lib/ld.exp (simple_diff): Indicate failure if files have different numbers of
lines. Don't muck with $differences to avoid indicating a pass, just return. Also got rid of trailing whitespace on some lines.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/lib/ld.exp17
1 files changed, 11 insertions, 6 deletions
diff --git a/ld/testsuite/lib/ld.exp b/ld/testsuite/lib/ld.exp
index f4340d0..659dfe2 100644
--- a/ld/testsuite/lib/ld.exp
+++ b/ld/testsuite/lib/ld.exp
@@ -139,25 +139,30 @@ proc simple_diff { file_1 file_2 } {
}
}
close $file_b
-
+
for { set i 0 } { $i < [llength $list_a] } { incr i } {
set line_a [lindex $list_a $i]
set line_b [lindex $list_b $i]
-
+
verbose "\t$file_1: $i: $line_a\n" 3
verbose "\t$file_2: $i: $line_b\n" 3
if [string compare $line_a $line_b] then {
- fail "Test: $target"
- set differences 1
-
verbose "\t$file_1: $i: $line_a\n" 1
verbose "\t$file_2: $i: $line_b\n" 1
-
+
send_log "\t$file_1: $i: $line_a\n"
send_log "\t$file_2: $i: $line_b\n"
+
+ fail "Test: $target"
+ return
}
}
+ if { [llength $list_a] != [llength $list_b] } {
+ fail "Test: $target"
+ return
+ }
+
if $differences<1 then {
pass "Test: $target"
}