3
0
Fork 0
forked from mirrors/nixpkgs

tests.texlive.hyphen-base: init

This commit is contained in:
Vincenzo Mantova 2021-07-04 11:47:33 +01:00
parent cf292ea21d
commit d26a4266e2

View file

@ -119,4 +119,37 @@
texdoc --debug --list texdoc | tee "$out"
grep texdoc.pdf "$out"
'';
# test that language files are generated as expected
hyphen-base = runCommandNoCC "texlive-test-hyphen-base" {
hyphenBase = lib.head texlive.hyphen-base.pkgs;
schemeFull = texlive.combined.scheme-full;
schemeInfraOnly = texlive.combined.scheme-infraonly;
} ''
mkdir -p "$out"/{scheme-infraonly,scheme-full}
# create language files with no hyphenation patterns
cat "$hyphenBase"/tex/generic/config/language.us >language.dat
cat "$hyphenBase"/tex/generic/config/language.us.def >language.def
cat "$hyphenBase"/tex/generic/config/language.us.lua >language.dat.lua
cat >>language.dat.lua <<EOF
}
EOF
cat >>language.def <<EOF
%%% No changes may be made beyond this point.
\uselanguage {USenglish} %%% This MUST be the last line of the file.
EOF
for fname in language.{dat,def,dat.lua} ; do
diff --ignore-matching-lines='^\(%\|--\) Generated by ' -u \
{"$hyphenBase","$schemeFull"/share/texmf}/tex/generic/config/"$fname" \
| tee "$out/scheme-full/$fname.patch"
diff --ignore-matching-lines='^\(%\|--\) Generated by ' -u \
{,"$schemeInfraOnly"/share/texmf/tex/generic/config/}"$fname" \
| tee "$out/scheme-infraonly/$fname.patch"
done
'';
}