#NEWLINE# def testLinkFileRemap( self ) : #NEWLINE# #INDENT# recipestr1 = "\nclass LinkFileRemap(PackageRecipe):\n    name = 'test'\n    version = '0'\n    clearBuildReqs()\n\n    def setup(self):\n        # these files should end up in the foo package (CNY-1679)\n        # we're looking to prove that Link followed a PackageSpec through\n        # the path translation process\n        self.Create('/foo/file', package = 'foo')\n        # we have to know that the target of our link is going to be renamed\n        self.Link('/foo/link', '/foo/file', package = 'foo')\n" #NEWLINE# self . addPolicy ( renamePolicy ) #NEWLINE# ( built , d ) = self . buildRecipe ( recipestr1 , 'LinkFileRemap' ) #NEWLINE# self . assertEquals ( len ( trv ) , 1 ) #NEWLINE# self . assertEquals ( built [ 0 ] [ 0 ] , 'foo:runtime' ) #NEWLINE# repos = self . openRepository ( ) #NEWLINE# trvNVF = repos . findTrove ( None , built [ 0 ] ) #NEWLINE# trv = repos . getTrove ( * trvNVF [ 0 ] ) #NEWLINE# fileNames = [ x [ 1 ] for x in trv . iterFileList ( ) ] #NEWLINE# self . assertFalse ( ( '/foo/link-1' not in fileNames ) )