Fix caret tests on Qt 6 and Windows

This commit is contained in:
Florian Bruhin 2024-03-27 19:49:09 +01:00
parent 7a969a2d54
commit 713a4e5ec2
2 changed files with 11 additions and 3 deletions

View File

@ -34,11 +34,11 @@ Feature: Caret mode
Scenario: :yank selection with --keep
When I run :selection-toggle
And I run :move-to-end-of-word
And I run :move-to-next-word
And I run :yank selection --keep
And I run :move-to-end-of-word
And I run :yank selection --keep
Then the message "3 chars yanked to clipboard" should be shown
Then the message "4 chars yanked to clipboard" should be shown
And the message "7 chars yanked to clipboard" should be shown
And the clipboard should contain "one two"

View File

@ -9,7 +9,8 @@ import textwrap
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.utils import usertypes
from qutebrowser.qt import machinery
from qutebrowser.utils import utils, usertypes
from qutebrowser.browser import browsertab
@ -241,6 +242,13 @@ class TestWord:
caret.move_to_end_of_word()
selection.check("one")
@pytest.mark.xfail(
machinery.IS_QT6 and utils.is_windows,
reason=(
"move-to-end-of-word is broken with Qt 6 and Windows: "
"https://github.com/qutebrowser/qutebrowser/issues/8146"
)
)
def test_moving_to_end_and_selecting_a_word(self, caret, selection):
caret.move_to_end_of_word()
selection.toggle()