Skip to content

Commit 61ddf2d

Browse files
committedAug 10, 2024
attempt to fix ci on windows
1 parent 9a6c868 commit 61ddf2d

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed
 

‎script/texdoclib-search.tlu

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ init_texdocs_database = function()
383383
local root, shift = lsr_root(path)
384384
if root and shift and recursion_allowed then
385385
dbg_print('texdocs',
386-
'texdocs[%d] using index: %s (shift=%s)', i, w32_path(root), shift)
386+
'texdocs[%d] using index: %s (shift=%s)', i, w32_path(root), w32_path(shift))
387387
db = init_lsr_db(root, shift)
388388
elseif not index_mandatory and lfs.isdir(path) then
389389
dbg_print('texdocs',

‎spec/search/texdocs_spec.rb

+13-7
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@
1111
}
1212
before(:each) { run_texdoc "-dtexdocs", "listings" }
1313

14+
let(:tree_prefix) { normalize_path("path/to/") }
15+
1416
it "should be properly interpreted" do
1517
expect(stderr).to include(
1618
debug_line "texdocs",
17-
"texdocs[4] = path/to/tree4 (index_mandatory=false, recursion_allowed=false)")
19+
"texdocs[4] = #{tree_prefix}tree4 (index_mandatory=false, recursion_allowed=false)")
1820
expect(stderr).to include(
1921
debug_line "texdocs",
20-
"texdocs[3] = path/to/tree3 (index_mandatory=false, recursion_allowed=true)")
22+
"texdocs[3] = #{tree_prefix}tree3 (index_mandatory=false, recursion_allowed=true)")
2123
expect(stderr).to include(
2224
debug_line "texdocs",
23-
"texdocs[2] = path/to/tree2 (index_mandatory=true, recursion_allowed=false)")
25+
"texdocs[2] = #{tree_prefix}tree2 (index_mandatory=true, recursion_allowed=false)")
2426
expect(stderr).to include(
2527
debug_line "texdocs",
26-
"texdocs[1] = path/to/tree1 (index_mandatory=true, recursion_allowed=true)")
28+
"texdocs[1] = #{tree_prefix}tree1 (index_mandatory=true, recursion_allowed=true)")
2729
end
2830
end
2931

@@ -33,15 +35,19 @@
3335
let(:texmf_dist_regex) { Regexp.escape(normalize_path(`kpsewhich -var-value TEXMFDIST`.chomp)) }
3436
let(:texmf_home_regex) { Regexp.escape(normalize_path(texmf_home)) }
3537

38+
let(:path_doc_suffix_regex) { Regexp.escape(normalize_path("/doc")) }
39+
let(:shift_doc_suffix_regex) { Regexp.escape(normalize_path("doc/")) }
40+
3641
let(:texdocs_n_dist) {
37-
/texdocs\[(\d+?)\] = #{texmf_dist_regex}\/doc/.match(stderr).to_a.values_at(1)[0].to_i
42+
/texdocs\[(\d+?)\] = #{texmf_dist_regex}#{path_doc_suffix_regex}/.match(stderr).to_a.values_at(1)[0].to_i
3843
}
3944
let(:texdocs_n_home) {
40-
/texdocs\[(\d+?)\] = #{texmf_home_regex}\/doc/.match(stderr).to_a.values_at(1)[0].to_i
45+
/texdocs\[(\d+?)\] = #{texmf_home_regex}#{path_doc_suffix_regex}/.match(stderr).to_a.values_at(1)[0].to_i
4146
}
4247

4348
it "should search TEXMFDIST using index" do
44-
expect(stderr).to match(/texdocs\[#{texdocs_n_dist}\] using index: #{texmf_dist_regex} \(shift=doc\/\)/)
49+
expect(stderr).to match(
50+
/texdocs\[#{texdocs_n_dist}\] using index: #{texmf_dist_regex} \(shift=#{shift_doc_suffix_regex}\)/)
4551
end
4652

4753
it "should search TEXMFHOME using file system" do

0 commit comments

Comments
 (0)