Skip to content

Commit c003877

Browse files
committed
XXX: tests for "our $VERSION = v8.67.53"
Right now, this fails weirdly. See #365, which says: > If you're doing the first release of a package, and you set the version > string to an unquoted v-string, such as > > our $VERSION = v1.0.1; > > Then the uploader will get a message saying they don't have an indexing > permission on the package. > > Putting double quotes around the v-string will fix it, so we should at least > recognise the problem and tell the uploader.
1 parent 33751e9 commit c003877

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

t/mldistwatch-misc.t

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,36 @@ subtest "check various forms of version" => sub {
276276
);
277277
};
278278

279+
subtest "unquoted vstring version" => sub {
280+
my $pause = PAUSE::TestPAUSE->init_new;
281+
$pause->upload_author_fake(RJBS => {
282+
name => 'Quod-Version',
283+
version => '8.67.53',
284+
packages => [
285+
'Quod::Version' => {
286+
version => 'v8.67.53',
287+
layout => { version => 'our-literal' }
288+
},
289+
]
290+
});
291+
292+
my $result = $pause->test_reindex;
293+
294+
$pause->file_not_updated_ok(
295+
$result->tmpdir
296+
->file(qw(cpan modules 02packages.details.txt.gz)),
297+
"there were no things to update",
298+
);
299+
300+
diag($_->{email}->as_string) for $result->deliveries;
301+
302+
$result->email_ok(
303+
[
304+
{ subject => 'PAUSE indexer report Quod-Version-8.67.53.tar.gz' },
305+
],
306+
);
307+
};
308+
279309
subtest "version assigned to a blob as a ref" => sub {
280310
my $pause = PAUSE::TestPAUSE->init_new;
281311
$pause->upload_author_fake(LUNATIC => 'Globby-Version-1.234.tar.gz', {

0 commit comments

Comments
 (0)