3 let source = "Source: libtest-distmanifest-perl\n"
4 let source_result = { "Source" = "libtest-distmanifest-perl" }
6 test (Debctrl.simple_entry Debctrl.simple_src_keyword ) get source =
9 test (Debctrl.simple_entry Debctrl.simple_src_keyword ) get
10 "Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>\n"
11 = { "Maintainer" = "Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>"
15 = "Uploaders: foo@bar, Dominique Dumont <dominique.dumont@xx.yyy>,\n"
16 . " gregor herrmann <gregoa@xxx.yy>\n"
18 let uploaders_result =
21 { "2" = "Dominique Dumont <dominique.dumont@xx.yyy>" }
22 { "3" = "gregor herrmann <gregoa@xxx.yy>" } }
24 test Debctrl.uploaders get uploaders = uploaders_result
26 (* test package dependencies *)
27 test Debctrl.version_depends get "( >= 5.8.8-12 )" =
28 { "version" { "relation" = ">=" } { "number" = "5.8.8-12" } }
30 test Debctrl.arch_depends get "[ !hurd-i386]" =
31 { "arch" { "prefix" = "!" } { "name" = "hurd-i386" } }
33 test Debctrl.arch_depends get "[ hurd-i386]" =
34 { "arch" { "prefix" = "" } { "name" = "hurd-i386" } }
36 let p_depends_test = "perl ( >= 5.8.8-12 ) [ !hurd-i386]"
38 test Debctrl.package_depends get p_depends_test =
42 { "number" = "5.8.8-12" } }
43 { "arch" { "prefix" = "!" } { "name" = "hurd-i386" } } }
45 let dependency_test = "perl-modules (>= 5.10) | libmodule-build-perl"
47 test Debctrl.dependency get dependency_test =
48 { "or" { "perl-modules"
49 { "version" { "relation" = ">=" }
50 { "number" = "5.10" } } } }
51 { "or" { "libmodule-build-perl" } }
53 test (Debctrl.dependency_list "Build-Depends-Indep") get
54 "Build-Depends-Indep: perl (>= 5.8.8-12) [ !hurd-i386], \n"
55 . " perl-modules (>= 5.10) | libmodule-build-perl,\n"
56 . " libcarp-assert-more-perl,\n"
57 . " libconfig-tiny-perl\n"
58 = { "Build-Depends-Indep"
59 { "and" { "or" { "perl"
62 { "number" = "5.8.8-12" } }
65 { "name" = "hurd-i386" } } } } }
66 { "and" { "or" { "perl-modules"
67 { "version" { "relation" = ">=" }
68 { "number" = "5.10" } } } }
69 { "or" { "libmodule-build-perl" } } }
70 { "and" { "or" { "libcarp-assert-more-perl" } } }
71 { "and" { "or" { "libconfig-tiny-perl" } } } }
73 test (Debctrl.dependency_list "Depends") get
74 "Depends: ${perl:Depends}, ${misc:Depends},\n"
75 ." libparse-recdescent-perl (>= 1.90.0)\n"
77 { "and" { "or" { "${perl:Depends}" }} }
78 { "and" { "or" { "${misc:Depends}" }} }
79 { "and" { "or" { "libparse-recdescent-perl"
82 { "number" = "1.90.0" } } } } }
85 let description = "Description: describe and edit configuration data\n"
86 ." Config::Model enables [...] must:\n"
87 ." - if the configuration data\n"
89 ." With the elements above, (...) on ReadLine.\n"
91 test Debctrl.description get description =
93 { "summary" = "describe and edit configuration data" }
94 { "text" = "Config::Model enables [...] must:" }
95 { "text" = " - if the configuration data" }
97 { "text" = "With the elements above, (...) on ReadLine."} }
100 let simple_bin_pkg1 = "Package: libconfig-model-perl\n"
101 . "Architecture: all\n"
102 . "Description: dummy1\n"
105 let simple_bin_pkg2 = "Package: libconfig-model2-perl\n"
106 . "Architecture: all\n"
107 . "Description: dummy2\n"
110 test Debctrl.src_entries get source.uploaders
111 = { "Source" = "libtest-distmanifest-perl" }
114 { "2" = "Dominique Dumont <dominique.dumont@xx.yyy>" }
115 { "3" = "gregor herrmann <gregoa@xxx.yy>" } }
117 test Debctrl.bin_entries get simple_bin_pkg1 =
118 { "Package" = "libconfig-model-perl" }
119 { "Architecture" = "all" }
120 { "Description" { "summary" = "dummy1" } {"text" = "dummy text 1" } }
123 let paragraph_simple = source . uploaders ."\n"
124 . simple_bin_pkg1 . "\n"
127 test Debctrl.lns get paragraph_simple =
128 { "srcpkg" { "Source" = "libtest-distmanifest-perl" }
131 { "2" = "Dominique Dumont <dominique.dumont@xx.yyy>" }
132 { "3" = "gregor herrmann <gregoa@xxx.yy>" } } }
133 { "binpkg" { "Package" = "libconfig-model-perl" }
134 { "Architecture" = "all" }
135 { "Description" { "summary" = "dummy1" }
136 { "text" = "dummy text 1" } } }
137 { "binpkg" { "Package" = "libconfig-model2-perl" }
138 { "Architecture" = "all" }
139 { "Description" { "summary" = "dummy2" }
140 { "text" = "dummy text 2" } } }
145 test Debctrl.src_entries
147 after set "/Uploaders/1" "foo@bar"
150 test Debctrl.src_entries
152 after set "/Uploaders/1" "bar@bar"
153 = "Uploaders: bar@bar, Dominique Dumont <dominique.dumont@xx.yyy>,\n"
154 . " gregor herrmann <gregoa@xxx.yy>\n"
156 test Debctrl.src_entries
158 after set "/Uploaders/4" "baz@bar"
159 = "Uploaders: foo@bar, Dominique Dumont <dominique.dumont@xx.yyy>,\n"
160 . " gregor herrmann <gregoa@xxx.yy>,\n"
163 test Debctrl.lns put (source."\nPackage: test\nDescription: foobar\n")
165 set "/srcpkg/Uploaders/1" "foo@bar" ;
166 set "/srcpkg/Uploaders/2" "Dominique Dumont <dominique.dumont@xx.yyy>" ;
167 set "/srcpkg/Uploaders/3" "gregor herrmann <gregoa@xxx.yy>" ;
168 set "/srcpkg/Build-Depends-Indep/and[1]/or/perl/version/relation" ">=" ;
169 set "/srcpkg/Build-Depends-Indep/and[1]/or/perl/version/number" "5.8.8-12" ;
170 set "/srcpkg/Build-Depends-Indep/and[1]/or/perl/arch/prefix" "!" ;
171 set "/srcpkg/Build-Depends-Indep/and[1]/or/perl/arch/name" "hurd-i386" ;
172 set "/srcpkg/Build-Depends-Indep/and[2]/or[1]/perl-modules/version/relation" ">=" ;
173 set "/srcpkg/Build-Depends-Indep/and[2]/or[1]/perl-modules/version/number" "5.10" ;
174 set "/srcpkg/Build-Depends-Indep/and[2]/or[2]/libmodule-build-perl" "";
175 set "/srcpkg/Build-Depends-Indep/and[3]/or/libcarp-assert-more-perl" "" ;
176 set "/srcpkg/Build-Depends-Indep/and[4]/or/libconfig-tiny-perl" "" ;
177 set "/binpkg[1]/Package" "libconfig-model-perl" ;
178 (* must remove description because set cannot insert Archi before description *)
179 rm "/binpkg[1]/Description" ;
180 set "/binpkg/Architecture" "all" ;
181 set "/binpkg[1]/Description/summary" "dummy1" ;
182 set "/binpkg[1]/Description/text" "dummy text 1" ;
183 set "/binpkg[2]/Package" "libconfig-model2-perl" ;
184 set "/binpkg[2]/Architecture" "all" ;
185 set "/binpkg[2]/Description/summary" "dummy2" ;
186 set "/binpkg[2]/Description/text" "dummy text 2"
188 "Source: libtest-distmanifest-perl
190 Dominique Dumont <dominique.dumont@xx.yyy>,
191 gregor herrmann <gregoa@xxx.yy>
192 Build-Depends-Indep: perl ( >= 5.8.8-12 ) [ !hurd-i386 ],
193 perl-modules ( >= 5.10 ) | libmodule-build-perl,
194 libcarp-assert-more-perl,
197 Package: libconfig-model-perl
202 Package: libconfig-model2-perl
208 (* Test Augeas' own control file *)
209 let augeas_control = "Source: augeas
211 Maintainer: Nicolas Valcárcel Scerpella (Canonical) <nicolas.valcarcel@canonical.com>
212 Uploaders: Free Ekanayaka <freee@debian.org>, Micah Anderson <micah@debian.org>
213 Build-Depends: debhelper (>= 5), autotools-dev, libreadline-dev, chrpath,
214 naturaldocs (>= 1.51-1), texlive-latex-base
215 Standards-Version: 3.9.2
217 Homepage: http://augeas.net/
218 DM-Upload-Allowed: yes
220 Package: augeas-tools
223 Depends: ${shlibs:Depends}, ${misc:Depends}
224 Description: Augeas command line tools
225 Augeas is a configuration editing tool. It parses configuration files in their
226 native formats and transforms them into a tree. Configuration changes are made
227 by manipulating this tree and saving it back into native config files.
229 This package provides command line tools based on libaugeas0:
230 - augtool, a tool to manage configuration files.
231 - augparse, a testing and debugging tool for augeas lenses.
233 Package: libaugeas-dev
236 Depends: libaugeas0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
237 Description: Development files for writing applications based on libaugeas0
238 Augeas is a configuration editing tool. It parses configuration files in their
239 native formats and transforms them into a tree. Configuration changes are made
240 by manipulating this tree and saving it back into native config files.
242 This package includes the development files to write programs using the Augeas
245 test DebCtrl.lns get augeas_control =
247 { "Source" = "augeas" }
248 { "Priority" = "optional" }
249 { "Maintainer" = "Nicolas Valcárcel Scerpella (Canonical) <nicolas.valcarcel@canonical.com>" }
251 { "1" = "Free Ekanayaka <freee@debian.org>" }
252 { "2" = "Micah Anderson <micah@debian.org>" }
259 { "relation" = ">=" }
272 { "libreadline-dev" }
284 { "relation" = ">=" }
285 { "number" = "1.51-1" }
292 { "texlive-latex-base" }
296 { "Standards-Version" = "3.9.2" }
297 { "Section" = "libs" }
298 { "Homepage" = "http://augeas.net/" }
299 { "DM-Upload-Allowed" = "yes" }
302 { "Package" = "augeas-tools" }
303 { "Section" = "admin" }
304 { "Architecture" = "any" }
308 { "${shlibs:Depends}" }
313 { "${misc:Depends}" }
318 { "summary" = "Augeas command line tools" }
319 { "text" = "Augeas is a configuration editing tool. It parses configuration files in their" }
320 { "text" = "native formats and transforms them into a tree. Configuration changes are made" }
321 { "text" = "by manipulating this tree and saving it back into native config files." }
323 { "text" = "This package provides command line tools based on libaugeas0:" }
324 { "text" = "- augtool, a tool to manage configuration files." }
325 { "text" = "- augparse, a testing and debugging tool for augeas lenses." }
329 { "Package" = "libaugeas-dev" }
330 { "Section" = "libdevel" }
331 { "Architecture" = "any" }
338 { "number" = "${binary:Version}" }
345 { "${shlibs:Depends}" }
350 { "${misc:Depends}" }
355 { "summary" = "Development files for writing applications based on libaugeas0" }
356 { "text" = "Augeas is a configuration editing tool. It parses configuration files in their" }
357 { "text" = "native formats and transforms them into a tree. Configuration changes are made" }
358 { "text" = "by manipulating this tree and saving it back into native config files." }
360 { "text" = "This package includes the development files to write programs using the Augeas" }
365 (* Bug #267: Python module extensions, from Debian Python Policy, chapter 2 *)
366 let python_control = "Source: graphite-web
367 Maintainer: Will Pearson (Editure Key) <wpearson@editure.co.uk>
370 Build-Depends: debhelper (>= 7), python-support (>= 0.8.4)
371 Standards-Version: 3.7.2
372 XS-Python-Version: current
374 Package: python-graphite-web
376 Depends: ${python:Depends}
377 XB-Python-Version: ${python:Versions}
378 Provides: ${python:Provides}
379 Description: Enterprise scalable realtime graphing
381 test Debctrl.lns get python_control =
383 { "Source" = "graphite-web" }
384 { "Maintainer" = "Will Pearson (Editure Key) <wpearson@editure.co.uk>" }
385 { "Section" = "python" }
386 { "Priority" = "optional" }
392 { "relation" = ">=" }
402 { "relation" = ">=" }
403 { "number" = "0.8.4" }
409 { "Standards-Version" = "3.7.2" }
410 { "XS-Python-Version" = "current" }
413 { "Package" = "python-graphite-web" }
414 { "Architecture" = "all" }
418 { "${python:Depends}" }
422 { "XB-Python-Version" = "${python:Versions}" }
426 { "${python:Provides}" }
431 { "summary" = "Enterprise scalable realtime graphing" }