Skip to content
Tcl Source Code View Ticket
Login

View Ticket

lsort gives false error output

Closed / Invalid218080ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:52:57
OriginalBugID: 1673 Bug
Version: 8.1b2
SubmitDate: '1999-03-31'
LastModified: '1999-03-31'
Severity: LOW
Status: Closed
Submitter: pat
ChangedBy: stanton
OS: Other
Machine: NA
FixedDate: '2000-10-25'
ClosedDate: '1999-03-31'


Name:

Jeffrey Hobbs



ReproducibleScript:

    (work) 4 % lsort u \374 ule uefa united uass

    bad option "u": must be -ascii, -command, -decreasing, -dictionary,

    -increasing, -index, -integer, or -real

    

    

    This patch only addresses obvious misuse of the lsort args (forgetting

    that

    it takes a list instead of args).  You still get bad option from:

    lsort a b c

    

    







ObservedBehavior:

    This is a case of wrong # args, not bad option.

    







DesiredBehavior:

    I expect to see wrong # args

    







Patch:

ewsx2 [~/src/tcl8.1b2/generic] 33 % diff tclCmdIL.c~ tclCmdIL.c

2443c2443

<     if (objc < 2) {

---

>     if (objc < 2 || objc > 4) {









PatchFiles:

    tclCmdIL.c

    









The included patch is wrong.  It will not allow multiple options to be specified.
For example:  lsort -increasing -index 0 $list

This is not really a bug.
welch Closed ticket [218080ffff]. [History diff]2000-10-26 08:14:45
dgp Ticket [218080ffff]: 4 changes [History diff]2001-04-17 05:36:20
Log in (anonymous is fine) to add a comment.