This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/testsuite] New testcase for set/unset/show substitute-path
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 5 Oct 2006 15:49:18 -0400
- Subject: Re: [RFA/testsuite] New testcase for set/unset/show substitute-path
- References: <20060808230045.GF19846@adacore.com>
On Tue, Aug 08, 2006 at 04:00:45PM -0700, Joel Brobecker wrote:
> Hello,
>
> Here is a first try at implementing a testcase for the new
> substitute-path commands. I'm only testing the manipulation
> of the list of substitution rules at this point, because I still
> don't see how to implement something that would test the actual
> substitution and work in all cases. I figured this is better than
> nothing for now.
Mark's already approved this - I definitely agree that some tests are
better than no tests :-)
As for functionality testing, I would recommend doing it like this.
There's already some samples of creating files and directories during
testing (e.g. corefile.exp, commands.exp). Use that to make two
directories. Put a source file with different contents in each but the
same basename. Compile and debug one of them without issuing a "dir"
command, unlike most of the existing tests, and verify that we find the
file we expect. Then, use "info source" and look for "Compilation
directory"; and that should be all you need to use substitute-path to
point at the other directory, and verify that now list shows the second
file.
Sound reasonable? No rush - just offering the suggestion.
--
Daniel Jacobowitz
CodeSourcery