Approved-by: Andrew Burgess <aburgess@redhat.com>
}
}
-# Test for BZ#24331
+# Test that 'set elements' correctly limits the number of characters
+# printed from a string when a string ends with repeated characters.
+# This is gdb/24331
+
proc test_repeat_bytes_limit {} {
gdb_test "print -elem 3 -- \"AAAAA\"" "= \"AAA\"..."
gdb_test "print -char 3 -elem 10 -- \"AAAAA\"" "= \"AAA\"..."
"${default_pointer_regexp} \"hel\"..."
check_format_string "a_binary_string" $opts \
"${default_pointer_regexp} \"hel\"..."
- # This will print four characters instead of three, see
- # <https://sourceware.org/bugzilla/show_bug.cgi?id=24331>.
check_format_string "a_binary_string_array" $opts \
"\"hel\"..."
check_format_string "a_big_string" $opts \