This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: testsuite expect patterns matching tabs



   From: jtc@redback.com (J.T. Conklin)
   Date: 13 Aug 1999 11:33:37 -0700

   The test in question is correct.  Gdb emits a tab, but since tabs are
   expanded to spaces, the expect pattern fails.  However, I don't know
   whether its appropriate to relax the test (or tests --- I haven't had
   time to look at any of the other failures) or to change the test
   harness to change the pty attributes.

There are very few circumstances in which the testsuite ought to be
picky about the number of spaces in the output (column-formatted
output, perhaps).  The rest of the time the tests should be accepting
any combination of whitespace.  Some of the test files do a clever
thing by putting the complicated regexp into a variable, such as in
virtfunc.exp:

	set ws "\[\r\n\t \]+"

It looks a little funky to have ${ws} scattered through an expression,
but the expression is shorter and easier to read, and the matching
rules are more uniform.

								Stan

PS On the other hand, many tests expect exactly one blank in various
places, and GDB will likely always issue one blank - in those cases
there's no need to go overboard and replace with a ${ws}.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]