@@ -64,6 +64,40 @@ subpackages:
64
64
mkdir -p ${{targets.subpkgdir}}/usr/bin
65
65
mv ${{targets.destdir}}/usr/bin ${{targets.subpkgdir}}/usr
66
66
description : libxml2 utils
67
+ test :
68
+ pipeline :
69
+ - name : Verify libxml2 installation
70
+ runs : |
71
+ xml2-config --version || exit 1
72
+ - name : Basic XML parsing
73
+ runs : |
74
+ cat << EOF > example.xml
75
+ <note>
76
+ <to>User</to>
77
+ <from>Assistant</from>
78
+ <heading>Reminder</heading>
79
+ <body>Don't forget me this weekend!</body>
80
+ </note>
81
+ EOF
82
+ xmllint --noout example.xml || exit 1
83
+ - name : XML validation with DTD
84
+ runs : |
85
+ cat << 'EOF' > example.dtd
86
+ <!ELEMENT note (to,from,heading,body)>
87
+ <!ELEMENT to (#PCDATA)>
88
+ <!ELEMENT from (#PCDATA)>
89
+ <!ELEMENT heading (#PCDATA)>
90
+ <!ELEMENT body (#PCDATA)>
91
+ EOF
92
+ cat << 'EOF' > note.xml
93
+ <note>
94
+ <to>Tove</to>
95
+ <from>Jani</from>
96
+ <heading>Reminder</heading>
97
+ <body>Don't forget me this weekend!</body>
98
+ </note>
99
+ EOF
100
+ xmllint --noout --dtdvalid example.dtd note.xml || exit 1
67
101
68
102
- name : libxml2-dev
69
103
pipeline :
@@ -75,6 +109,20 @@ subpackages:
75
109
- xz-dev
76
110
- libxml2-utils
77
111
description : libxml2 dev
112
+ test :
113
+ environment :
114
+ contents :
115
+ packages :
116
+ - gcc
117
+ - glibc-dev
118
+ - libxml2-utils
119
+ pipeline :
120
+ - name : Verify libxml2-dev installation
121
+ runs : |
122
+ echo '#include <libxml/parser.h>' > test.c
123
+ echo 'int main() {return 0;}' >> test.c
124
+ gcc -o test test.c $(xml2-config --cflags) $(xml2-config --libs)
125
+ ./test || exit 1
78
126
79
127
update :
80
128
enabled : true
0 commit comments