[PATCH v4 0/1] MR320: riched20/tests: Test for ITextDocument::Undo and ITextDocument::Redo (#53289).

Jinoh Kang (@iamahuman) wine at gitlab.winehq.org
Mon Jul 4 09:38:16 CDT 2022


Jinoh Kang (@iamahuman) commented about dlls/riched20/tests/richole.c:
> +      {
> +        LONG_PTR cur_undo_limit = SendMessageA(inst->hwnd, EM_SETUNDOLIMIT, inst->undo_limit, 0);
> +        ok(cur_undo_limit == inst->undo_limit, "Expected undo limit %Id, got %Id\n",
> +           inst->undo_limit, cur_undo_limit);
> +        if (count) *count = 0;
> +      }
> +      else
> +      {
> +        hr = ITextDocument_Undo(inst->doc, tomTrue, count);
> +        todo_wine
> +        ok(hr == S_FALSE, "Undo: %#lx\n", hr);
> +      }
> +      if (SUCCEEDED(hr) && inst->undo_ctl_state == undoStateDisabled)
> +      {
> +        inst->undo_ctl_state = undoStateActive;
> +        inst->last_undo_status = TRUE;
This models the complex behaviour of riched20's undo/redo status return.
Note that adding `inst->last_undo_status = TRUE;` makes the test fail.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/320#note_3237



More information about the wine-devel mailing list