summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/oberdiek/test
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/test')
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test1.tex2
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test2.tex2
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test1.tex75
-rw-r--r--Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test2.tex130
4 files changed, 207 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test1.tex
index 00c3fb31aa2..2a17d139179 100644
--- a/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test1.tex
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test1.tex
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%% Copyright (C) 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test2.tex
index bd776d668d5..25619c5a721 100644
--- a/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test2.tex
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/hyphsubst-test2.tex
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%% Copyright (C) 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test1.tex
new file mode 100644
index 00000000000..00b6e63317d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test1.tex
@@ -0,0 +1,75 @@
+%%
+%% This is file `letltxmacro-test1.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% letltxmacro.dtx (with options: `test1')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file letltxmacro.dtx
+%% and the derived files
+%% letltxmacro.sty, letltxmacro.pdf, letltxmacro.ins, letltxmacro.drv,
+%% letltxmacro-test1.tex, letltxmacro-test2.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\documentclass{minimal}
+\makeatletter
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@\@ne
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@\@ne
+ \repeat
+}
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{127}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \RequirePackage{letltxmacro}[2008/06/09]\relax
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+\endinput
+%%
+%% End of file `letltxmacro-test1.tex'.
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test2.tex
new file mode 100644
index 00000000000..435b40b9a70
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/oberdiek/test/letltxmacro-test2.tex
@@ -0,0 +1,130 @@
+%%
+%% This is file `letltxmacro-test2.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% letltxmacro.dtx (with options: `test2')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file letltxmacro.dtx
+%% and the derived files
+%% letltxmacro.sty, letltxmacro.pdf, letltxmacro.ins, letltxmacro.drv,
+%% letltxmacro-test1.tex, letltxmacro-test2.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\nofiles
+\documentclass{minimal}
+
+\usepackage{letltxmacro}[2008/06/09]
+
+\usepackage{qstest}
+\IncludeTests{*}
+\LogTests{log}{*}{*}
+
+\makeatletter
+
+\def\TestDef#1{%
+ \begingroup
+ \@makeother\\%
+ \@makeother\ %
+ \expandafter\@TestDef\csname #1\endcsname
+}
+\def\@TestDef#1#2{%
+ \edef\a{\expandafter\strip@prefix\meaning#1}%
+ \edef\b{\detokenize{#2}}%
+ \ifx\a\b
+ \else
+ \typeout{1 [\a]}%
+ \typeout{2 [\b]}%
+ \fi
+ \endgroup
+ \Expect*{\expandafter\strip@prefix\meaning#1}*{\detokenize{#2}}%
+}
+\def\TestEquals#1#2{%
+ \Expect*{%
+ \expandafter\ifx\csname#1\expandafter\endcsname
+ \csname#2\endcsname
+ equals%
+ \else
+ wrong%
+ \fi
+ }{equals}%
+}
+\def\SaveA{%
+ \let\SavedA\TestA
+ \expandafter\let\csname\string\SavedA\expandafter\endcsname
+ \csname\string\TestA\endcsname
+ \expandafter\let\csname SavedA \expandafter\endcsname
+ \csname TestA \endcsname
+}
+\def\CheckA{%
+ \TestEquals{SavedA}{TestA}%
+ \TestEquals{\string\SavedA}{\string\TestA}%
+ \TestEquals{SavedA }{TestA }%
+}
+
+\begin{qstest}{robust}{robust}
+ \DeclareRobustCommand*{\TestA}{Test}%
+ \SaveA
+ \TestDef{TestA}{\protect \TestA }%
+ \CheckA
+ \DeclareRobustCommand{\TestA}{Test}%
+ \SaveA
+ \TestDef{TestA}{\protect \TestA }%
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\protect \TestB }%
+ \TestEquals{TestB }{TestA }%
+ \CheckA
+\end{qstest}
+
+\begin{qstest}{default}{default}
+ \newcommand{\TestA}[1][\relax default \empty]{TestA #1}%
+ \SaveA
+ \TestDef
+ {TestA}{\@protected@testopt \TestA \\TestA {\relax default \empty }}%
+ \LetLtxMacro\TestB\TestA
+ \TestDef
+ {TestB}{\@protected@testopt \TestB \\TestB {\relax default \empty }}%
+ \CheckA
+\end{qstest}
+
+\begin{qstest}{robustdefault}{robustdefault}
+ \DeclareRobustCommand{\TestA}[1][\default]{TestA}%
+ \SaveA
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\protect \TestB }%
+ \TestDef{TestB }{\@protected@testopt \TestB \\TestB {\default }}%
+ \CheckA
+\end{qstest}
+
+\begin{qstest}{plain}{plain}
+ \LetLtxMacro\NewRelax\relax
+ \Expect*{\meaning\relax}*{\string\relax}%
+ \Expect*{\meaning\NewRelax}*{\string\relax}%
+ \LetLtxMacro\NewHbox\hbox
+ \Expect*{\meaning\hbox}*{\string\hbox}%
+ \Expect*{\meaning\NewHbox}*{\string\hbox}%
+ \LetLtxMacro\NewEmpty\empty
+ \Expect*{\meaning\empty}{macro:->}%
+ \Expect*{\meaning\NewEmpty}{macro:->}%
+\end{qstest}
+\csname @@end\endcsname
+\endinput
+%%
+%% End of file `letltxmacro-test2.tex'.