Treat .cu files as .cpp

This commit is contained in:
Joshua Peek
2011-06-15 12:39:41 -05:00
parent ccaf8639f0
commit 19e1064e82
4 changed files with 17 additions and 5 deletions

View File

@@ -105,14 +105,15 @@ C++:
aliases: aliases:
- cpp - cpp
extensions: extensions:
- .cpp - .c++
- .hh
- .cc - .cc
- .cpp
- .cu
- .cxx
- .h++ - .h++
- .hh
- .hpp - .hpp
- .hxx - .hxx
- .c++
- .cxx
- .tcc - .tcc
C-ObjDump: C-ObjDump:

View File

@@ -42,10 +42,11 @@ application/x-chrome-extension @crx
application/x-ms-xbap @xbap :8bit application/x-ms-xbap @xbap :8bit
application/x-shockwave-flash @swf application/x-shockwave-flash @swf
application/x-silverlight-app @xap application/x-silverlight-app @xap
application/x-supercollider @sc :8bit
application/x-troff-ms :8bit application/x-troff-ms :8bit
application/x-wais-source :8bit application/x-wais-source :8bit
application/xaml+xml @xaml :8bit application/xaml+xml @xaml :8bit
application/supercollider @sc :8bit
image/x-icns @icns image/x-icns @icns
text/cache-manifest @manifest text/cache-manifest @manifest
text/plain @cu,cxx
text/x-nimrod @nim text/x-nimrod @nim

View File

@@ -211,6 +211,7 @@ class TestBlob < Test::Unit::TestCase
assert_equal Language['C++'], blob("bar.h").language assert_equal Language['C++'], blob("bar.h").language
assert_equal Language['C++'], blob("bar.hpp").language assert_equal Language['C++'], blob("bar.hpp").language
assert_equal Language['C++'], blob("hello.cpp").language 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['GAS'], blob("hello.s").language
assert_equal Language['Objective-C'], blob("Foo.h").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("Foo.m").language

View File

@@ -46,6 +46,14 @@ class TestMime < Test::Unit::TestCase
assert_equal 'text/cache-manifest', Mime.mime_for('.manifest') assert_equal 'text/cache-manifest', Mime.mime_for('.manifest')
assert_equal 'text/html', Mime.mime_for('.html') assert_equal 'text/html', Mime.mime_for('.html')
assert_equal 'text/nimrod', Mime.mime_for('.nim') assert_equal 'text/nimrod', Mime.mime_for('.nim')
assert_equal 'text/plain', Mime.mime_for('.c')
assert_equal 'text/plain', Mime.mime_for('.cc')
assert_equal 'text/plain', Mime.mime_for('.cpp')
assert_equal 'text/plain', Mime.mime_for('.cu')
assert_equal 'text/plain', Mime.mime_for('.cxx')
assert_equal 'text/plain', Mime.mime_for('.h')
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/plain', Mime.mime_for('.kt')
assert_equal 'video/quicktime', Mime.mime_for('.mov') assert_equal 'video/quicktime', Mime.mime_for('.mov')
end end
@@ -141,6 +149,7 @@ class TestMime < Test::Unit::TestCase
assert Mime.text?('text/x-nimrod') assert Mime.text?('text/x-nimrod')
# Legacy. Prefer testing mime types instead of extensions. # Legacy. Prefer testing mime types instead of extensions.
assert Mime.text?('.cu')
assert Mime.text?('.js') assert Mime.text?('.js')
assert Mime.text?('.latex') assert Mime.text?('.latex')
assert Mime.text?('.ms') assert Mime.text?('.ms')