First stab at adding support for Rust.

This commit is contained in:
Lindsey Kuper
2011-07-15 08:55:15 -07:00
parent dabc4b497a
commit f2debbc687
5 changed files with 15 additions and 0 deletions

View File

@@ -721,6 +721,12 @@ Ruby:
- Thorfile
- Gemfile
Rust:
type: programming
extensions:
- .rs
- .rc
SQL:
type: data
searchable: false

View File

@@ -55,4 +55,5 @@ text/plain @cu,cxx
text/x-nimrod @nim
text/x-ocaml @ml,mli,mll,mly,sig,sml
text/x-nemerle @n
text/x-rust @rs,rc
text/x-scheme @rkt,scm,sls,sps,ss

3
test/fixtures/hello.rs vendored Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
log "Hello, world!";
}

View File

@@ -298,6 +298,9 @@ class TestBlob < Test::Unit::TestCase
# https://github.com/dharmatech/agave/blob/master/demos/asteroids.sps
assert_equal Language['Scheme'], blob("asteroids.sps").language
# https://github.com/graydon/rust
assert_equal Language['Rust'], blob("hello.rs").language
end
def test_lexer

View File

@@ -62,6 +62,8 @@ 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/rust', Mime.mime_for('.rs')
assert_equal 'text/rust', Mime.mime_for('.rc')
assert_equal 'video/quicktime', Mime.mime_for('.mov')
end