diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 12:09:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-06-22 18:54:39 +0000 |
commit | 2016078cefa7e4438217e54bb0421a5d5f0b151f (patch) | |
tree | b812f123c31e3ccb217b08c5a9f8fcd946af7006 | |
parent | a5be5d6f2db0b56dcc1d6034071458d75006670c (diff) | |
download | public-inbox-2016078cefa7e4438217e54bb0421a5d5f0b151f.tar.gz |
Version 4.0 of highlight has renamed the "make" language to "makefile". So just check the string starts with "make", to handle both 3.x and 4.x. I tested that public-inbox does actually work with highlight 4 -- it can highlight my Makefile fine. :)
-rw-r--r-- | t/hl_mod.t | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -16,7 +16,7 @@ ok($hls, 'initialized OK'); is($hls->_shebang2lang(\"#!/usr/bin/perl -w\n"), 'perl', 'perl shebang OK'); is($hls->{-ext2lang}->{'pm'}, 'perl', '.pm suffix OK'); is($hls->{-ext2lang}->{'pl'}, 'perl', '.pl suffix OK'); -is($hls->_path2lang('Makefile'), 'make', 'Makefile OK'); +like($hls->_path2lang('Makefile'), qr/\Amake/, 'Makefile OK'); my $str = do { local $/; open(my $fh, __FILE__); <$fh> }; my $orig = $str; |