Skip to content

Commit

Permalink
TestSuite: amend "widgets_inputtext_callback_misc"
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Nov 4, 2024
1 parent 7cdea48 commit a686abd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions imgui_test_suite/imgui_tests_widgets_inputtext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,16 @@ void RegisterTests_WidgetsInputText(ImGuiTestEngine* e)
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World");
ctx->KeyPress(ImGuiKey_Tab);
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................");
#if IMGUI_VERSION_NUM >= 19143
// Regression between 19113 and 19120
ctx->KeyChars("!!");
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................!!");
#endif

ctx->KeyCharsReplace("Hello World");
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World");
ctx->KeyPress(ImGuiKey_Tab);
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................");

// Test undo after callback changes
ctx->KeyPress(ImGuiMod_Ctrl | ImGuiKey_Z);
Expand Down

0 comments on commit a686abd

Please sign in to comment.