[squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot'
David T. Lewis
lewis at mail.msen.com
Fri Nov 6 02:14:14 UTC 2020
On Thu, Nov 05, 2020 at 06:41:14PM +0000, Thiede, Christoph wrote:
> Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:.
> On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says:
> "Note that the extension of a complex extension starts from the first period up until the end"
The underlying problem appears to be that someone neglected to write
a test for #extension.
The testBaseAndExtension test appears to be a later addition, and it may
be that the test simply documents an existing bug, so the test itself
may be wrong.
I am attaching a proposed test based on Tony's example.
-------------- next part --------------
'From Squeak6.0alpha of 23 October 2020 [latest update: #20021] on 5 November 2020 at 8:57:43 pm'!!FSPathTest methodsFor: 'tests' stamp: 'dtl 11/5/2020 20:55'!testExtension | path | path := FSPath / 'foo.bar.zot'. self assert: 'zot' equals: path extension.! !
More information about the Squeak-dev