mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-07 20:08:48 +00:00
Add support for XPM. (#3706)
* .xpm and .pm extensions associated with XPM.
* .pm is disambiguated by searching the /* XPM */ string.
This is how `file` performs detection and should work with
every XPM3 file (most XPM generated by software later than 1991).
Added XPM samples:
* stick-unfocus.xpm: extracted from Fluxbox (MIT License)
0c13ddc0c8/data/styles/Emerge/pixmaps/stick-unfocus.xpm
* cc-public_domain_mark_white.pm: public domain image from
https://commons.wikimedia.org/wiki/File:Cc-public_domain_mark_white.svg
converted to XPM with ImageMagick (convert input.svg output.xpm).
This commit is contained in:
committed by
Colin Seymour
parent
e60384b018
commit
085604948e
@@ -221,11 +221,12 @@ class TestHeuristcs < Minitest::Test
|
||||
})
|
||||
end
|
||||
|
||||
# Candidate languages = ["Perl", "Perl 6"]
|
||||
def test_pm_perl_by_heuristics
|
||||
# Candidate languages = ["Perl", "Perl 6", "XPM"]
|
||||
def test_pm_by_heuristics
|
||||
assert_heuristics({
|
||||
"Perl" => all_fixtures("Perl", "*.pm"),
|
||||
"Perl 6" => all_fixtures("Perl 6", "*.pm")
|
||||
"Perl 6" => all_fixtures("Perl 6", "*.pm"),
|
||||
"XPM" => all_fixtures("XPM", "*.pm")
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user