Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3349] iOS: Ti.include() not handling relative pathing properly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-05-16T11:00:37.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-18
ComponentsiOS
Labelsdefect, enterprise, ios, reported-1.5.0, rplist
ReporterBill Dawson
AssigneeBlain Hamon
Created2011-04-15T03:42:43.000+0000
Updated2011-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");

Comments

  1. Jeff Haynie 2011-04-15

    (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...

  2. Natalie Huynh 2011-04-15

    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

  3. Reggie Seagraves 2011-04-15

    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.

  4. hal 2011-04-15

    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.

  5. Natalie Huynh 2011-04-19

    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
  6. Blain Hamon 2011-05-04

    Forgot to start the progress meter a while back.
  7. Blain Hamon 2011-05-04

    TIMOB-3349 #fixed-in-qa When doing an include and there's a leading slash, reset to the root path.
  8. Natalie Huynh 2011-05-11

    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

JSON Source