File: 00-project.t

package info (click to toggle)
libjson-validator-perl 5.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,160 kB
  • sloc: perl: 3,015; makefile: 14
file content (127 lines) | stat: -rw-r--r-- 2,059 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
use strict;
use Test::More;
use File::Find;

plan skip_all => 'No such directory: .git' unless $ENV{TEST_ALL} or -d '.git';
plan skip_all => 'HARNESS_PERL_SWITCHES =~ /Devel::Cover/' if +($ENV{HARNESS_PERL_SWITCHES} || '') =~ /Devel::Cover/;

for (qw(
  Test::CPAN::Changes::changes_file_ok+VERSION!4
  Test::Pod::Coverage::pod_coverage_ok+VERSION!1
  Test::Pod::pod_file_ok+VERSION!1
  Test::Spelling::pod_file_spelling_ok+has_working_spellchecker!1
))
{
  my ($fqn, $module, $sub, $check, $skip_n) = /^((.*)::(\w+))\+(\w+)!(\d+)$/;
  next if eval "use $module;$module->$check";
  no strict qw(refs);
  *$fqn = sub {
  SKIP: { skip "$sub(@_) ($module is required)", $skip_n }
  };
}

my @files;
find({wanted => sub { /\.pm$/ and push @files, $File::Find::name }, no_chdir => 1}, -e 'blib' ? 'blib' : 'lib');
plan tests => @files * 4 + 4;

Test::Spelling::add_stopwords(<DATA>)
  if Test::Spelling->can('has_working_spellchecker') && Test::Spelling->has_working_spellchecker;

for my $file (@files) {
  my $module = $file;
  $module =~ s,\.pm$,,;
  $module =~ s,.*/?lib/,,;
  $module =~ s,/,::,g;
  ok eval "use $module; 1", "use $module" or diag $@;
  Test::Pod::pod_file_ok($file);
  Test::Pod::Coverage::pod_coverage_ok($module, {also_private => [qr/^[A-Z_]+$/]});
  Test::Spelling::pod_file_spelling_ok($file);
}

Test::CPAN::Changes::changes_file_ok();

__DATA__
Aleksandr
Anwar
Aymeric
Barden
Bernhard
Berov
Böhmer
DT
Dagfinn
DefaultResponse
Etheridge
Fabrizio
Gennari
Goess
Graf
Hartmaier
Henning
Hradek
IRI
Ilmari
Ishigaki
JSONPatch
Jemmeson
Joi
Karelas
Kenichi
Kirill
Krasimir
Lari
Maijala
Mannsåker
Masse
Mattias
Matusov
Morrott
NID
NSS
OpenAPI
Orlenko
Päivärinta
Petstore
Rassadin
Renvoize
Riedel
Schemas
Schout
Stallard
Taskula
Thorsen
UUIDv
Znet
Zoffix
additionalItems
additionalProperties
allOf
alphanum
anyOf
basePath
bc
const
fff
formData
iban
ipv
joi
maxItems
maxLength
maxProperties
minItems
minLength
minProperties
multipleOf
nid
nss
oneOf
openapiv
schemas
str
ua
unevaluatedItems
unevaluatedProperties
uniqueItems
validator
validators