Re: [patch] testsuite: Error on trailing newlines

Jan Kratochvil
2010-06-28T19:51:04Z

On Thu, 03 Jun 2010 01:02:35 +0200, Joel Brobecker wrote:
> > * lib/gdb.exp (gdb_test_multiple): Error on trailing newlines.
>
> This part is OK as far as I am concerned, but let's hold off on it
> for a couple of days, to see if others have any comment about it.

After 25 days going to check it in a day (or upon approval).

Changed the message text.

Rechecked no regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.

Thanks,
Jan

gdb/testsuite/
2010-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
Joel Brobecker <brobecker@adacore.com>

* lib/gdb.exp (gdb_test_multiple): Error on trailing newlines.

--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -573,6 +573,10 @@ proc gdb_test_multiple { command message user_code } {
set message $command
}

+ if [string match "*\[\r\n\]" $command] {
+ error "Invalid trailing newline in \"$message\" test"
+ }
+
# TCL/EXPECT WART ALERT
# Expect does something very strange when it receives a single braced
# argument. It splits it along word separators and performs substitutions.