Skip to content

Commit a686abd

Browse files
committed
TestSuite: amend "widgets_inputtext_callback_misc"
ocornut/imgui#7925
1 parent 7cdea48 commit a686abd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

imgui_test_suite/imgui_tests_widgets_inputtext.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,16 @@ void RegisterTests_WidgetsInputText(ImGuiTestEngine* e)
11171117
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World");
11181118
ctx->KeyPress(ImGuiKey_Tab);
11191119
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................");
1120+
#if IMGUI_VERSION_NUM >= 19143
1121+
// Regression between 19113 and 19120
1122+
ctx->KeyChars("!!");
1123+
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................!!");
1124+
#endif
1125+
1126+
ctx->KeyCharsReplace("Hello World");
1127+
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World");
1128+
ctx->KeyPress(ImGuiKey_Tab);
1129+
IM_CHECK_STR_EQ(vars.CompletionBuffer.c_str(), "Hello World.......................................");
11201130

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

0 commit comments

Comments
 (0)