Skip to content

Commit 69ec3dc

Browse files
committed
Integrate "minifying non-JS shouldn't dump core" test into t/minify.t
1 parent 44c24cf commit 69ec3dc

2 files changed

Lines changed: 11 additions & 16 deletions

File tree

t/04-not-javascript.t

Lines changed: 0 additions & 16 deletions
This file was deleted.

t/minify.t

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,16 @@ subtest 'minifies to nothing' => sub {
311311
};
312312
};
313313

314+
###############################################################################
315+
# RT#58416; don't crash if attempting to minify something that isn't JS
316+
# ... while there's no guarantee that what we get back is _sane_, we should at
317+
# least not blow up or segfault.
318+
subtest "Minifying non-JS shouldn't crash" => sub {
319+
my $given = 'not javascript';
320+
my $expect = 'not javascript';
321+
my $got = minify($given);
322+
is $got, $expect
323+
};
324+
314325
###############################################################################
315326
done_testing();

0 commit comments

Comments
 (0)