Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TL-Verilog #5331

Merged
merged 6 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add TL-Verilog heuristic
  • Loading branch information
adamint committed Apr 19, 2021
commit da2ffe18f447ce337e8b60d22168ca946de8a42c
4 changes: 4 additions & 0 deletions lib/linguist/heuristics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ disambiguations:
pattern: '^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)'
- language: Turing
pattern: '^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+'
- extensions: ['.tlv']
rules:
- language: TL-Verilog
pattern: '^\\m4_TLV_version'
- extensions: ['.toc']
rules:
- language: World of Warcraft Addon Data
Expand Down
10 changes: 8 additions & 2 deletions test/test_heuristics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def test_bi_by_heuristics
"FreeBasic" => all_fixtures("FreeBasic", "*.bi")
})
end

def test_builds_by_heuristics
assert_heuristics({
nil => all_fixtures("Text"),
Expand Down Expand Up @@ -796,6 +796,12 @@ def test_t_by_heuristics
})
end

def test_tlv_by_heuristics
assert_heuristics({
"TL-Verilog" => all_fixtures("TL-Verilog", "*.tlv"),
})
end

def test_toc_by_heuristics
assert_heuristics({
"TeX" => all_fixtures("TeX", "*.toc"),
Expand Down Expand Up @@ -845,7 +851,7 @@ def test_vba_by_heuristics
"Vim script" => all_fixtures("Vim script", "*.vba")
})
end

def test_w_by_heuristics
assert_heuristics({
"CWeb" => all_fixtures("CWeb", "*.w"),
Expand Down