mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #132 from pmoura/detect-logtalk-language
Added detection for the Logtalk language (http://logtalk.org/)
This commit is contained in:
@@ -573,6 +573,12 @@ Literate Haskell:
|
||||
extensions:
|
||||
- .lhs
|
||||
|
||||
Logtalk:
|
||||
type: programming
|
||||
primary_extension: .lgt
|
||||
extensions:
|
||||
- .lgt
|
||||
|
||||
Lua:
|
||||
type: programming
|
||||
primary_extension: .lua
|
||||
|
||||
@@ -53,6 +53,7 @@ application/xaml+xml @xaml :8bit
|
||||
image/x-icns @icns
|
||||
text/cache-manifest @manifest
|
||||
text/plain @cu,cxx
|
||||
text/x-logtalk @lgt
|
||||
text/x-nemerle @n
|
||||
text/x-nimrod @nim
|
||||
text/x-ocaml @ml,mli,mll,mly,sig,sml
|
||||
|
||||
9
test/fixtures/foo.lgt
vendored
Normal file
9
test/fixtures/foo.lgt
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
% this is a Logtalk source file
|
||||
|
||||
:- object(hello_world).
|
||||
|
||||
% the initialization/1 directive argument is automatically executed
|
||||
% when the object is loaded into memory:
|
||||
:- initialization((nl, write('********** Hello World! **********'), nl)).
|
||||
|
||||
:- end_object.
|
||||
@@ -274,6 +274,7 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert_equal Language['C++'], blob("hello.cpp").language
|
||||
assert_equal Language['C++'], blob("cuda.cu").language
|
||||
assert_equal Language['GAS'], blob("hello.s").language
|
||||
assert_equal Language['Logtalk'], blob("foo.lgt").language
|
||||
assert_equal Language['Objective-C'], blob("Foo.h").language
|
||||
assert_equal Language['Objective-C'], blob("Foo.m").language
|
||||
assert_equal Language['Objective-C'], blob("FooAppDelegate.h").language
|
||||
|
||||
@@ -62,6 +62,7 @@ class TestMime < Test::Unit::TestCase
|
||||
assert_equal 'text/plain', Mime.mime_for('.hh')
|
||||
assert_equal 'text/plain', Mime.mime_for('.hpp')
|
||||
assert_equal 'text/plain', Mime.mime_for('.kt')
|
||||
assert_equal 'text/x-logtalk', Mime.mime_for('.lgt')
|
||||
assert_equal 'text/x-rust', Mime.mime_for('.rs')
|
||||
assert_equal 'text/x-rust', Mime.mime_for('.rc')
|
||||
assert_equal 'video/quicktime', Mime.mime_for('.mov')
|
||||
|
||||
Reference in New Issue
Block a user