diff --git a/tests/conform/test-clutter-text.c b/tests/conform/test-clutter-text.c index 20cdb538c..6814013a8 100644 --- a/tests/conform/test-clutter-text.c +++ b/tests/conform/test-clutter-text.c @@ -301,6 +301,25 @@ test_text_delete_text (TestConformSimpleFixture *fixture, clutter_actor_destroy (CLUTTER_ACTOR (text)); } +void +test_text_password_char (TestConformSimpleFixture *fixture, + gconstpointer data) +{ + ClutterText *text = CLUTTER_TEXT (clutter_text_new ()); + + g_assert_cmpint (clutter_text_get_password_char (text), ==, 0); + + clutter_text_set_text (text, "hello"); + g_assert_cmpstr (clutter_text_get_text (text), ==, "hello"); + + clutter_text_set_password_char (text, '*'); + g_assert_cmpint (clutter_text_get_password_char (text), ==, '*'); + + g_assert_cmpstr (clutter_text_get_text (text), ==, "hello"); + + clutter_actor_destroy (CLUTTER_ACTOR (text)); +} + static void init_event (ClutterKeyEvent *event) { diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index abf6280b2..1b8d54c0f 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -82,6 +82,7 @@ main (int argc, char **argv) TEST_CONFORM_SIMPLE ("/text", test_text_event); TEST_CONFORM_SIMPLE ("/text", test_text_get_chars); TEST_CONFORM_SIMPLE ("/text", test_text_cache); + TEST_CONFORM_SIMPLE ("/text", test_text_password_char); TEST_CONFORM_SIMPLE ("/rectangle", test_rect_set_size); TEST_CONFORM_SIMPLE ("/rectangle", test_rect_set_color);