mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
More robust heuristics for .m files and 3 new Matlab tests. Support for Obj-C detection fully intact; all tests pass. Detection of Obj-C keywords @implementation, @property, @interface, and @synthesize removed to avoid possible conflicts with user-created Matlab function handles. Only @end is needed, which is not valid in Matlab. Matlab class files supported. Comments preceded by whitespace detected for Obj-C and Matlab.
Signed-off-by: Andrew D. Horchler <adh9@case.edu>
This commit is contained in:
@@ -311,6 +311,9 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert_equal Language['Objective-C'], blob("hello.m").language
|
||||
assert_equal Language['Matlab'], blob("matlab_function.m").language
|
||||
assert_equal Language['Matlab'], blob("matlab_script.m").language
|
||||
assert_equal Language['Matlab'], blob("matlab_function2.m").language
|
||||
assert_equal Language['Matlab'], blob("matlab_script2.m").language
|
||||
assert_equal Language['Matlab'], blob("matlab_class.m").language
|
||||
|
||||
# .r disambiguation
|
||||
assert_equal Language['R'], blob("hello-r.R").language
|
||||
|
||||
Reference in New Issue
Block a user