-# Copyright 2019 Free Software Foundation, Inc.
+# Copyright 2019-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Term::command "list main"
Term::check_contents "list main" "21 *return 0"
-# This check fails because the file name in the title overwrites the
-# box.
-setup_xfail *-*-*
-Term::check_box "source box" 3 0 77 15
+# Get the first source line.
+set line [Term::get_line 1]
+# Send an up arrow.
+send_gdb "\033\[A"
+# Wait for a redraw and check that the first line changed.
+if {[Term::wait_for [string_to_regexp $line]] \
+ && [Term::get_line 1] != $line\
+ && [Term::get_line 2] == $line} {
+ pass "scroll up"
+} else {
+ fail "scroll up"
+}
+
+Term::check_box "source box" 0 0 80 15
Term::command "layout asm"
Term::check_contents "asm window shows main" "$hex <main>"
-Term::check_box "asm box" 3 0 77 15
+Term::check_box "asm box" 0 0 80 15
Term::command "layout split"
Term::check_contents "split layout contents" "21 *return 0.*$hex <main>"
-# This check fails because the file name in the title overwrites the
-# box.
-setup_xfail *-*-*
-Term::check_box "source box in split layout" 3 0 77 8
-Term::check_box "asm box in split layout" 3 7 77 8
+Term::check_box "source box in split layout" 0 0 80 7
+Term::check_box "asm box in split layout" 0 6 80 9