Skip to content

Commit

Permalink
initial utf8 and space in filenames tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Feb 10, 2019
1 parent 24a1cae commit d585f2e
Show file tree
Hide file tree
Showing 8 changed files with 400 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/build.lua
Expand Up @@ -49,6 +49,7 @@ sourcefiles =
"sample2e.tex",
"small2e.tex",
"testpage.tex",
"utf8andspace.tex"
}
typesetfiles =
{
Expand Down
5 changes: 5 additions & 0 deletions base/config-filenames.lua
@@ -0,0 +1,5 @@
-- Tests for non Unicode engines

checkengines = {"pdftex,"xetex","luatex""}
checksearch = false
testfiledir = "testfiles-filenames"
2 changes: 2 additions & 0 deletions base/ltfinal.dtx
Expand Up @@ -1096,6 +1096,8 @@
% \begin{macrocode}
\makeatother
\errorstopmode
\input{utf8andspace}
\everyjob\expandafter{\the\everyjob\typeout{^^JUTF-8 and SPACE TESTS^^J}}
\dump
%</2ekernel>
% \end{macrocode}
Expand Down
Binary file added base/testfiles-filename/foo bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions base/testfiles-filename/one two three.tex
@@ -0,0 +1 @@
1 2 3
16 changes: 16 additions & 0 deletions base/testfiles-filename/space-test.lvt
@@ -0,0 +1,16 @@
\input{utf8andspace}
\documentclass{article}
\usepackage{graphicx}
\listfiles
\begin{document}


\input{one two three}

\includegraphics{foo bar}


\includegraphics[scale=2]{foo bar}


\end{document}
86 changes: 86 additions & 0 deletions base/testfiles-filename/utf-test.lvt
@@ -0,0 +1,86 @@
\input{utf8andspace}
\documentclass{article}

%\usepackage{textcomp}


% ----------------------------------------------------------

\input{utf8andspace}


\begin{filecontents*}{one two three}
1 2 3
\end{filecontents*}


\begin{filecontents*}{füße.tex}
Füße file
\end{filecontents*}

\begin{filecontents}{füße€€€.tex}
Expensive feet
\end{filecontents}

% this needs quotes
\begin{filecontents*}{"füße im sand.tex"}
eureka
\end{filecontents*}



\includeonly{foo, füße€€€ , öfoo}

\begin{document}

\tableofcontents

\section{A with ref: ``\ref{abß}''}

\label{öfoo}


Some refs: \ref{abß} and \ref{öfoo} and \ref{bar€}

\fontencoding{T1}\selectfont

Some refs: \ref{abß} and \ref{öfoo} and \ref{bar€}

\subsection{include tests}

\label{bar€}

\include{füße€€€} % exists
\include{€€€} % doesn't exist = No file €€€.aux.

\subsection{input tests}

\input{"füße im sand"} % exists

%\input{unknownfüße} % doesn't exist (should give file error)
% = File `unknownfüße.tex' not found.

\subsection{@input tests}
\label{abß}

\makeatletter

\@input{füße} % exists
\@input{€€€} % doesn't exist (should give warning)
% = No file €€€.

\@input{"füße im sand"} % exists

\makeatother

\def\foo{"füße im sand"}
\input{\foo} % exists

% next one fails
%\input füße


\input{one two three}

\end{document}

0 comments on commit d585f2e

Please sign in to comment.