Skip to content

Commit

Permalink
add test for GH-328
Browse files Browse the repository at this point in the history
  • Loading branch information
spyoungtech committed Jul 9, 2024
1 parent 86d9e56 commit 47aaad9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/_async/test_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 10 additions & 0 deletions tests/_sync/test_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 47aaad9

Please sign in to comment.