From 5862844d0f443b9f65e8dd0d85c43f8818d3f355 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 27 Feb 2019 18:48:37 +0000 Subject: [PATCH] Test "set width/height -1" As a follow up to the previous commit, add a test for "set width/height -1", to make sure we don't overflow in readline with negative values either. gdb/testsuite/ChangeLog: 2019-02-27 Pedro Alves * gdb.base/page.exp: Add tests for "set width/height -1". --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/page.exp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b5177c7e076..29b2832764f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-02-27 Pedro Alves + + * gdb.base/page.exp: Add tests for "set width/height -1". + 2019-02-27 Pedro Alves * gdb.base/page.exp: Add tests for "set/show width/height" with diff --git a/gdb/testsuite/gdb.base/page.exp b/gdb/testsuite/gdb.base/page.exp index 8f1698c26ef..68d94b38a3a 100644 --- a/gdb/testsuite/gdb.base/page.exp +++ b/gdb/testsuite/gdb.base/page.exp @@ -118,6 +118,9 @@ foreach_with_prefix size {"0" "0x80000000" "unlimited"} { "Number of lines gdb thinks are in a page is unlimited\\." } +gdb_test "set width -1" "integer -1 out of range" +gdb_test "set height -1" "integer -1 out of range" + gdb_exit return 0 -- 2.30.2