From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS11403 64.147.123.0/24 X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_SOFTFAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from wforward1-smtp.messagingengine.com (wforward1-smtp.messagingengine.com [64.147.123.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C6B941F8C6 for ; Tue, 22 Jun 2021 12:09:33 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailforward.west.internal (Postfix) with ESMTP id BCE8A10CF for ; Tue, 22 Jun 2021 08:09:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 22 Jun 2021 08:09:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=UqFRESp0lolO2i4p4 TBzIHwTQPZU/+wyyfu56TKDInE=; b=pXKNDRPqlGllN73QXmxNvA9h/LOvID/fZ iCrYz1Rb8MwJECNmdDa39tB2gRyDRmR+wn5zrzEwLufuwm9lYgNcSt8noBEntJUw EBqLvAncYTxiifJ7GAEd4/KATtuzu/VOULXXAHLqfxEMD5BLvosgJEGUakl7x6C+ onNGLKvICCg3jLF7j7yOCCW9h+Gc2Km/bBTEPcvLrVt7F8JJqL0BX/UUbVeW13s2 Xcqe+TVf0dqfCwEuhdsBIX7oyUGhhuRoZRpatuEB89ienYyk8quW6Lhqzyy2v0oa 3RZxL/KyECr2ZGirUE1V8QGtpL2kz2/YziMbk6K8KOuUfoa/5oFNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeguddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhisheq necuggftrfgrthhtvghrnhephedvfffghfetieejgfetfedtgffhvdehueehvdejudfgge fgleejgfelfeevgfefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepqhihlhhishhsseigvddvtddrqhihlhhishhsrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 22 Jun 2021 08:09:32 -0400 (EDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id AFEE0427; Tue, 22 Jun 2021 12:09:29 +0000 (UTC) From: Alyssa Ross To: meta@public-inbox.org Cc: Alyssa Ross Subject: [PATCH] t/hl_mod: accept "make" or "makefile" for Makefile Date: Tue, 22 Jun 2021 12:09:20 +0000 Message-Id: <20210622120920.2756569-1-hi@alyssa.is> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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