set max_line_nr_in_source_file [llength $src_list]
# Ensure there are more lines in the window than in the source file.
-set src_window_lines [expr $max_line_nr_in_source_file + 2]
+set src_window_lines [expr {$max_line_nr_in_source_file + 2}]
# Account for border size.
-set src_window_size [expr $src_window_lines + 2]
+set src_window_size [expr {$src_window_lines + 2}]
Term::command "wh src $src_window_size"
set re_left_margin "___4_"
Term::check_contents "compact source format" \
"$re_border$re_left_margin$re_line_four *$re_border"
-set re_left_margin "___0*[expr $max_line_nr_in_source_file + 1]_"
+set re_left_margin "___0*[expr {$max_line_nr_in_source_file + 1}]_"
Term::check_contents_not "no surplus line number" \
"$re_border$re_left_margin *$re_border"
proc check_boxes {boxes} {
set boxno 1
foreach box $boxes {
- eval Term::check_box [list "box $boxno"] $box
+ Term::check_box [list "box $boxno"] {*}$box
incr boxno
}
}
proc check_boxes {boxes} {
set boxno 1
foreach box $boxes {
- eval Term::check_box [list "box $boxno"] $box
+ Term::check_box [list "box $boxno"] {*}$box
incr boxno
}
}
}
proc check_src_window { testname first_line } {
- set last_line [expr $first_line + 12]
+ set last_line [expr {$first_line + 12}]
Term::check_box_contents $testname 0 0 80 15 \
"^\\s+${first_line}\\s+.*\\s+${last_line}\\s+/\\* Line ${last_line} \\*/\\s+$"
# Take into account that the prompt also takes space.
set prefix [string length "(gdb) "]
- set start [expr $prefix + 1]
+ set start [expr {$prefix + 1}]
# Print chars.
for { set i $start } { $i <= $width } { incr i } {
- set c [expr $i % 10]
+ set c [expr {$i % 10}]
send_gdb $c
append res $c
}
set str [fill_line $wrap_width]
# Remaining space on line.
- set space [string repeat " " [expr $::cols - $wrap_width]]
+ set space [string repeat " " [expr {$::cols - $wrap_width}]]
# Now print the first char we expect to wrap.
send_gdb "W"