X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fautotests%2FlyxStatus.pm;h=ef18c897bb2854ada818ed5eedcd5075d71f1f5b;hb=c4ae71ceb2cfbc3e8fb52cfbc8396a6309af5dbc;hp=c9a45830d686f68d736edd0722d769501b376564;hpb=a8c1161d7b3b36c9cc5cdc2e990d0b7abf9d6363;p=lyx.git diff --git a/development/autotests/lyxStatus.pm b/development/autotests/lyxStatus.pm index c9a45830d6..ef18c897bb 100644 --- a/development/autotests/lyxStatus.pm +++ b/development/autotests/lyxStatus.pm @@ -14,7 +14,7 @@ BEGIN { } # Prototypes -sub initLyxStack($$); +sub initLyxStack($$$); sub diestack($); sub closeLyxStack(); sub setMatching($); @@ -36,6 +36,7 @@ sub checkLyxLine($); my @stack = (); # list of HASH-Arrays my $rFont = {}; my $useNonTexFont = "true"; +my $inputEncoding = undef; # The elements are: # type (layout, inset, header, preamble, ...) @@ -49,7 +50,7 @@ my $useNonTexFont = "true"; # but first set the modified value into $result->[$fileidx] # numerical value will be replaced with appropriate matching group value -sub initLyxStack($$) +sub initLyxStack($$$) { $rFont = $_[0]; if ($_[1] eq "systemF") { @@ -57,6 +58,7 @@ sub initLyxStack($$) } else { $useNonTexFont = "false"; + $inputEncoding = $_[2]; } $stack[0] = { type => "Starting"}; } @@ -215,6 +217,12 @@ sub checkForHeader($) "filetype" => "replace_only", "result" => ["\\use_non_tex_fonts $useNonTexFont"]); push(@rElems, $elemntf); + if (defined($inputEncoding)) { + my $inputenc = newMatch("search" => '^\\\\inputencoding\s+(' . $inputEncoding->{search} . ')', + "filetype" => "replace_only", + "result" => ["\\inputencoding " . $inputEncoding->{out}]); + push(@rElems, $inputenc); + } setMatching(\@rElems); return(1); }