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:
Santiago M. Mola
2017-07-22 15:19:22 +02:00
committed by Colin Seymour
parent e60384b018
commit 085604948e
6 changed files with 131 additions and 3 deletions

View File

@@ -63,6 +63,7 @@ class TestLanguage < Minitest::Test
assert_equal Language['Vim script'], Language.find_by_alias('vim')
assert_equal Language['Vim script'], Language.find_by_alias('viml')
assert_equal Language['reStructuredText'], Language.find_by_alias('rst')
assert_equal Language['XPM'], Language.find_by_alias('xpm')
assert_equal Language['YAML'], Language.find_by_alias('yml')
assert_nil Language.find_by_alias(nil)
end