diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:41:06 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:41:06 +0200 |
| commit | 70bc720156f8ff315fcf54f478becfdf098f3994 (patch) | |
| tree | 4964af822d39d9485e10f802b73199e971f8af76 /tests | |
| parent | 69000b4e6acf9ecad0d3d9220bca6c1433993d6c (diff) | |
Detect cross-line feedback migration
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index b0f9cee..e73dda7 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6374,6 +6374,31 @@ test("Full feedback finalization preserves reusable sequence data", function() same(dictionary, state:get_migemo("utf-8")) end) +test("Command feedback migration compares origin and destination lines", function() + same( + nil, + feedback_service.command_migration_reason({ + origin = domain.Position.new(2, 1), + destination = domain.Position.new(2, 7), + }) + ) + same( + feedback_service.MigrationReason.LINE_CHANGE, + feedback_service.command_migration_reason({ + origin = domain.Position.new(2, 7), + destination = domain.Position.new(3, 1), + }) + ) + same( + nil, + feedback_service.command_migration_reason({ + origin = domain.Position.new(2, 7), + destination = domain.Position.new(3, 1), + outcome = { complete = false }, + }) + ) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
