[TIMOB-3349] iOS: Ti.include() not handling relative pathing properly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-16T11:00:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-18 |
Components | iOS |
Labels | defect, enterprise, ios, reported-1.5.0, rplist |
Reporter | Bill Dawson |
Assignee | Blain Hamon |
Created | 2011-04-15T03:42:43.000+0000 |
Updated | 2011-05-16T11:00:37.000+0000 |
Description
This is the companion ticket to #2585.
The tests are already in drillbit -- see the "includes" test suite in drillbit. So for purposes of meeting our ticketing guideline for "Reproduction sequence", the drillbit suite suffices.
But here's a short summary example as well:
Resources/app.js
Ti.include("l2/l2_included.js");
Resources/l2/l2_included.js
Ti.include("../l1_included.js"); // Fails
Resources/l1_included.js
Ti.API.info("You've reached Resources/l1_included.js");
(from [ebedeb89bd3c5238c53d189286cd15700ba7bf93]) [#3349 state:fixed-in-qa] Hooray for call stacks! it lets us recurse include right. https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c5238c53d189286cd15700ba7bf93"> https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c...
Ran ti.includes Drillbit test against Titanium SDK version: 1.7.0 (03/18/11 12:00 19be393)
iphone results
relativeDown true 9 Success
slashToRoot false 16 should be true, was: false
dotdotSlash true 23 Success
dotSlash true 23 Success
lotsOfDots true 37 Success
I had to revert this change to fix 3411 to allow QE to proceed with testing. Please redress this issue and regress fully against 3411.
Image paths should also be tested, in this or a new ticket.
Just to summarize paths for images, this has been tested on iOS 4.2 / Ti 1.6.0 (3 Feb 2011) with the following results for both the image and backgroundImage properties of imageView (using the simple project attached):
image: 'card/1.png', // no leading slash (relative) works
image: './card/2.png', // leading dot and slash works
image: '/card/3.png', // leading slash does not work
image: 'app://card/4.png', // leading "app://" does not work
Are "app://" cases also being tested? I don't see it in Natalie's Drillbit results.
Tested with 1.7.0.ad264c9 relativeDown false 9 should be true, was: false slashToRoot true 16 Success dotdotSlash false 23 should be true, was: false dotSlash true 23 Success lotsOfDots false 37 should be true, was: false
Forgot to start the progress meter a while back.
TIMOB-3349 #fixed-in-qa When doing an include and there's a leading slash, reset to the root path.
Tested with 1.7.0.879871b...(05/10/11 19:34) relativeDown true 9 Success slashToRoot true 16 Success dotdotSlash true 23 Success dotSlash true 23 Success lotsOfDots true 37 Success