Skip to content

Commit c81e300

Browse files
committed
heuristic_spec.rb: use texlive-en instead of texlive-fr
1 parent 910404a commit c81e300

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

spec/score/heuristic_spec.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,24 @@
8787

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

90-
it "should get exact match + directory bonus + catalogue details bonus" do
90+
it "should get alias match score" do
91+
expect(stderr).to include(res_score_log)
92+
end
93+
end
94+
95+
context "texlive-en/texlive-en.pdf with lang=en" do
96+
let(:res_score_log) do
97+
<<~EXPECTED
98+
texdoc debug-score: (0da8ec4) Name used: texlive/texlive-en/texlive-en.pdf
99+
texdoc debug-score: (0da8ec4) Matching alias "texlive-en", score: 15.0, (language-based)
100+
texdoc debug-score: (0da8ec4) Max pattern score: 15.0
101+
texdoc debug-score: (0da8ec4) Final score: 15.0
102+
EXPECTED
103+
end
104+
105+
before(:each) { run_texdoc "-dscore", "-clang=en", test_query }
106+
107+
it "should get language-based alias match score" do
91108
expect(stderr).to include(res_score_log)
92109
end
93110
end
@@ -113,22 +130,5 @@
113130
expect(stderr).to include(res_score_log)
114131
end
115132
end
116-
117-
context "texlive-fr/texlive-fr.pdf with lang=fr" do
118-
let(:res_score_log) do
119-
<<~EXPECTED
120-
texdoc debug-score: (02add68) Name used: texlive/texlive-fr/texlive-fr.pdf
121-
texdoc debug-score: (02add68) Matching alias "texlive-fr", score: 15.0, (language-based)
122-
texdoc debug-score: (02add68) Max pattern score: 15.0
123-
texdoc debug-score: (02add68) Final score: 15.0
124-
EXPECTED
125-
end
126-
127-
before(:each) { run_texdoc "-dscore", "-clang=fr", test_query }
128-
129-
it "should get exact match + directory bonus + catalogue details bonus" do
130-
expect(stderr).to include(res_score_log)
131-
end
132-
end
133133
end
134134
end

0 commit comments

Comments
 (0)