Version bump.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Storm Dragon <storm_dragon@stormux.org>
|
# Maintainer: Storm Dragon <storm_dragon@stormux.org>
|
||||||
|
|
||||||
pkgname=cthulhu
|
pkgname=cthulhu
|
||||||
pkgver=2026.03.02
|
pkgver=2026.05.02
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Desktop-agnostic screen reader with plugin system, forked from Orca"
|
pkgdesc="Desktop-agnostic screen reader with plugin system, forked from Orca"
|
||||||
url="https://git.stormux.org/storm/cthulhu"
|
url="https://git.stormux.org/storm/cthulhu"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
project('cthulhu',
|
project('cthulhu',
|
||||||
version: '2026.03.02-master',
|
version: '2026.05.02-master',
|
||||||
meson_version: '>= 1.0.0',
|
meson_version: '>= 1.0.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -23,5 +23,5 @@
|
|||||||
# Forked from Orca screen reader.
|
# Forked from Orca screen reader.
|
||||||
# Cthulhu project: https://git.stormux.org/storm/cthulhu
|
# Cthulhu project: https://git.stormux.org/storm/cthulhu
|
||||||
|
|
||||||
version = "2026.03.02"
|
version = "2026.05.02"
|
||||||
codeName = "master"
|
codeName = "master"
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
|
||||||
|
|
||||||
|
from cthulhu.plugins.nvda2cthulhu import plugin as nvda_plugin
|
||||||
|
|
||||||
|
|
||||||
|
class Nvda2CthulhuRegressionTests(unittest.TestCase):
|
||||||
|
def _make_plugin(self):
|
||||||
|
plugin = nvda_plugin.Nvda2Cthulhu.__new__(nvda_plugin.Nvda2Cthulhu)
|
||||||
|
plugin.interruptEnabled = True
|
||||||
|
plugin._dependencies_available = mock.Mock(return_value=True)
|
||||||
|
return plugin
|
||||||
|
|
||||||
|
def test_text_cancel_speech_frame_is_cancel_request(self):
|
||||||
|
plugin = self._make_plugin()
|
||||||
|
|
||||||
|
self.assertEqual(("CancelSpeech", None), plugin._parse_request("CancelSpeech"))
|
||||||
|
|
||||||
|
def test_websocket_speech_is_queued_instead_of_handled_synchronously(self):
|
||||||
|
plugin = self._make_plugin()
|
||||||
|
plugin._translation_enabled = mock.Mock(return_value=False)
|
||||||
|
|
||||||
|
with mock.patch.object(nvda_plugin.speech, "speak") as speak:
|
||||||
|
plugin.handle_message("hello")
|
||||||
|
|
||||||
|
speak.assert_not_called()
|
||||||
|
|
||||||
|
def test_queued_websocket_speech_runs_on_main_loop(self):
|
||||||
|
if not hasattr(nvda_plugin, "GLib"):
|
||||||
|
self.fail("nvda2cthulhu does not expose a GLib main-loop dispatcher")
|
||||||
|
|
||||||
|
plugin = self._make_plugin()
|
||||||
|
plugin._translation_enabled = mock.Mock(return_value=False)
|
||||||
|
|
||||||
|
with mock.patch.object(nvda_plugin.GLib, "idle_add", side_effect=lambda callback, *args: callback(*args)), \
|
||||||
|
mock.patch.object(nvda_plugin.speech, "speak") as speak:
|
||||||
|
plugin.handle_message("hello")
|
||||||
|
|
||||||
|
speak.assert_called_once_with("hello", interrupt=True)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user