mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Allow classifier to run on symlinks as usual (#3948)
* Fixups for symlink detection, incl. test * assert the heuristics return none for symlink
This commit is contained in:
		| @@ -473,4 +473,10 @@ class TestLanguage < Minitest::Test | ||||
|     assert_nil Language.find_by_name(',') | ||||
|     assert_nil Language.find_by_alias(',') | ||||
|   end | ||||
|  | ||||
|   def test_detect_prefers_markdown_for_md | ||||
|     blob = Linguist::FileBlob.new(File.join(samples_path, "Markdown/symlink.md")) | ||||
|     match = Linguist.detect(blob) | ||||
|     assert_equal Language["Markdown"], match | ||||
|   end | ||||
| end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user