summaryrefslogtreecommitdiff
path: root/language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb')
-rw-r--r--language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb28
1 files changed, 22 insertions, 6 deletions
diff --git a/language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb b/language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb
index 4805b1878d..93f42c462d 100644
--- a/language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb
+++ b/language/hyph-utf8/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb
@@ -124,7 +124,7 @@ describe Language do
it "lists all languages" do
# All the TeX files. Note [no] and [mn-cyrl-x-lmc] don’t have corresponding plain text files.
- expect(Language.languages.count).to eq 82 # Was 79; 3 more “TeX Live dummies” [ar] [fa] [grc-x-ibycus] TODO Maybe remove
+ expect(Language.languages.count).to eq 83 # Was 79; 3 more “TeX Live dummies” [ar] [fa] [grc-x-ibycus] TODO Maybe remove
end
end
@@ -134,7 +134,7 @@ describe Language do
end
it "returns 81 languages" do # That’s all of them except for [sr-cyrl]
- expect(Language.all.count).to eq 81
+ expect(Language.all.count).to eq 82
end
end
@@ -737,10 +737,8 @@ describe Language do
expect(Language.new('ka').list_run_files).to eq ['tex/generic/hyph-utf8/loadhyph/loadhyph-ka.tex',
'tex/generic/hyph-utf8/patterns/tex/hyph-ka.tex',
'tex/generic/hyph-utf8/patterns/ptex/hyph-ka.t8m.tex',
- 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.chr.txt',
'tex/generic/hyph-utf8/patterns/txt/hyph-ka.pat.txt',
- 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.hyp.txt',
- 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.lic.txt']
+ 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.hyp.txt']
end
end
@@ -963,7 +961,7 @@ describe Package do
it "lists the run-time files" do
# pending "it crashes ;-)"
norwegian_run = norwegian.list_run_files
- expect(norwegian_run.count).to eq 15
+ expect(norwegian_run.count).to eq 11
expect(norwegian_run.select { |f| f =~ /tex\/hyph-[^\.]*\.tex$/ }).to eq ['tex/generic/hyph-utf8/patterns/tex/hyph-no.tex',
'tex/generic/hyph-utf8/patterns/tex/hyph-nb.tex',
'tex/generic/hyph-utf8/patterns/tex/hyph-nn.tex']
@@ -983,3 +981,21 @@ describe Package do
end
end
end
+
+describe Converter do
+ describe '#read' do
+ it "reads the conversion data" do
+ converter = Converter.new
+ converter.read(File.join(File.expand_path(__dir__), '..', '..', '..', 'data', 'encodings', 'macedonian.dat'))
+ puts converter.instance_variable_get(:@mapping)
+ end
+ end
+
+ describe '#convert' do
+ it "runs one pass through the file" do
+ converter = Converter.new
+ converter.read(File.join(File.expand_path(__dir__), '..', '..', '..', 'data', 'encodings', 'macedonian.dat'))
+ converter.convert(File.join(File.expand_path(__dir__), '..', '..', '..', '..', '..', '..', '..', 'old', 'other', 'mk', 'mkhyphen.tex'))
+ end
+ end
+end