From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jackie Smith Cashion To: Fernando Nasser Cc: GDB Patches Subject: Re: RFA: "show user" output Date: Sun, 09 Sep 2001 10:20:00 -0000 Message-id: <3B9BA381.DD9F24B7@redhat.com> References: <3B97F051.7D3E36C2@redhat.com> <3B98D43B.777559DD@redhat.com> <3B990AFF.2B2AD149@redhat.com> <3B9A5FF3.6F86B916@redhat.com> <3B9ACF17.52E37573@redhat.com> <3B9B86B7.99F8745F@redhat.com> X-SW-Source: 2001-09/msg00124.html Fernando Nasser wrote: > > I have only one question: how come there wasn't a FAILing test in > gdb.base/commands.exp (or there was)? And in gdb.mi? There is the following test in commands.exp: send_gdb "define mycommand\n" ... gdb_test "while \$arg0 > 0\nset \$arg0 -= 1\nif \(\$arg0 % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \ ... gdb_test "mycommand \$foo" \ ... gdb_test "show user mycommand" \ "while.*set.*if.*p/x.*else.*p/x.*end.*" \ "display user command in user_defined_command_test" Obviously, I've cut out several lines from the actual test. But if you look at the last call to gdb_test you see that it simply checks to see that the macro keywords appear in the output. The test doesn't look for proper "whitespace". This test also would not detect our current problem where the keywords are printed twice. > Tradition says that as you've fixed it you should also add a little > test to prevent it to be broken again ;-) At this time I know nearly nothing about expect scripts. I don't mind learning about them. To help me along does anyone want to offer a suggestion about testing for "whitespace" and extra keyword output in this test? Jackie Smith Cashion email: jsmith@redhat.com phone: 931 438 2432