Match the whole error message expected to be given rather than omitting
the part about the "unlimited" keyword. There's no point in omitting
the missing part first, and second with an upcoming change the part in
parentheses will no longer be a fixed string, so doing a full match will
ensure the algorithm correctly builds the message expected here. Also
avoid any wildcard matches.
#test set print demangle
gdb_test_no_output "set print demangle" "set print demangle"
#test set print elements
-gdb_test "set print elements" "Argument required .integer to set it to.*"
+gdb_test "set print elements" \
+ "Argument required \\(integer to set it to, or \"unlimited\"\\)\\."
#test set print object
gdb_test_no_output "set print object" "set print object"
#test set print pretty