diff options
author | Vincenzo Mantova <xworld21@users.sf.net> | 2021-07-04 11:47:33 +0100 |
---|---|---|
committer | Vincenzo Mantova <xworld21@users.sf.net> | 2021-07-04 11:47:33 +0100 |
commit | d26a4266e276e1127da1d616f97e7ae3360e4908 (patch) | |
tree | ddc090ed913952ccebf83ab1d097e8f8bbd2a802 | |
parent | cf292ea21da792138e53865093b6c4283c58345c (diff) |
tests.texlive.hyphen-base: init
-rw-r--r-- | pkgs/test/texlive/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 86c0a7f795b77..caeca4ae00c6f 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -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 + ''; } |