mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add simple test fixtures for Matlab.
This commit is contained in:
		
							
								
								
									
										9
									
								
								test/fixtures/matlab_function.m
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								test/fixtures/matlab_function.m
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
function ret = matlab_function(A,B)
 | 
			
		||||
% Simple function adding two values and displaying the return value
 | 
			
		||||
 | 
			
		||||
ret = A+B;
 | 
			
		||||
% Display the return value
 | 
			
		||||
disp('Return value in function');
 | 
			
		||||
disp(ret);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										12
									
								
								test/fixtures/matlab_script.m
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								test/fixtures/matlab_script.m
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
% Matlab example script
 | 
			
		||||
 | 
			
		||||
%Call matlab_function function which resides in the same directory
 | 
			
		||||
 | 
			
		||||
value1 = 5 % semicolon at end of line is not mandatory, only suppresses output to command line.
 | 
			
		||||
value2 = 3
 | 
			
		||||
 | 
			
		||||
% Calculate sum of value1 and value2
 | 
			
		||||
result = matlab_function(value1,value2);
 | 
			
		||||
 | 
			
		||||
disp('called from script')
 | 
			
		||||
disp(result);
 | 
			
		||||
		Reference in New Issue
	
	Block a user