@@ -1451,6 +1451,28 @@ def test_VirtualCodebase_can_be_created_without_RecursionError(self):
14511451 test_file = self .get_test_loc ('resource/virtual_codebase/zephyr-binary.json' )
14521452 VirtualCodebase (test_file )
14531453
1454+ def test_VirtualCodebase_can_be_created_with_repeated_root_directory (self ):
1455+ paths = [
1456+ 'to' ,
1457+ 'to/to' ,
1458+ 'to/to/com.liferay.portal.tika-1.0.22.jar' ,
1459+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract' ,
1460+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22' ,
1461+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com' ,
1462+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay' ,
1463+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay/portal' ,
1464+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay/portal/tika' ,
1465+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay/portal/tika/internal' ,
1466+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay/portal/tika/internal/activator' ,
1467+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/com/liferay/portal/tika/internal/activator/TikaBundleActivator.class' ,
1468+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/META-INF' ,
1469+ 'to/to/com.liferay.portal.tika-1.0.22.jar-extract/com.liferay.portal.tika-1.0.22/META-INF/MANIFEST.MF' ,
1470+ ]
1471+ resources = [{'path' : path } for path in paths ]
1472+ vc = VirtualCodebase (location = {'files' : resources })
1473+ walked_paths = [r .path for r in vc .walk ()]
1474+ assert paths == walked_paths
1475+
14541476
14551477class TestResource (FileBasedTesting ):
14561478 test_data_dir = join (dirname (__file__ ), 'data' )
0 commit comments