Test all lexer values

This commit is contained in:
Joshua Peek
2011-05-29 20:26:49 -05:00
parent 90e2f1c1bd
commit 5bf23ad35b
3 changed files with 130 additions and 8 deletions

View File

@@ -154,7 +154,8 @@ module Linguist
@aliases = [default_alias_name] + (attributes[:aliases] || [])
# Lookup Lexer object
@lexer = Lexer.find_by_alias(attributes[:lexer] || default_alias_name)
@lexer = Lexer.find_by_alias(attributes[:lexer] || default_alias_name) ||
raise(ArgumentError, "#{@name} is missing lexer")
# Set legacy search term
@search_term = attributes[:search_term] || default_alias_name

View File

@@ -36,6 +36,7 @@ AppleScript:
:ext:
- .scpt
Arc:
:lexer: text
:ext:
- .arc
Assembly:
@@ -156,6 +157,7 @@ Dylan:
:ext:
- .dylan
Eiffel:
:lexer: text
:ext:
- .e
Emacs Lisp:
@@ -235,6 +237,7 @@ HTML+PHP:
:ext:
- .phtml
HaXe:
:lexer: hx
:ext:
- .hx
- .hxml
@@ -308,6 +311,7 @@ Mako:
:ext:
- .mao
Markdown:
:lexer: text
:ext:
- .md
- .mkd
@@ -318,6 +322,7 @@ Matlab:
:ext:
- .matlab
Max/MSP:
:lexer: text
:ext:
- .mxt
Mirah:
@@ -378,7 +383,7 @@ PHP:
- .php4
- .php5
Parrot Internal Representation:
:lexer: pir
:lexer: text
:search_term: pir
:aliases:
- pir
@@ -397,6 +402,7 @@ Perl:
- .perl
- .psgi
Pure Data:
:lexer: text
:ext:
- .pd
Python:
@@ -415,6 +421,7 @@ R:
- .r
- .R
Racket:
:lexer: text
:ext:
- .rkt
- .rktl
@@ -469,6 +476,7 @@ Scheme:
- .sps
- .scm
Self:
:lexer: text
:ext:
- .self
Shell:
@@ -489,6 +497,7 @@ Smarty:
:ext:
- .tpl
SuperCollider:
:lexer: text
:ext:
- .sc
Tcl:
@@ -509,16 +518,19 @@ Text:
:ext:
- .txt
Textile:
:lexer: text
:ext:
- .textile
Vala:
:ext:
- .vala
VHDL:
:lexer: text
:ext:
- .vhdl
- .vhd
Verilog:
:lexer: text
:ext:
- .v
VimL:
@@ -530,6 +542,7 @@ VimL:
- .vim
- .vimrc
Visual Basic:
:lexer: text
:ext:
- .bas
- .vbs