mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Add a few tests for G_MARKUP_TREAT_CDATA_AS_TEXT
Related to https://bugzilla.gnome.org/show_bug.cgi?id=725433
This commit is contained in:
parent
b93a13bb79
commit
79caa3a7e1
@ -146,10 +146,17 @@ markup_tests = \
|
||||
valid-1 valid-2 valid-3 valid-4 valid-5 \
|
||||
valid-6 valid-7 valid-8 valid-9 valid-10 \
|
||||
valid-11 valid-12 valid-13 valid-14 valid-15 \
|
||||
valid-16 \
|
||||
$(NULL)
|
||||
|
||||
cdata_markup_tests = \
|
||||
valid-8 valid-16 \
|
||||
$(NULL)
|
||||
|
||||
dist_test_data += $(all_markup_data)
|
||||
all_markup_data = $(addprefix markups/,$(markup_tests:=.gmarkup) $(markup_tests:=.expected))
|
||||
all_markup_data = \
|
||||
$(addprefix markups/,$(markup_tests:=.gmarkup) $(markup_tests:=.expected)) \
|
||||
$(addprefix markups/,$(cdata_markup_tests.=.cdata-as-text))
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
42
glib/tests/markups/valid-16.cdata-as-text
Normal file
42
glib/tests/markups/valid-16.cdata-as-text
Normal file
@ -0,0 +1,42 @@
|
||||
ELEMENT 'a'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'c1'
|
||||
TEXT 'c1'
|
||||
END 'c1'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'c2'
|
||||
TEXT 'c2'
|
||||
END 'c2'
|
||||
TEXT '
|
||||
'
|
||||
END 'b'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b1'
|
||||
TEXT 'b1'
|
||||
END 'b1'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b2'
|
||||
TEXT 'b2'
|
||||
END 'b2'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b3'
|
||||
TEXT 'b3'
|
||||
END 'b3'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b4'
|
||||
TEXT ''
|
||||
TEXT 'This is CDATA'
|
||||
TEXT ''
|
||||
END 'b4'
|
||||
TEXT '
|
||||
'
|
||||
END 'a'
|
42
glib/tests/markups/valid-16.expected
Normal file
42
glib/tests/markups/valid-16.expected
Normal file
@ -0,0 +1,42 @@
|
||||
ELEMENT 'a'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'c1'
|
||||
TEXT 'c1'
|
||||
END 'c1'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'c2'
|
||||
TEXT 'c2'
|
||||
END 'c2'
|
||||
TEXT '
|
||||
'
|
||||
END 'b'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b1'
|
||||
TEXT 'b1'
|
||||
END 'b1'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b2'
|
||||
TEXT 'b2'
|
||||
END 'b2'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b3'
|
||||
TEXT 'b3'
|
||||
END 'b3'
|
||||
TEXT '
|
||||
'
|
||||
ELEMENT 'b4'
|
||||
TEXT ''
|
||||
PASS '<![CDATA[This is CDATA]]>'
|
||||
TEXT ''
|
||||
END 'b4'
|
||||
TEXT '
|
||||
'
|
||||
END 'a'
|
10
glib/tests/markups/valid-16.gmarkup
Normal file
10
glib/tests/markups/valid-16.gmarkup
Normal file
@ -0,0 +1,10 @@
|
||||
<a>
|
||||
<b>
|
||||
<c1>c1</c1>
|
||||
<c2>c2</c2>
|
||||
</b>
|
||||
<b1>b1</b1>
|
||||
<b2>b2</b2>
|
||||
<b3>b3</b3>
|
||||
<b4><![CDATA[This is CDATA]]></b4>
|
||||
</a>
|
5
glib/tests/markups/valid-8.cdata-as-text
Normal file
5
glib/tests/markups/valid-8.cdata-as-text
Normal file
@ -0,0 +1,5 @@
|
||||
ELEMENT 'foo'
|
||||
TEXT ''
|
||||
TEXT ' some <<<<>>>> CDATA '
|
||||
TEXT ''
|
||||
END 'foo'
|
Loading…
Reference in New Issue
Block a user