File tree 2 files changed +37
-1
lines changed
2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ RSpec . describe "Document order in the result" , :type => :aruba do
4
+ include_context "messages"
5
+ include_context "texmf"
6
+
7
+ context "for documents with different scores" do
8
+ before ( :each ) { run_texdoc "-lM" , "babel" }
9
+
10
+ let ( :res_list_head ) do
11
+ <<~EXPECTED
12
+ babel\t 7.0\t #{ normalize_path ( texmf_dist / "doc/latex/babel/babel.pdf" ) } \t \t User guide
13
+ babel\t 4.0\t #{ normalize_path ( texmf_dist / "doc/latex/babel/babel-code.pdf" ) } \t \t Code documentation
14
+ EXPECTED
15
+ end
16
+
17
+ it "should be ordered by the scores" do
18
+ expect ( stdout ) . to start_with ( res_list_head )
19
+ end
20
+ end
21
+
22
+ context "for documents with the same scores and different extentions" do
23
+ before ( :each ) { run_texdoc "-lM" , "texlive-en" }
24
+
25
+ let ( :res_list_head ) do
26
+ <<~EXPECTED
27
+ texlive-en\t 10.0\t #{ normalize_path ( texmf_dist / "doc/texlive/texlive-en/texlive-en.pdf" ) } \t \t
28
+ texlive-en\t 10.0\t #{ normalize_path ( texmf_dist / "doc/texlive/texlive-en/texlive-en.html" ) } \t \t
29
+ EXPECTED
30
+ end
31
+
32
+ it "should be ordered by the extention position" do
33
+ expect ( stdout ) . to start_with ( res_list_head )
34
+ end
35
+ end
36
+ end
Original file line number Diff line number Diff line change 7
7
let ( :ps_texmf_dist ) { SpecHelplers ::Texdoc ::PS_TEXMF_DIST }
8
8
9
9
# the only real TEXMF tree
10
- let ( :texmf_dist ) { `kpsewhich --var-value TEXMFDIST` . chomp }
10
+ let ( :texmf_dist ) { Pathname ( `kpsewhich --var-value TEXMFDIST` . chomp ) }
11
11
12
12
# link to texlive.tlpdb
13
13
let ( :ps_tlpdb ) { SpecHelplers ::Texdoc ::REPO_TEXLIVE_TLPDB }
You can’t perform that action at this time.
0 commit comments