mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: pack windows platforms case-insensitively
This commit is contained in:
1 parent
5784d45531
commit
7e054fbcaf
2 files changed
+40
No files matched your search
@@ -625,6 +625,8 @@ platforms:
|
||||
source_url: https://raw.githubusercontent.com/RetroBat-Official/emulatorlauncher/master/batocera-systems/Resources/batocera-systems.json
|
||||
source_format: json
|
||||
hash_type: md5
|
||||
# Windows: names differing only by case land on one file.
|
||||
case_insensitive_fs: true
|
||||
schedule: weekly
|
||||
cores:
|
||||
- '81'
|
||||
@@ -812,6 +814,8 @@ platforms:
|
||||
source_wiki: https://raw.githubusercontent.com/EmuDeck/emudeck.github.io/main/docs/tables/
|
||||
source_format: bash_script+csv
|
||||
hash_type: md5
|
||||
# Windows: names differing only by case land on one file.
|
||||
case_insensitive_fs: true
|
||||
schedule: weekly
|
||||
target_scraper: emudeck_targets
|
||||
target_source: https://github.com/dragoonDorise/EmuDeck
|
||||
@@ -976,6 +980,8 @@ platforms:
|
||||
source_url: https://raw.githubusercontent.com/TASEmulators/BizHawk/master/src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs
|
||||
source_format: csharp_firmware_database
|
||||
hash_type: sha1
|
||||
# Windows: names differing only by case land on one file.
|
||||
case_insensitive_fs: true
|
||||
schedule: monthly
|
||||
cores:
|
||||
- applewin
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
"""A platform the installer targets on Windows or macOS packs case-insensitively.
|
||||
|
||||
RetroBat shipped quasi88/N88.ROM (the md5 it pins) beside quasi88/n88.rom;
|
||||
extracted on NTFS the second overwrote the first and RetroBat's own check
|
||||
went red. The flag lived in retrobat.yml and vanished at the next scrape.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
||||
|
||||
|
||||
class CaseInsensitiveWhereTheFilesystemIs(unittest.TestCase):
|
||||
def test_windows_and_macos_platforms_carry_the_flag(self):
|
||||
from common import load_platform_config
|
||||
|
||||
registry = yaml.safe_load((REPO_ROOT / "platforms" / "_registry.yml").read_text())
|
||||
for name, data in registry["platforms"].items():
|
||||
systems = {str(d.get("os")) for d in (data.get("install") or {}).get("detect", [])}
|
||||
if systems & {"windows", "darwin"}:
|
||||
with self.subTest(platform=name):
|
||||
config = load_platform_config(name, str(REPO_ROOT / "platforms"))
|
||||
self.assertTrue(config.get("case_insensitive_fs"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user