Fix test for Perl heuristic

Improve heuristic rule for Perl6
Separate heuristic rules for .pl (with Prolog) and .pm (without Prolog)
This commit is contained in:
Paul Chaignon
2015-06-06 19:55:04 +02:00
parent b05f6f0018
commit be122ca1a5
2 changed files with 20 additions and 4 deletions

View File

@@ -49,15 +49,23 @@ class TestHeuristcs < Minitest::Test
assert_equal Language["Objective-C"], match
end
# Candidate languages = ["Perl", "Prolog"]
# Candidate languages = ["Perl", "Perl6", "Prolog"]
def test_pl_prolog_perl_by_heuristics
assert_heuristics({
"Prolog" => all_fixtures("Prolog", "*.pl"),
"Perl" => all_fixtures("Perl", "*.pl"),
"Perl" => ["Perl/oo1.pl", "Perl/oo2.pl", "Perl/oo3.pl", "Perl/fib.pl", "Perl/use5.pl"],
"Perl6" => all_fixtures("Perl6", "*.pl")
})
end
# Candidate languages = ["Perl", "Perl6"]
def test_pm_perl_by_heuristics
assert_heuristics({
"Perl" => all_fixtures("Perl", "*.pm"),
"Perl6" => all_fixtures("Perl6", "*.pm")
})
end
# Candidate languages = ["ECL", "Prolog"]
def test_ecl_prolog_by_heuristics
assert_heuristics({