mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Merge pull request #112 from sylvestre/master
Support of the Scilab language
This commit is contained in:
		@@ -963,6 +963,13 @@ Scheme:
 | 
				
			|||||||
  - .sps
 | 
					  - .sps
 | 
				
			||||||
  - .ss
 | 
					  - .ss
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Scilab:
 | 
				
			||||||
 | 
					  type: programming
 | 
				
			||||||
 | 
					  primary_extension: .sci
 | 
				
			||||||
 | 
					  extensions:
 | 
				
			||||||
 | 
					  - .sce
 | 
				
			||||||
 | 
					  - .tst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Self:
 | 
					Self:
 | 
				
			||||||
  type: programming
 | 
					  type: programming
 | 
				
			||||||
  lexer: Text only
 | 
					  lexer: Text only
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								test/fixtures/scilab_function.sci
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								test/fixtures/scilab_function.sci
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					// A comment with whites    and tabulations
 | 
				
			||||||
 | 
					// Email: <scilab.support@scilab.org>
 | 
				
			||||||
 | 
					// Scilab editor: http://www.scilab.org/
 | 
				
			||||||
 | 
					function [a, b] = myfunction(d, e, f)
 | 
				
			||||||
 | 
						a = 2.71828 + %pi + f($, :);
 | 
				
			||||||
 | 
						b = cos(a) + cosh(a);
 | 
				
			||||||
 | 
						if d == e then
 | 
				
			||||||
 | 
							b = 10 - e.field;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							b = "		test     " + home
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						myvar = 1.23e-45;
 | 
				
			||||||
 | 
					endfunction
 | 
				
			||||||
							
								
								
									
										2
									
								
								test/fixtures/scilab_script.sce
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								test/fixtures/scilab_script.sce
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					disp(%pi);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										3
									
								
								test/fixtures/scilab_test.tst
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								test/fixtures/scilab_test.tst
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					assert_checkequal(1+1,2);
 | 
				
			||||||
 | 
					assert_checkfalse(%pi==%e);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -317,6 +317,11 @@ class TestBlob < Test::Unit::TestCase
 | 
				
			|||||||
    assert_equal Language['Standard ML'], blob("Foo.sig").language
 | 
					    assert_equal Language['Standard ML'], blob("Foo.sig").language
 | 
				
			||||||
    assert_equal Language['Standard ML'], blob("Foo.sml").language
 | 
					    assert_equal Language['Standard ML'], blob("Foo.sml").language
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Scilab
 | 
				
			||||||
 | 
					    assert_equal Language['Scilab'],       blob("scilab_script.sce").language
 | 
				
			||||||
 | 
					    assert_equal Language['Scilab'],       blob("scilab_function.sci").language
 | 
				
			||||||
 | 
					    assert_equal Language['Scilab'],       blob("scilab_test.tst").language
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Config files
 | 
					    # Config files
 | 
				
			||||||
    assert_equal Language['INI'],   blob(".gitconfig").language
 | 
					    assert_equal Language['INI'],   blob(".gitconfig").language
 | 
				
			||||||
    assert_equal Language['Shell'], blob(".bash_profile").language
 | 
					    assert_equal Language['Shell'], blob(".bash_profile").language
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user