mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #2065 - Part 2: Expand pattern when track file is created rather than read
This fixes build bustage on Windows when using `mach build faster`. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1416465
This commit is contained in:
parent
09cbcd3413
commit
b67d7520b6
3 changed files with 44 additions and 8 deletions
|
|
@ -156,6 +156,29 @@ class TestInstallManifest(TestWithTmpDir):
|
|||
self.assertIn('s_dest2', m1)
|
||||
self.assertIn('c_dest2', m1)
|
||||
|
||||
def test_write_expand_pattern(self):
|
||||
source = self.tmppath('source')
|
||||
os.mkdir(source)
|
||||
os.mkdir('%s/base' % source)
|
||||
os.mkdir('%s/base/foo' % source)
|
||||
|
||||
with open('%s/base/foo/file1' % source, 'a'):
|
||||
pass
|
||||
|
||||
with open('%s/base/foo/file2' % source, 'a'):
|
||||
pass
|
||||
|
||||
m = InstallManifest()
|
||||
m.add_pattern_link('%s/base' % source, '**', 'dest')
|
||||
|
||||
track = self.tmppath('track')
|
||||
m.write(path=track, expand_pattern=True)
|
||||
|
||||
m = InstallManifest(path=track)
|
||||
self.assertEqual([dest for dest in m._dests],
|
||||
['dest/foo/file1', 'dest/foo/file2'])
|
||||
|
||||
|
||||
def test_copier_application(self):
|
||||
dest = self.tmppath('dest')
|
||||
os.mkdir(dest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue