From 47aaad9908a675baddb2e5ef38f7e1ba1d608f46 Mon Sep 17 00:00:00 2001 From: Spencer Phillip Young Date: Mon, 8 Jul 2024 17:58:43 -0700 Subject: [PATCH] add test for GH-328 --- tests/_async/test_keys.py | 11 +++++++++++ tests/_sync/test_keys.py | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/tests/_async/test_keys.py b/tests/_async/test_keys.py index 5615794..669ce84 100644 --- a/tests/_async/test_keys.py +++ b/tests/_async/test_keys.py @@ -50,6 +50,17 @@ async def test_hotstring(self): assert 'by the way' in await self.win.get_text() + async def test_hotstring_cyrillic(self): + # https://github.com/spyoungtech/ahk/issues/328 + self.ahk.add_hotstring('тест', 'hello world') + self.ahk.start_hotkeys() + await self.ahk.set_send_level(1) + await self.win.activate() + await self.ahk.send('тест ') + time.sleep(2) + + assert 'hello world' in await self.win.get_text() + async def test_remove_hotstring(self): self.ahk.add_hotstring('btw', 'by the way') self.ahk.start_hotkeys() diff --git a/tests/_sync/test_keys.py b/tests/_sync/test_keys.py index e690cde..d4335ae 100644 --- a/tests/_sync/test_keys.py +++ b/tests/_sync/test_keys.py @@ -49,6 +49,16 @@ def test_hotstring(self): assert 'by the way' in self.win.get_text() + def test_hotstring_cyrillic(self): + self.ahk.add_hotstring('тест', 'hello world') + self.ahk.start_hotkeys() + self.ahk.set_send_level(1) + self.win.activate() + self.ahk.send('тест ') + time.sleep(2) + + assert 'hello world' in self.win.get_text() + def test_remove_hotstring(self): self.ahk.add_hotstring('btw', 'by the way') self.ahk.start_hotkeys()