Raxol.Test.ClipboardHelpers (Raxol v0.4.0)

View Source

Canonical test helpers for clipboard-related tests in Raxol. Provides utilities for state creation, clipboard command assertions, and Mox setup.

Summary

Functions

Asserts that the clipboard read command is present in the command list.

Asserts that the clipboard write command is present in the command list with the expected content.

Creates a MultiLineInput state for clipboard tests.

Sets up Mox expectations for clipboard copy and paste.

Functions

assert_clipboard_read(commands)

Asserts that the clipboard read command is present in the command list.

assert_clipboard_write(commands, expected_content)

Asserts that the clipboard write command is present in the command list with the expected content.

create_state(value \\ "", cursor_pos \\ {0, 0}, selection \\ nil)

Creates a MultiLineInput state for clipboard tests.

expect_clipboard_copy(mock, content, return_value \\ :ok)

Sets up Mox expectations for clipboard copy and paste.

expect_clipboard_paste(mock, return_value)