Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeX: Add format test for valid input command #522

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions t/fmt-tex.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,26 @@ foreach my $t (qw(basic theorem)) {

push @tests,
{
'doc' => 'invalid input command, without ignore',
'doc' => 'invalid input command (file does not exist), without ignore',
'format' => 'latex',
'input' => "fmt/tex/input-in-verbatim.tex",
'error' => 1,
'norm_stderr' => 'fmt/tex/input-in-verbatim.stderr-without-ignore',
},
{
'doc' => 'invalid input command, with exclude_include',
'doc' => 'invalid input command (file does not exist), with exclude_include',
'format' => 'latex',
'input' => "fmt/tex/input-in-verbatim.tex",
'options' => '-o exclude_include=main.tex'
},
{
'doc' => 'valid input command (file exists and must be included)',
'format' => 'latex',
'input' => "fmt/tex/input-in-basic.tex",
'norm' => "fmt/tex/input-in-basic.norm",
'potfile' => "fmt/tex/input-in-basic.pot",
'pofile' => "fmt/tex/input-in-basic.po",
'trans' => "fmt/tex/input-in-basic.trans"
};

run_all_tests(@tests);
Expand Down
10 changes: 10 additions & 0 deletions t/fmt/tex/input-in-basic.norm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% This file was generated with po4a. Translate the source file.
%
\documentclass[12pt]{article}
\begin{document}

same text in basic document

same text in subtext.tex

\end{document}
27 changes: 27 additions & 0 deletions t/fmt/tex/input-in-basic.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-09-07 14:44+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: document
#: input-in-basic.tex:5
msgid "same text in basic document"
msgstr "SAME TEXT IN BASIC DOCUMENT"

#. type: document
#: input-in-basic.tex:7
msgid "same text in subtext.tex"
msgstr "SAME TEXT IN SUBTEXT.TEX"
27 changes: 27 additions & 0 deletions t/fmt/tex/input-in-basic.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-09-07 14:44+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: document
#: input-in-basic.tex:5
msgid "same text in basic document"
msgstr ""

#. type: document
#: input-in-basic.tex:7
msgid "same text in subtext.tex"
msgstr ""
8 changes: 8 additions & 0 deletions t/fmt/tex/input-in-basic.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
\documentclass[12pt]{article}
\begin{document}

same text in basic document

\input{subtext.tex}

\end{document}
10 changes: 10 additions & 0 deletions t/fmt/tex/input-in-basic.trans
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% This file was generated with po4a. Translate the source file.
%
\documentclass[12pt]{article}
\begin{document}

SAME TEXT IN BASIC DOCUMENT

SAME TEXT IN SUBTEXT.TEX

\end{document}
1 change: 1 addition & 0 deletions t/fmt/tex/subtext.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
same text in subtext.tex
Loading