We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
t/minify.t
1 parent 44c24cf commit 69ec3dcCopy full SHA for 69ec3dc
2 files changed
t/04-not-javascript.t
t/minify.t
@@ -311,5 +311,16 @@ subtest 'minifies to nothing' => sub {
311
};
312
313
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
+
325
###############################################################################
326
done_testing();
0 commit comments