diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/style.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/style.exp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 78d04b0..010d959 100644 --- a/gdb/testsuite/gdb.base/style.exp +++ b/gdb/testsuite/gdb.base/style.exp @@ -45,6 +45,24 @@ save_vars { env(TERM) } { gdb_test "print &main" " = .* \033\\\[34m$hex\033\\\[m <$main_expr>" + # Regression test for a bug where line-wrapping would occur at the + # wrong spot with styling. There were different bugs at different + # widths, so try two. + foreach width {20 30} { + gdb_test_no_output "set width $width" + # There was also a bug where the styling could be wrong in the + # line listing; this is why the words from the source code are + # spelled out in the final result line of the test. + gdb_test "frame" \ + [multi_line \ + "#0 *$main_expr.*$arg_expr.*" \ + ".*$arg_expr.*" \ + ".* at .*$file_expr.*" \ + "\[0-9\]+.*return.* break here .*" + ] \ + "frame when width=$width" + } + gdb_exit gdb_spawn |