Commit 4d60ee85 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Make test-layout use layout serialization

Now that we have this api, lets use it for
our tests.
parent 2aead7a8
{
"text" : "This is a test of the automatic emergency brake!\n",
"attributes" : [
{
"start" : 22,
"end" : 41,
"type" : "foreground",
"value" : "#00000000ffff"
},
{
"start" : 22,
"end" : 41,
"type" : "underline",
"value" : "single"
}
],
"font" : "Cantarell 11",
"ellipsize" : "end",
"width" : 225280
}
width=220,ellipsize=end
This is a test of the <span foreground="#0000ff" underline="single">automatic emergency</span> brake!
{
"text" : "Hello שלום Γειά σας\n",
"attributes" : [],
"font" : "Cantarell 11",
"justify" : true,
"ellipsize" : "end",
"width" : 102400
}
width=100,justify=true,ellipsize=end
Hello שלום Γειά σας
{
"text" : "double low error\n",
"attributes" : [
{
"end" : 6,
"type" : "underline",
"value" : "double"
},
{
"end" : 6,
"type" : "overline",
"value" : "single"
},
{
"start" : 7,
"end" : 10,
"type" : "underline",
"value" : "low"
},
{
"start" : 7,
"end" : 10,
"type" : "strikethrough",
"value" : true
},
{
"start" : 11,
"end" : 16,
"type" : "underline",
"value" : "error"
},
{
"start" : 11,
"end" : 16,
"type" : "rise",
"value" : 1024
}
],
"font" : "Cantarell 11",
"wrap" : "char",
"width" : 225280
}
width=220,wrap=char
<span underline='double' overline='single'>double</span> <span underline='low' strikethrough='true'>low</span> <span underline='error' rise='1024'>error</span>
{
"text" : "a b c d
e f g h\n",
"attributes" : [],
"font" : "Cantarell 11",
"tabs" : {
"positions-in-pixels" : true,
"positions" : [
0,
50,
100,
150,
200
]
}
}
wrap=word,tabs=0 50 100 150 200
a b c d
e f g h
{
"text" : "a b c d
e f g h\n",
"attributes" : [],
"font" : "Cantarell 11",
"tabs" : {
"positions-in-pixels" : true,
"positions" : [
0,
50,
100,
150,
200
]
},
"single-paragraph" : true
}
wrap=word,tabs=0 50 100 150 200,single_paragraph=true
a b c d
e f g h
{
"text" : "你好 Hello שלום Γειά σας\n",
"attributes" : [],
"font" : "Cantarell 11",
"ellipsize" : "start",
"width" : 161792,
"line-spacing" : 1.5
}
line_spacing=1.5,width=158,ellipsize=start
你好 Hello שלום Γειά σας
{
"text" : "Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.\n",
"attributes" : [],
"font" : "Cantarell 11",
"ellipsize" : "end",
"width" : 153600,
"height" : 40960
}
ellipsize=end,height=40,width=150
Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.
{
"text" : "Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.\n",
"attributes" : [],
"font" : "Cantarell 11",
"wrap" : "word-char",
"ellipsize" : "end",
"width" : 153600,
"height" : -2
}
wrap=word-char,ellipsize=end,width=150,height=-2
Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.
{
"text" : "some|bla|bla|bla\n",
"attributes" : [],
"font" : "Cantarell 11",
"justify" : true,
"width" : 102400
}
justify=true,width=100
some|bla|bla|bla
{
"text" : "some line breaks
and mis­ce­llaneous ignora‌bles\n",
"attributes" : [
{
"end" : 57,
"type" : "show",
"value" : 7
}
],
"font" : "Cantarell 11"
}
<span show="spaces|line-breaks|ignorables">some line breaks
and mis­ce­llaneous ignora‌bles</span>
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