Skip to content

Commit

Permalink
heuristic_spec.rb: use texlive-en instead of texlive-fr
Browse files Browse the repository at this point in the history
  • Loading branch information
wtsnjp committed Aug 12, 2024
1 parent 910404a commit c81e300
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions spec/score/heuristic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,24 @@

before(:each) { run_texdoc "-dscore", test_query }

it "should get exact match + directory bonus + catalogue details bonus" do
it "should get alias match score" do
expect(stderr).to include(res_score_log)
end
end

context "texlive-en/texlive-en.pdf with lang=en" do
let(:res_score_log) do
<<~EXPECTED
texdoc debug-score: (0da8ec4) Name used: texlive/texlive-en/texlive-en.pdf
texdoc debug-score: (0da8ec4) Matching alias "texlive-en", score: 15.0, (language-based)
texdoc debug-score: (0da8ec4) Max pattern score: 15.0
texdoc debug-score: (0da8ec4) Final score: 15.0
EXPECTED
end

before(:each) { run_texdoc "-dscore", "-clang=en", test_query }

it "should get language-based alias match score" do
expect(stderr).to include(res_score_log)
end
end
Expand All @@ -113,22 +130,5 @@
expect(stderr).to include(res_score_log)
end
end

context "texlive-fr/texlive-fr.pdf with lang=fr" do
let(:res_score_log) do
<<~EXPECTED
texdoc debug-score: (02add68) Name used: texlive/texlive-fr/texlive-fr.pdf
texdoc debug-score: (02add68) Matching alias "texlive-fr", score: 15.0, (language-based)
texdoc debug-score: (02add68) Max pattern score: 15.0
texdoc debug-score: (02add68) Final score: 15.0
EXPECTED
end

before(:each) { run_texdoc "-dscore", "-clang=fr", test_query }

it "should get exact match + directory bonus + catalogue details bonus" do
expect(stderr).to include(res_score_log)
end
end
end
end

0 comments on commit c81e300

Please sign in to comment.