* gdb.stabs/wierd.exp: Deal with it if echo of "file" command
authorJim Kingdon <jkingdon@engr.sgi.com>
Tue, 17 Aug 1993 04:21:55 +0000 (04:21 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Tue, 17 Aug 1993 04:21:55 +0000 (04:21 +0000)
contains \r because the filename is long.

gdb/testsuite/gdb.stabs/wierd.exp

index 864bc5eb7e75d55175d89e7f9b1c4cd4ce8d3fd2..56d17b32ec1cbaf58e63b530a29cebe0c3776a66 100644 (file)
@@ -218,8 +218,14 @@ if ![file exists $binfile] then {
        # xcoffread.c wrongly bitches about the lack of a text section.
        setup_xfail "rs*-*-aix*"
        send "file $binfile\n"
+       # If $binfile is very long, a \r (but not a \n) will echo in the
+       # middle of the echo of the command.  So to match the echo, we
+       # would like to match anything not containing \n
+       # (we would prefer to be sure not to match any warning message).
+       # But \[^\n\]* doesn't seem to work, so instead use the heuristic
+       # that a filename won't contain a space and a warning message will.
        expect {
-               -re "^file $binfile\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$prompt $" {
+               -re "^file \[^ \]*\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$prompt $" {
                        pass "wierd.o read without error"
                }
                -re ".*$prompt $" {
This page took 0.025339 seconds and 4 git commands to generate.