diff options
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 |
