test_heuristics.rb (linguist-7.23.0) | : | test_heuristics.rb (linguist-7.24.0) | ||
---|---|---|---|---|
skipping to change at line 320 | skipping to change at line 320 | |||
def test_cl_by_heuristics | def test_cl_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Common Lisp" => all_fixtures("Common Lisp", "*.cl"), | "Common Lisp" => all_fixtures("Common Lisp", "*.cl"), | |||
"OpenCL" => all_fixtures("OpenCL", "*.cl") | "OpenCL" => all_fixtures("OpenCL", "*.cl") | |||
}) | }) | |||
end | end | |||
def test_cls_by_heuristics | def test_cls_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Visual Basic 6.0" => all_fixtures("Visual Basic 6.0", "*.cls"), | ||||
"VBA" => all_fixtures("VBA", "*.cls"), | ||||
"TeX" => all_fixtures("TeX", "*.cls"), | "TeX" => all_fixtures("TeX", "*.cls"), | |||
"ObjectScript" => all_fixtures("ObjectScript", "*.cls"), | "ObjectScript" => all_fixtures("ObjectScript", "*.cls"), | |||
# Missing heuristics | # Missing heuristics | |||
nil => all_fixtures("Apex", "*.cls") + all_fixtures("OpenEdge ABL", "*.cls ") + all_fixtures("VBA", "*.cls"), | nil => all_fixtures("Apex", "*.cls") + all_fixtures("OpenEdge ABL", "*.cls "), | |||
}) | }) | |||
end | end | |||
def test_cmp_by_heuristics | def test_cmp_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Gerber Image" => all_fixtures("Gerber Image", "*"), | "Gerber Image" => all_fixtures("Gerber Image", "*"), | |||
nil => all_fixtures("Text", "*"), | nil => all_fixtures("Text", "*"), | |||
}, alt_name="test.cmp") | }, alt_name="test.cmp") | |||
assert_heuristics({ | assert_heuristics({ | |||
"Gerber Image" => Dir.glob("#{fixtures_path}/Generic/cmp/Gerber Image/*"), | "Gerber Image" => Dir.glob("#{fixtures_path}/Generic/cmp/Gerber Image/*"), | |||
skipping to change at line 425 | skipping to change at line 427 | |||
end | end | |||
def test_fr_by_heuristics | def test_fr_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Frege" => all_fixtures("Frege", "*.fr"), | "Frege" => all_fixtures("Frege", "*.fr"), | |||
"Forth" => all_fixtures("Forth", "*.fr"), | "Forth" => all_fixtures("Forth", "*.fr"), | |||
"Text" => all_fixtures("Text", "*.fr") | "Text" => all_fixtures("Text", "*.fr") | |||
}) | }) | |||
end | end | |||
def test_frm_by_heuristics | ||||
assert_heuristics({ | ||||
"VBA" => all_fixtures("VBA", "*.frm"), | ||||
"Visual Basic 6.0" => all_fixtures("Visual Basic 6.0", "*.frm"), | ||||
}) | ||||
end | ||||
def test_fs_by_heuristics | def test_fs_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"F#" => all_fixtures("F#", "*.fs"), | "F#" => all_fixtures("F#", "*.fs"), | |||
"Forth" => all_fixtures("Forth", "*.fs"), | "Forth" => all_fixtures("Forth", "*.fs"), | |||
"GLSL" => all_fixtures("GLSL", "*.fs") | "GLSL" => all_fixtures("GLSL", "*.fs") | |||
}) | }) | |||
end | end | |||
def test_ftl_by_heuristics | def test_ftl_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
skipping to change at line 505 | skipping to change at line 514 | |||
}) | }) | |||
end | end | |||
def test_hh_by_heuristics | def test_hh_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Hack" => all_fixtures("Hack", "*.hh"), | "Hack" => all_fixtures("Hack", "*.hh"), | |||
nil => all_fixtures("C++", "*.hh") | nil => all_fixtures("C++", "*.hh") | |||
}) | }) | |||
end | end | |||
def test_html_by_heuristics | ||||
assert_heuristics({ | ||||
"Ecmarkup" => all_fixtures("Ecmarkup", "*.html"), | ||||
"HTML" => all_fixtures("HTML", "*.html") | ||||
}) | ||||
end | ||||
def test_i_by_heuristics | def test_i_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Motorola 68K Assembly" => all_fixtures("Motorola 68K Assembly", "*.i"), | "Motorola 68K Assembly" => all_fixtures("Motorola 68K Assembly", "*.i"), | |||
"SWIG" => all_fixtures("SWIG", "*.i"), | "SWIG" => all_fixtures("SWIG", "*.i"), | |||
# No heuristic defined for Assembly | # No heuristic defined for Assembly | |||
nil => all_fixtures("Assembly", "*.i") | nil => all_fixtures("Assembly", "*.i") | |||
}) | }) | |||
end | end | |||
def test_ice_by_heuristics | def test_ice_by_heuristics | |||
skipping to change at line 537 | skipping to change at line 553 | |||
"POV-Ray SDL" => all_fixtures("POV-Ray SDL", "*"), | "POV-Ray SDL" => all_fixtures("POV-Ray SDL", "*"), | |||
"SourcePawn" => all_fixtures("SourcePawn", "*.inc"), | "SourcePawn" => all_fixtures("SourcePawn", "*.inc"), | |||
nil => all_fixtures("Assembly", "*") + | nil => all_fixtures("Assembly", "*") + | |||
all_fixtures("C++", "*.inc") + | all_fixtures("C++", "*.inc") + | |||
all_fixtures("HTML", "*") + | all_fixtures("HTML", "*") + | |||
all_fixtures("Pawn", "*") + | all_fixtures("Pawn", "*") + | |||
all_fixtures("SQL", "*") | all_fixtures("SQL", "*") | |||
}, alt_name="foo.inc") | }, alt_name="foo.inc") | |||
end | end | |||
def test_json_by_heuristics | ||||
assert_heuristics({ | ||||
"OASv2-json" => all_fixtures("OASv2-json", "*.json"), | ||||
"OASv3-json" => all_fixtures("OASv3-json", "*.json"), | ||||
"JSON" => all_fixtures("JSON", "*.json"), | ||||
}) | ||||
end | ||||
def test_l_by_heuristics | def test_l_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"Common Lisp" => all_fixtures("Common Lisp", "*.l"), | "Common Lisp" => all_fixtures("Common Lisp", "*.l"), | |||
"Lex" => all_fixtures("Lex", "*.l"), | "Lex" => all_fixtures("Lex", "*.l"), | |||
"Roff" => all_fixtures("Roff", "*.l"), | "Roff" => all_fixtures("Roff", "*.l"), | |||
"PicoLisp" => all_fixtures("PicoLisp", "*.l") | "PicoLisp" => all_fixtures("PicoLisp", "*.l") | |||
}) | }) | |||
end | end | |||
def test_lisp_by_heuristics | def test_lisp_by_heuristics | |||
skipping to change at line 969 | skipping to change at line 993 | |||
assert_heuristics({ | assert_heuristics({ | |||
"DirectX 3D File" => all_fixtures("DirectX 3D File", "*.x"), | "DirectX 3D File" => all_fixtures("DirectX 3D File", "*.x"), | |||
"Linker Script" => all_fixtures("Linker Script", "*.x"), | "Linker Script" => all_fixtures("Linker Script", "*.x"), | |||
"RPC" => all_fixtures("RPC", "*.x") | "RPC" => all_fixtures("RPC", "*.x") | |||
}) | }) | |||
end | end | |||
def test_yaml_by_heuristics | def test_yaml_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"MiniYAML" => all_fixtures("MiniYAML", "*.yaml"), | "MiniYAML" => all_fixtures("MiniYAML", "*.yaml"), | |||
"OASv2-yaml" => all_fixtures("OASv2-yaml", "*.yaml"), | ||||
"OASv3-yaml" => all_fixtures("OASv3-yaml", "*.yaml"), | ||||
"YAML" => all_fixtures("YAML", "*.yaml"), | "YAML" => all_fixtures("YAML", "*.yaml"), | |||
}) | }) | |||
end | end | |||
def test_yml_by_heuristics | ||||
assert_heuristics({ | ||||
"MiniYAML" => all_fixtures("MiniYAML", "*.yml"), | ||||
"OASv2-yaml" => all_fixtures("OASv2-yaml", "*.yml"), | ||||
"OASv3-yaml" => all_fixtures("OASv3-yaml", "*.yml"), | ||||
"YAML" => all_fixtures("YAML", "*.yml"), | ||||
}) | ||||
end | ||||
def test_yy_by_heuristics | def test_yy_by_heuristics | |||
assert_heuristics({ | assert_heuristics({ | |||
"JSON" => all_fixtures("JSON", "*.yy"), | "JSON" => all_fixtures("JSON", "*.yy"), | |||
"Yacc" => all_fixtures("Yacc", "*.yy") | "Yacc" => all_fixtures("Yacc", "*.yy") | |||
}) | }) | |||
end | end | |||
end | end | |||
End of changes. 7 change blocks. | ||||
1 lines changed or deleted | 36 lines changed or added |