Tcl Source Code

View Ticket
Login
Ticket UUID: 403189
Title: A couple of interp.test improvements
Type: Patch Version: None
Submitter: mdejong Created on: 2001-01-11 09:25:36
Subsystem: 20. [interp] Assigned To: mdejong
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-03-30 08:04:00
Resolution: Fixed Closed By: hobbs
    Closed on: 2001-03-30 01:04:00
Description:
I found a pwd problem in Jacl while running some interp
related tests, it seems that there are no test in
interp.test that check to see if a child interp inherits
the parent's current working directory. I added a new
test to interp.test to cover that case. I also noticed
a spot where no warning was printed if a test* command
did not exist. In addition, I added a echo statement to
the "make runtest" rule that will make it easy to get
to the test dir when build dir != src dir.
User Comments: hobbs added on 2001-03-30 08:04:00:
Logged In: YES 
user_id=72656

Saw the changes come across, so I'm closing this.

hobbs added on 2001-03-30 02:04:53:
Logged In: YES 
user_id=72656

Looks good to me.

mdejong added on 2001-03-29 18:27:03:

File Added - 4726: patch

Logged In: YES 
user_id=90858

Ok, I reworked this patch a bit so that
if it fails, a string that shows the
expected and failed directory names will
be returned by the test case. I also
left out the bit from the Makefile
since it is not that important. Ok
to check in now?

hobbs added on 2001-03-24 09:15:57:
Logged In: YES 
user_id=72656

We should go ahead with this patch.

As for there not being a test for this before, that's 
because all Tcl's interp share the cwd by OS design.  Of 
course, no harm in testing that.

hobbs added on 2001-03-24 09:14:23:
Logged In: YES 
user_id=72656

We should go ahead with this patch.

As for there not being a test for this before, that's 
because all Tcl's interp share the cwd by OS design.  Of 
course, no harm in testing that.

mdejong added on 2001-01-17 04:13:40:
The tests depend on the current directory
on the user's system, so I would not be
possible to return a known path. Someone
would need to run the test case and
examine the results by hand if it failed.

The "command xyz is not defined" warning
messages are all over the Tcl test suite,
so that should not be an issue. Sure it
might be nice to di it with constraints,
but that would mean rewriting lots of
tests.

I am not sure what you mean about the
echoed message. This would only happen
when the user ran "make runtest", which
is the method you would use to enter
the interactive version of "make test".
The problem is that you don't know
where the $srcdir is but you need to
cd to $srddir/tests before you
can start sourcing test files.

dkf added on 2001-01-16 18:34:36:
I see no reason to not support the addition of the cd/interp test, though you may want to change it a little so that if the test fails, a more informative error message gets spat out by the test harness.

On the warning message, I'm not too sure that any part of the test suite should print up warning messages except for due a test failure.  Doing some kind of fiddling around with constraints (so the existence of certain commands could be turned into a constraint that is not met) would be better, since the presence or absence of a command is really a constraining factor, and skips due to constraint failure get a nice message at the end.

The echoed message just looks a little confusing to me; remember that we are running in a shell-domain here, so random bits of echoed Tcl will confuse as likely as not.  Update it so that it makes sense from either point of view (i.e. by adding additional text) and I'll be much happier.

Attachments: