summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 07:08:19 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 07:08:19 -0400
commit28ebc17785a8cca52f289b74261d1f310fd35904 (patch)
tree2a7f96f01f05e8207f1935fdadc2d2a4c3359968 /tests
parentbc75bb93d5aa9aa176262a138f47d3a1d53afbcb (diff)
downloaddecky-lsfg-vk-28ebc17785a8cca52f289b74261d1f310fd35904.tar.gz
decky-lsfg-vk-28ebc17785a8cca52f289b74261d1f310fd35904.zip
fix: detect wrapped Flatpak shortcuts
Diffstat (limited to 'tests')
-rw-r--r--tests/test_steam_service.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/test_steam_service.py b/tests/test_steam_service.py
index 849bb01..9924186 100644
--- a/tests/test_steam_service.py
+++ b/tests/test_steam_service.py
@@ -51,6 +51,24 @@ class SteamTransportTests(unittest.TestCase):
),
{"kind": "host"},
)
+ self.assertEqual(
+ classify_shortcut_transport(
+ "~/.lsfg",
+ "run --branch=stable --arch=x86_64 com.example.PCSX2",
+ ),
+ {"kind": "flatpak", "flatpakAppId": "com.example.PCSX2"},
+ )
+ self.assertEqual(
+ classify_shortcut_transport(
+ "/home/deck/.lsfg",
+ "run com.example.PCSX2",
+ ),
+ {"kind": "flatpak", "flatpakAppId": "com.example.PCSX2"},
+ )
+ self.assertEqual(
+ classify_shortcut_transport("~/.lsfg", "--profile high"),
+ {"kind": "host"},
+ )
def test_shortcut_data_preserves_transport_inputs(self):
game = SteamService._shortcut_game(
@@ -72,6 +90,21 @@ class SteamTransportTests(unittest.TestCase):
self.assertEqual(game["arguments"], "run net.pcsx2.PCSX2 --fullscreen")
self.assertEqual(game["startDir"], "/home/deck/Games")
+ def test_wrapped_flatpak_shortcut_remains_a_flatpak_target(self):
+ game = SteamService._shortcut_game(
+ {
+ "appid": 987654,
+ "AppName": "Wrapped Flatpak",
+ "Exe": "~/.lsfg",
+ "LaunchOptions": "run --branch=stable --arch=x86_64 com.example.Game",
+ }
+ )
+
+ self.assertEqual(game["transport"], {
+ "kind": "flatpak",
+ "flatpakAppId": "com.example.Game",
+ })
+
if __name__ == "__main__":
unittest.main()