Commit 5d381854 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Skip line-related tests for GtkEntry

GtkEntry sets single-paragraph mode on its pango layout,
so the results for line-related navigation don't match.
parent 2f758b9b
...@@ -493,6 +493,8 @@ test_words (GtkWidget *widget) ...@@ -493,6 +493,8 @@ test_words (GtkWidget *widget)
#if 0 #if 0
if (GTK_IS_LABEL (widget)) if (GTK_IS_LABEL (widget))
show_text_attributes (gtk_label_get_layout (GTK_LABEL (widget))); show_text_attributes (gtk_label_get_layout (GTK_LABEL (widget)));
else if (GTK_IS_ENTRY (widget))
show_text_attributes (gtk_entry_get_layout (GTK_ENTRY (widget)));
#endif #endif
#if 0 #if 0
...@@ -516,12 +518,20 @@ test_words (GtkWidget *widget) ...@@ -516,12 +518,20 @@ test_words (GtkWidget *widget)
break; break;
} }
printf (" { %2d, %2d, %s %2d, %2d, \"%s\" },\n", i, k, boundary(j), start, end, escape (word)); printf (" { %2d, %2d, %s %2d, %2d, \"%s\" },\n", i, k, boundary(j), start, end, escape (word));
g_free (word); g_free (word);
} }
#endif #endif
for (i = 0; expected[i].offset != -1; i++) for (i = 0; expected[i].offset != -1; i++)
{ {
if (GTK_IS_ENTRY (widget))
{
/* GtkEntry sets single-paragraph mode on its pango layout */
if (expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_START ||
expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_END)
continue;
}
switch (expected[i].gravity) switch (expected[i].gravity)
{ {
case -1: case -1:
...@@ -670,8 +680,8 @@ main (int argc, char *argv[]) ...@@ -670,8 +680,8 @@ main (int argc, char *argv[])
g_test_add_func ("/text/bold/GtkLabel", test_bold_label); g_test_add_func ("/text/bold/GtkLabel", test_bold_label);
add_text_tests (gtk_label_new ("")); add_text_tests (gtk_label_new (""));
add_text_tests (gtk_text_view_new ());
add_text_tests (gtk_entry_new ()); add_text_tests (gtk_entry_new ());
add_text_tests (gtk_text_view_new ());
return g_test_run (); return g_test_run ();
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment