Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-03-30
08:04 • Closed ticket [403189ffff]: A couple of interp.test improvements plus 7 othe... artifact: e9c2eb9cab user: hobbs
02:04 • Ticket [403189ffff]: 4 changes artifact: e210070732 user: hobbs
2001-03-29
18:27 • Ticket [403189ffff]: 4 changes artifact: ba1223850a user: mdejong
18:27 • Add attachment patch to ticket [403189ffff] artifact: 2511aced96 user: mdejong
2001-03-24
09:15 • Ticket [403189ffff] A couple of interp.test improvements status still Open w... artifact: 34e1e0fdbb user: hobbs
09:14 • Ticket [403189ffff]: 5 changes artifact: 3c0c4bf010 user: hobbs
2001-02-22
07:03 • Ticket [403189ffff]: 1 change artifact: 28072c6ede user: dgp
2001-01-17
04:13 • Ticket [403189ffff]: 4 changes artifact: 32bb097c21 user: mdejong
2001-01-16
18:34 • Ticket [403189ffff]: 4 changes artifact: bb1af1389a user: dkf
2001-01-11
16:25 • Add attachment None to ticket [403189ffff] artifact: 9fd0ce016d user: mdejong
09:25 • New ticket [403189ffff] A couple of interp.test improvements. artifact: 5f2b831092 user: mdejong

A couple of interp.test improvements

Closed / Fixed403189ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2001-01-11 09:25:36
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.
dkfplain2001-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.
mdejongplain2001-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.
dgp Ticket [403189ffff]: 1 change [History diff]2001-02-22 07:03:00
hobbsplain2001-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.
hobbsplain2001-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.
mdejongplain2001-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?
hobbsplain2001-03-30 02:04:53
Logged In: YES 
user_id=72656

Looks good to me.
hobbsplain2001-03-30 08:04:00
Logged In: YES 
user_id=72656

Saw the changes come across, so I'm closing this.
Log in (anonymous is fine) to add a comment.

Attachments: