Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-09-12
04:22 • Closed ticket [1071322fff]: tcltest::Skipped constraint not working for ::, _ an... artifact: 63d064c9ed user: dgp
2004-11-23
14:04 • Ticket [1071322fff]: 4 changes artifact: 39d465e69c user: aakhter
12:42 • Ticket [1071322fff]: 4 changes artifact: 463571a0e1 user: dgp
2004-11-22
22:17 • New ticket [1071322fff]. artifact: 6acfd0f838 user: aakhter

tcltest::Skipped constraint not working for ::, _ and -

Closed / Fixed1071322fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 19 years ago
Descriptionplain2004-11-22 22:17:22
tcltest.tcl:tcltest::Skipped{}

} elseif {[regexp {[^.a-zA-Z0-9 \n\r\t]+} $constraints]
!= 0} {
 # something like {a || b} should be turned into
 # $testConstraints(a) || $testConstraints(b).
 regsub -all {[.\w]+} $constraints {$testConstraints(&)} c
 catch {set doTest [eval expr $c]}
}

is not treating a single constraint with :: in it eg
(a::b::c) as
singular but as  seperate constraints (a, b and c)
Would it be possible to add ':','-' and '_' to the
above regex?
dgpplain2004-11-23 12:42:52
Logged In: YES 
user_id=80530

Thanks for filing the request.

I think the _ request is correct.

The : and - characters are a 
more difficult call, because those
characters are operators in expressions.

   unix ? unixFoo : winFoo

Of course, the very notion of 
constraint expressions is just DWIM
brokenness, and won't appear in
the next major version if
I have anything to say about it.
Until then, though, I'm a bit
shy about breaking existing test
suites.
aakhterplain2004-11-23 14:04:58
Logged In: YES 
user_id=736414

at least for

unix ? unixFoo : winFoo

adding : should be fine, as the ? will match this as an
expression. can't think of any other case where : would be
used in an expression.

The '-' I can't find a workaround for. It would be good to
have a different way to have expression constraints and use
constraints only for the ::tcltest::testConstraint stuff.
dgpplain2007-09-12 04:22:05
Logged In: YES 
user_id=80530
Originator: NO


_ and : added to allowed characters
in a constraint name for tcltest 2.2.9
and 2.3b1.  "-" still disallowed, since
that means subtraction in expressions.
Log in (anonymous is fine) to add a comment.