Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006666 [Squeak] Collections minor always 09-09-07 13:30 09-10-07 00:25
Reporter JTS View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 3.10
  Product Build
Summary 0006666: Bugs in String>>#withoutTrailingDigits
Description StringTest>>#testWithoutTrailingDigits

       self assert: ' 1abc23' withoutTrailingDigits2 = ' 1abc'.
    self assert: '123 ' withoutTrailingDigits2 = ''.
    self assert: 'abc ' withoutTrailingDigits2 = 'abc'.
    self assert: '' withoutTrailingDigits = ''

This test will fail:

        self assert: ' 1abc23' withoutTrailingDigits2 = ' 1abc'.

It returns an empty string instead.
Steps To Reproduce
Additional Information This will past the tests:

withoutTrailingDigits2

    "Answer the portion of the receiver that precedes any trailing series of digits and blanks. If the receiver consists entirely of digits and blanks, return an empty string"

    | firstDigit |
    firstDigit := (self findLast: [:each | each isDigit not and: [(each = Character space) not]]).
    ^ firstDigit > 0
        ifTrue:
            [self copyFrom: 1 to: firstDigit]
        ifFalse:
            ['']
Attached Files

- Relationships

- Notes
(0011103 - 147 - 183 - 183 - 183 - 183 - 183)
wiz
09-10-07 00:25

Cool,

Please submit code and tests as uploads.

That will help testing and speed harvesting.

Yours in curiosity and service, --Jerome Peace
 

- Issue History
Date Modified Username Field Change
09-09-07 13:30 JTS New Issue
09-10-07 00:25 wiz Note Added: 0011103


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
32 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker