Commit b6bd3ef4 authored by Benjamin Otte's avatar Benjamin Otte Committed by Matthias Clasen
Browse files

tests: Add line breaks when dumping text attributes

This improves diff readability a lot when attributes differ.
parent 4227a63f
......@@ -13,6 +13,32 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
image size: -1 x -1
image description: (null)
......@@ -238,7 +238,6 @@ dump_text_attributes (GString *string,
if (attributes == NULL)
return;
g_string_append_printf (string, "%*s%s:", depth, "", name);
for (l = attributes; l; l = l->next)
{
attr = l->data;
......@@ -254,9 +253,20 @@ dump_text_attributes (GString *string,
value = "<omitted>";
else
value = attr->value;
g_string_append_printf (string, " %s:%s", attr->name, value);
if (name)
{
/* first time this loop is run */
g_string_append_printf (string, "%*s%s: %s: %s\n", depth, "", name, attr->name, value);
depth += strlen (name) + 2;
name = NULL;
}
else
{
/* every other time */
g_string_append_printf (string, "%*s%s: %s\n", depth, "", attr->name, value);
}
}
g_string_append_c (string, '\n');
atk_attribute_set_free (attributes);
}
......
......@@ -20,7 +20,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......
......@@ -46,7 +46,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......@@ -70,7 +96,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......@@ -92,7 +144,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......@@ -114,7 +192,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......
......@@ -20,7 +20,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......
......@@ -20,7 +20,33 @@ window1
text: Hello World!
character count: 12
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: -1 x -1
image description: (null)
......
......@@ -30,7 +30,33 @@ window1
text: Entry:
character count: 6
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
entry1
"text"
parent: box1
......@@ -45,7 +71,33 @@ window1
text: text
character count: 4
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:65535,65535,65535 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 65535,65535,65535
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkAction>
action 0 name: activate
action 0 keybinding: <Alt>e
......@@ -31,7 +31,33 @@ window1
text: Tab 1
character count: 5
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
page1
"push button"
index: 0
......@@ -45,7 +71,33 @@ window1
text: Yes
character count: 3
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: 20 x 20
image description: (null)
......@@ -67,7 +119,33 @@ window1
text: Tab 2
character count: 5
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
page2
"push button"
index: 1
......@@ -81,7 +159,33 @@ window1
text: No
character count: 2
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkImage>
image size: 20 x 20
image description: (null)
......
......@@ -19,7 +19,33 @@ window1
text: ‎45.5
character count: 5
caret offset: 0
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
default attributes: left-margin: 0
right-margin: 0
indent: 0
invisible: false
editable: false
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
bg-full-height: 0
scale: 1
rise: 0
underline: none
strikethrough: false
bg-stipple: false
fg-stipple: false
fg-color: 0,0,0
bg-color: 56540,56026,54741
wrap-mode: word
justification: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
stretch: <omitted>
variant: <omitted>
style: <omitted>
language: <omitted>
direction: <omitted>
<AtkAction>
action 0 name: activate
<AtkValue>
......
......@@ -20,6 +20,30 @@ window1
Did gyre and gimple in the wabe
character count: 66
caret offset: 66
default attributes: right-margin:0 left-margin:0 indent:0 pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 rise:0 language:<omitted> scale:1 fg-color:0,0,0 bg-color:65535,65535,65535 invalid:none invalid:false invalid:false invalid:false left-margin:true invalid:none left-margin:ltr invalid:left size:<omitted> weight:<omitted> family-name:<omitted> invisible:normal invalid:normal invalid:normal
default attributes: right-margin: 0
left-margin: 0
indent: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
rise: 0
language: <omitted>
scale: 1
fg-color: 0,0,0
bg-color: 65535,65535,65535
invalid: none
invalid: false
invalid: false
invalid: false
left-margin: true
invalid: none
left-margin: ltr
invalid: left
size: <omitted>
weight: <omitted>
family-name: <omitted>
invisible: normal
invalid: normal
invalid: normal
<AtkStreamableContent>
mime types: application/x-gtk-text-buffer-rich-text text/plain
This diff is collapsed.
Markdown is supported
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