Tests.pm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright © 2016 Guillem Jover <guillem@debian.org>
  2. #
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. package Dpkg::Control::Tests;
  16. use strict;
  17. use warnings;
  18. our $VERSION = '1.00';
  19. use Dpkg::Control;
  20. use Dpkg::Control::Tests::Entry;
  21. use Dpkg::Index;
  22. use parent qw(Dpkg::Index);
  23. =encoding utf8
  24. =head1 NAME
  25. Dpkg::Control::Tests - parse files like debian/tests/control
  26. =head1 DESCRIPTION
  27. It provides an object to access data of files that follow the same
  28. syntax as F<debian/tests/control>.
  29. =head1 METHODS
  30. All the methods of Dpkg::Index are available. Those listed below are either
  31. new or overridden with a different behavior.
  32. =over 4
  33. =item $c = Dpkg::Control::Tests->new(%opts)
  34. Create a new Dpkg::Control::Tests object, which inherits from Dpkg::Index.
  35. =cut
  36. sub new {
  37. my ($this, %opts) = @_;
  38. my $class = ref($this) || $this;
  39. my $self = Dpkg::Index->new(type => CTRL_TESTS, %opts);
  40. return bless $self, $class;
  41. }
  42. =item $item = $tests->new_item()
  43. Creates a new item.
  44. =cut
  45. sub new_item {
  46. my $self = shift;
  47. return Dpkg::Control::Tests::Entry->new();
  48. }
  49. =back
  50. =head1 CHANGES
  51. =head2 Version 1.00 (dpkg 1.18.8)
  52. Mark the module as public.
  53. =cut
  54. 1;