|
87 | 87 |
|
88 | 88 | before(:each) { run_texdoc "-dscore", test_query }
|
89 | 89 |
|
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 |
91 | 108 | expect(stderr).to include(res_score_log)
|
92 | 109 | end
|
93 | 110 | end
|
|
113 | 130 | expect(stderr).to include(res_score_log)
|
114 | 131 | end
|
115 | 132 | 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 |
133 | 133 | end
|
134 | 134 | end
|
0 commit comments