build.plat: in Platform.add_file(), allow adding exact duplicates.

This commit is contained in:
whitequark 2019-11-15 23:40:44 +00:00
parent fe400b5dbc
commit 834fe3c700
2 changed files with 10 additions and 4 deletions

View file

@ -25,6 +25,10 @@ class PlatformTestCase(FHDLTestCase):
self.platform.add_file("x.txt", b"foo")
self.assertEqual(self.platform.extra_files["x.txt"], b"foo")
def test_add_file_exact_duplicate(self):
self.platform.add_file("x.txt", b"foo")
self.platform.add_file("x.txt", b"foo")
def test_add_file_io(self):
with open(__file__) as f:
self.platform.add_file("x.txt", f)