user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] t/hl_mod: accept "make" or "makefile" for Makefile
@ 2021-06-22 12:09 Alyssa Ross
  2021-06-22 18:56 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Alyssa Ross @ 2021-06-22 12:09 UTC (permalink / raw)
  To: meta; +Cc: Alyssa Ross

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. :)
---
 t/hl_mod.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/hl_mod.t b/t/hl_mod.t
index 95057354..e28f26b5 100644
--- a/t/hl_mod.t
+++ b/t/hl_mod.t
@@ -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;
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] t/hl_mod: accept "make" or "makefile" for Makefile
  2021-06-22 12:09 [PATCH] t/hl_mod: accept "make" or "makefile" for Makefile Alyssa Ross
@ 2021-06-22 18:56 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2021-06-22 18:56 UTC (permalink / raw)
  To: Alyssa Ross; +Cc: meta

Thanks, pushed as commit 2016078cefa7e4438217e54bb0421a5d5f0b151f

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-22 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 12:09 [PATCH] t/hl_mod: accept "make" or "makefile" for Makefile Alyssa Ross
2021-06-22 18:56 ` Eric Wong

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.mail.public-inbox.meta
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.mail.public-inbox.meta
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git