diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-25 00:14:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-25 00:14:21 +0000 |
commit | 3a17bfd79ba2527e8947328a85d40bb12a75cedb (patch) | |
tree | 14d6a30c876712ca634fc72acdb683873ff7a0a6 /Master/texmf-dist/doc/latex/oberdiek/test | |
parent | 7d6ef8fd8f6ae3043dd7aa5c350ac30e8ee509ec (diff) |
oberdiek update, kvoptions3.0 askinclude2.0 ... (24oct07)
git-svn-id: svn://tug.org/texlive/trunk@5275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/oberdiek/test')
112 files changed, 20248 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/ExtractRotate.java b/Master/texmf-dist/doc/latex/oberdiek/test/ExtractRotate.java new file mode 100644 index 00000000000..c65ee28a2df --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/ExtractRotate.java @@ -0,0 +1,48 @@ +/** + * ExtractRotate.java + * + * Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> + * + * Requires: PDFBox (http://www.pdfbox.org/) + * + * Syntax: java ExtractRotate <pdffile> <textfile> + * + * The <pdffile> is analyzed and for each page its rotation + * setting is printed in the <textfile>. Example: + * /Page 1 /Rotate 0 + * /Page 2 /Rotate 90 + */ +import java.io.FileInputStream; +import java.io.FileWriter; +import org.pdfbox.pdfparser.PDFParser; +import org.pdfbox.pdmodel.PDDocument; +import org.pdfbox.pdmodel.PDDocumentCatalog; +import org.pdfbox.pdmodel.PDPage; + +public class ExtractRotate { + + public static void main(String[] args) { + try { + String infile = args[0]; + String outfile = args[1]; + FileWriter out = new FileWriter(outfile); + PDFParser parser = + new PDFParser(new FileInputStream(infile)); + parser.parse(); + PDDocument document = parser.getPDDocument(); + PDDocumentCatalog catalog = document.getDocumentCatalog(); + int i = 0; + for (Object page: catalog.getAllPages()) { + i++; + out.write("/Page " + i + " " + "/Rotate " + + ((PDPage)page).findRotation() + "\n"); + } + document.close(); + out.close(); + } + catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } +} diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test1.tex new file mode 100644 index 00000000000..0823d890246 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `alphalph-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% alphalph.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 1999, 2006, 2007 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 alphalph.dtx +%% and the derived files +%% alphalph.sty, alphalph.pdf, alphalph.ins, alphalph.drv, +%% alphalph-test1.tex, alphalph-test2.tex, alphalph-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input alphalph.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `alphalph-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test2.tex new file mode 100644 index 00000000000..31b310ae78a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test2.tex @@ -0,0 +1,250 @@ +%% +%% This is file `alphalph-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% alphalph.dtx (with options: `test2,etex') +%% +%% This is a generated file. +%% +%% Copyright (C) 1999, 2006, 2007 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 alphalph.dtx +%% and the derived files +%% alphalph.sty, alphalph.pdf, alphalph.ins, alphalph.drv, +%% alphalph-test1.tex, alphalph-test2.tex, alphalph-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\usepackage{alphalph}[2007/09/09] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\newcommand*{\TestCmd}[3]{% + \setbox0=\hbox{% + \edef\TestString{#1{#2}}% + \expandafter\Expect\expandafter{\TestString}{#3}% + \edef\TestString{#1{#2} }% + \expandafter\Expect\expandafter{\TestString}{#3 }% + }% + \Expect*{\the\wd0}{0.0pt}% +} + +\makeatletter +\newalphalph\LaTeXAlphAlph\@Alph{26} +\newalphalph\LaTeXalphalph\@alph{26} +\newalphalph\AlphWrap[wrap]\alphalph@Alph{26} +\newalphalph\alphwrap[wrap]\alphalph@alph{26} +\newalphalph\LaTeXAlphWrap[wrap]\@Alph{26} +\newalphalph\LaTeXalphwrap[wrap]\@alph{26} +\def\LastSymbol#1{% + \ifx\\#1\\% + \else + \@LastSymbol#1\@nil + \fi +} +\def\@LastSymbol#1#2\@nil{% + \ifx\\#2\\% + #1% + \else + \@LastSymbol#2\@nil + \fi +} +\makeatother +\newcommand*{\TestAlph}[2]{% + \uppercase{\TestCallCmd\AlphAlph{#2}}{#1}% + \lowercase{\TestCallCmd\alphalph{#2}}{#1}% + \uppercase{\TestCallCmd\LaTeXAlphAlph{#2}}{#1}% + \lowercase{\TestCallCmd\LaTeXalphalph{#2}}{#1}% + \edef\WrapString{\LastSymbol{#2}}% + \expandafter\TestAlphWrap\expandafter{\WrapString}{#1}% +} +\newcommand*{\TestAlphWrap}[2]{% + \uppercase{\TestCallCmd\AlphWrap{#1}}{#2}% + \lowercase{\TestCallCmd\alphwrap{#1}}{#2}% + \uppercase{\TestCallCmd\LaTeXAlphWrap{#1}}{#2}% + \lowercase{\TestCallCmd\LaTeXalphwrap{#1}}{#2}% +} +\newcommand*{\TestCallCmd}[3]{% + \TestCmd#1{#3}{#2}% +} +\begin{qstest}{AlphSymbols}{alphalph, AlphAlph, symbols} + \TestAlph{1}{a}% + \TestAlph{2}{b}% + \TestAlph{3}{c}% + \TestAlph{4}{d}% + \TestAlph{5}{e}% + \TestAlph{6}{f}% + \TestAlph{7}{g}% + \TestAlph{8}{h}% + \TestAlph{9}{i}% + \TestAlph{10}{j}% + \TestAlph{11}{k}% + \TestAlph{12}{l}% + \TestAlph{13}{m}% + \TestAlph{14}{n}% + \TestAlph{15}{o}% + \TestAlph{16}{p}% + \TestAlph{17}{q}% + \TestAlph{18}{r}% + \TestAlph{19}{s}% + \TestAlph{20}{t}% + \TestAlph{21}{u}% + \TestAlph{22}{v}% + \TestAlph{23}{w}% + \TestAlph{24}{x}% + \TestAlph{25}{y}% + \TestAlph{26}{z}% +\end{qstest} +\begin{qstest}{AlphRange}{alphalph, range} + \TestAlph{0}{}% + \TestAlph{-1}{}% + \TestAlph{-2147483647}{}% + \TestAlph{27}{aa}% + \TestAlph{28}{ab}% + \TestAlph{52}{az}% + \TestAlph{53}{ba}% + \TestAlph{78}{bz}% + \TestAlph{79}{ca}% + \TestAlph{702}{zz}% + \TestAlph{703}{aaa}% + \TestAlph{2147483647}{fxshrxw}% +\end{qstest} + +\makeatletter +\newcommand*{\myvocals}[1]{% + \ifcase#1X\or A\or E\or I\or O\or U\else Y\fi +} +\makeatother +\newalphalph\vocalsvocals\myvocals{5} +\newcommand*{\TestVocals}{% + \TestCmd\vocalsvocals +} +\begin{qstest}{vocals}{vocals} + \TestVocals{0}{}% + \TestVocals{1}{A}% + \TestVocals{2}{E}% + \TestVocals{3}{I}% + \TestVocals{4}{O}% + \TestVocals{5}{U}% + \TestVocals{6}{AA}% + \TestVocals{7}{AE}% + \TestVocals{8}{AI}% + \TestVocals{9}{AO}% + \TestVocals{10}{AU}% + \TestVocals{11}{EA}% + \TestVocals{24}{OO}% + \TestVocals{25}{OU}% + \TestVocals{26}{UA}% + \TestVocals{29}{UO}% + \TestVocals{30}{UU}% + \TestVocals{31}{AAA}% + \TestVocals{155}{UUU}% + \TestVocals{156}{AAAA}% + \TestVocals{2147483647}{AIIOOEEIOIIUOE}% +\end{qstest} + +\makeatletter +\newalphalph\AlphMult[mult]{\alphalph@Alph}{26} +\newalphalph\alphmult[mult]{\alphalph@alph}{26} +\newalphalph\LaTeXAlphMult[mult]{\@Alph}{26} +\newalphalph\LaTeXalphmult[mult]{\@alph}{26} +\makeatother +\newcommand*{\TestMult}[2]{% + \uppercase{\TestCallCmd\AlphMult{#2}}{#1}% + \lowercase{\TestCallCmd\alphmult{#2}}{#1}% + \uppercase{\TestCallCmd\LaTeXAlphMult{#2}}{#1}% + \lowercase{\TestCallCmd\LaTeXalphmult{#2}}{#1}% +} +\begin{qstest}{mult}{mult} + \TestMult{0}{}% + \TestMult{-1}{}% + \TestMult{-2147483647}{}% + \TestMult{1}{a}% + \TestMult{2}{b}% + \TestMult{26}{z}% + \TestMult{27}{aa}% + \TestMult{28}{bb}% + \TestMult{52}{zz}% + \TestMult{53}{aaa}% + \TestMult{54}{bbb}% + \TestMult{259}{yyyyyyyyyy}% + \TestMult{260}{zzzzzzzzzz}% + \TestMult{261}{aaaaaaaaaaa}% + \TestMult{262}{bbbbbbbbbbb}% +\end{qstest} + +\def\myvocalsB#1{% + \ifcase#1\or A\or E\or I\or O\or U\fi +} +\begin{qstest}{symbolnum}{symbolnum} + \makeatletter + \def\Test#1#2{% + \let\TestCmd\relax + \newalphalph\TestCmd{#1}{}% + \Expect*{\AlPh@Number}{#2}% + }% + \Test\@alph{26}% + \Test\@Alph{26}% + \Test\@fnsymbol{9}% + \Test\myvocalsB{5}% + \Test\alphalph@alph{26}% + \Test\alphalph@Alph{26}% +\end{qstest} + +\begin{qstest}{list}{list} + \makeatletter + \def\catch#1\relax{% + \def\FoundList{\catch#1}% + }% + \def\Test[#1]#2#3#4{% + \let\testcmd\relax + \newalphalph\testcmd[{#1}]{\catch}{#2}% + \testcmd{#3}|\relax + \expandafter\Expect\expandafter{\FoundList}{#4|}% + % + \let\SavedCatch\catch + \def\catch{\noexpand\catch\noexpand\foo}% + \edef\Result{#4|}% + \@onelevel@sanitize\Result + \let\catch\SavedCatch + \let\testcmd\relax + \newalphalph\testcmd[{#1}]{\catch\foo}{#2}% + \testcmd{#3}|\relax + \@onelevel@sanitize\FoundList + \Expect*{\FoundList}*{\Result}% + }% + \Test[alph]{26}{3}{\catch{3}}% + \Test[alph]{26}{12}{\catch{12}}% + \Test[alph]{26}{27}{\catch{1}\catch{1}}% + \Test[alph]{26}{78}{\catch{2}\catch{26}}% + \Test[wrap]{26}{7}{\catch{7}}% + \Test[wrap]{26}{14}{\catch{14}}% + \Test[wrap]{26}{80}{\catch{2}}% + \Test[wrap]{26}{700}{\catch{24}}% + \Test[mult]{26}{4}{\catch{4}}% + \Test[mult]{26}{17}{\catch{17}}% + \Test[mult]{26}{54}{\catch{2}\catch{2}\catch{2}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `alphalph-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test3.tex new file mode 100644 index 00000000000..5ddff4f9f26 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/alphalph-test3.tex @@ -0,0 +1,261 @@ +%% +%% This is file `alphalph-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% alphalph.dtx (with options: `test2,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 1999, 2006, 2007 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 alphalph.dtx +%% and the derived files +%% alphalph.sty, alphalph.pdf, alphalph.ins, alphalph.drv, +%% alphalph-test1.tex, alphalph-test2.tex, alphalph-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\let\saved@numexpr\numexpr +\newcommand*{\DisableNumexpr}{% + \let\numexpr\@undefined +} +\newcommand*{\RestoreNumexpr}{% + \let\numexpr\saved@numexpr +} +\DisableNumexpr +\usepackage{alphalph}[2007/09/09] +\RestoreNumexpr +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\newcommand*{\TestCmd}[3]{% + \setbox0=\hbox{% + \DisableNumexpr + \edef\TestString{#1{#2}}% + \expandafter\Expect\expandafter{\TestString}{#3}% + \edef\TestString{#1{#2} }% + \expandafter\Expect\expandafter{\TestString}{#3 }% + }% + \Expect*{\the\wd0}{0.0pt}% +} + +\makeatletter +\newalphalph\LaTeXAlphAlph\@Alph{26} +\newalphalph\LaTeXalphalph\@alph{26} +\newalphalph\AlphWrap[wrap]\alphalph@Alph{26} +\newalphalph\alphwrap[wrap]\alphalph@alph{26} +\newalphalph\LaTeXAlphWrap[wrap]\@Alph{26} +\newalphalph\LaTeXalphwrap[wrap]\@alph{26} +\def\LastSymbol#1{% + \ifx\\#1\\% + \else + \@LastSymbol#1\@nil + \fi +} +\def\@LastSymbol#1#2\@nil{% + \ifx\\#2\\% + #1% + \else + \@LastSymbol#2\@nil + \fi +} +\makeatother +\newcommand*{\TestAlph}[2]{% + \uppercase{\TestCallCmd\AlphAlph{#2}}{#1}% + \lowercase{\TestCallCmd\alphalph{#2}}{#1}% + \uppercase{\TestCallCmd\LaTeXAlphAlph{#2}}{#1}% + \lowercase{\TestCallCmd\LaTeXalphalph{#2}}{#1}% + \edef\WrapString{\LastSymbol{#2}}% + \expandafter\TestAlphWrap\expandafter{\WrapString}{#1}% +} +\newcommand*{\TestAlphWrap}[2]{% + \uppercase{\TestCallCmd\AlphWrap{#1}}{#2}% + \lowercase{\TestCallCmd\alphwrap{#1}}{#2}% + \uppercase{\TestCallCmd\LaTeXAlphWrap{#1}}{#2}% + \lowercase{\TestCallCmd\LaTeXalphwrap{#1}}{#2}% +} +\newcommand*{\TestCallCmd}[3]{% + \TestCmd#1{#3}{#2}% +} +\begin{qstest}{AlphSymbols}{alphalph, AlphAlph, symbols} + \TestAlph{1}{a}% + \TestAlph{2}{b}% + \TestAlph{3}{c}% + \TestAlph{4}{d}% + \TestAlph{5}{e}% + \TestAlph{6}{f}% + \TestAlph{7}{g}% + \TestAlph{8}{h}% + \TestAlph{9}{i}% + \TestAlph{10}{j}% + \TestAlph{11}{k}% + \TestAlph{12}{l}% + \TestAlph{13}{m}% + \TestAlph{14}{n}% + \TestAlph{15}{o}% + \TestAlph{16}{p}% + \TestAlph{17}{q}% + \TestAlph{18}{r}% + \TestAlph{19}{s}% + \TestAlph{20}{t}% + \TestAlph{21}{u}% + \TestAlph{22}{v}% + \TestAlph{23}{w}% + \TestAlph{24}{x}% + \TestAlph{25}{y}% + \TestAlph{26}{z}% +\end{qstest} +\begin{qstest}{AlphRange}{alphalph, range} + \TestAlph{0}{}% + \TestAlph{-1}{}% + \TestAlph{-2147483647}{}% + \TestAlph{27}{aa}% + \TestAlph{28}{ab}% + \TestAlph{52}{az}% + \TestAlph{53}{ba}% + \TestAlph{78}{bz}% + \TestAlph{79}{ca}% + \TestAlph{702}{zz}% + \TestAlph{703}{aaa}% + \TestAlph{2147483647}{fxshrxw}% +\end{qstest} + +\makeatletter +\newcommand*{\myvocals}[1]{% + \ifcase#1X\or A\or E\or I\or O\or U\else Y\fi +} +\makeatother +\newalphalph\vocalsvocals\myvocals{5} +\newcommand*{\TestVocals}{% + \TestCmd\vocalsvocals +} +\begin{qstest}{vocals}{vocals} + \TestVocals{0}{}% + \TestVocals{1}{A}% + \TestVocals{2}{E}% + \TestVocals{3}{I}% + \TestVocals{4}{O}% + \TestVocals{5}{U}% + \TestVocals{6}{AA}% + \TestVocals{7}{AE}% + \TestVocals{8}{AI}% + \TestVocals{9}{AO}% + \TestVocals{10}{AU}% + \TestVocals{11}{EA}% + \TestVocals{24}{OO}% + \TestVocals{25}{OU}% + \TestVocals{26}{UA}% + \TestVocals{29}{UO}% + \TestVocals{30}{UU}% + \TestVocals{31}{AAA}% + \TestVocals{155}{UUU}% + \TestVocals{156}{AAAA}% + \TestVocals{2147483647}{AIIOOEEIOIIUOE}% +\end{qstest} + +\makeatletter +\newalphalph\AlphMult[mult]{\alphalph@Alph}{26} +\newalphalph\alphmult[mult]{\alphalph@alph}{26} +\newalphalph\LaTeXAlphMult[mult]{\@Alph}{26} +\newalphalph\LaTeXalphmult[mult]{\@alph}{26} +\makeatother +\newcommand*{\TestMult}[2]{% + \uppercase{\TestCallCmd\AlphMult{#2}}{#1}% + \lowercase{\TestCallCmd\alphmult{#2}}{#1}% + \uppercase{\TestCallCmd\LaTeXAlphMult{#2}}{#1}% + \lowercase{\TestCallCmd\LaTeXalphmult{#2}}{#1}% +} +\begin{qstest}{mult}{mult} + \TestMult{0}{}% + \TestMult{-1}{}% + \TestMult{-2147483647}{}% + \TestMult{1}{a}% + \TestMult{2}{b}% + \TestMult{26}{z}% + \TestMult{27}{aa}% + \TestMult{28}{bb}% + \TestMult{52}{zz}% + \TestMult{53}{aaa}% + \TestMult{54}{bbb}% + \TestMult{259}{yyyyyyyyyy}% + \TestMult{260}{zzzzzzzzzz}% + \TestMult{261}{aaaaaaaaaaa}% + \TestMult{262}{bbbbbbbbbbb}% +\end{qstest} + +\def\myvocalsB#1{% + \ifcase#1\or A\or E\or I\or O\or U\fi +} +\begin{qstest}{symbolnum}{symbolnum} + \makeatletter + \def\Test#1#2{% + \let\TestCmd\relax + \newalphalph\TestCmd{#1}{}% + \Expect*{\AlPh@Number}{#2}% + }% + \Test\@alph{26}% + \Test\@Alph{26}% + \Test\@fnsymbol{9}% + \Test\myvocalsB{5}% + \Test\alphalph@alph{26}% + \Test\alphalph@Alph{26}% +\end{qstest} + +\begin{qstest}{list}{list} + \makeatletter + \def\catch#1\relax{% + \def\FoundList{\catch#1}% + }% + \def\Test[#1]#2#3#4{% + \let\testcmd\relax + \newalphalph\testcmd[{#1}]{\catch}{#2}% + \testcmd{#3}|\relax + \expandafter\Expect\expandafter{\FoundList}{#4|}% + % + \let\SavedCatch\catch + \def\catch{\noexpand\catch\noexpand\foo}% + \edef\Result{#4|}% + \@onelevel@sanitize\Result + \let\catch\SavedCatch + \let\testcmd\relax + \newalphalph\testcmd[{#1}]{\catch\foo}{#2}% + \testcmd{#3}|\relax + \@onelevel@sanitize\FoundList + \Expect*{\FoundList}*{\Result}% + }% + \Test[alph]{26}{3}{\catch{3}}% + \Test[alph]{26}{12}{\catch{12}}% + \Test[alph]{26}{27}{\catch{1}\catch{1}}% + \Test[alph]{26}{78}{\catch{2}\catch{26}}% + \Test[wrap]{26}{7}{\catch{7}}% + \Test[wrap]{26}{14}{\catch{14}}% + \Test[wrap]{26}{80}{\catch{2}}% + \Test[wrap]{26}{700}{\catch{24}}% + \Test[mult]{26}{4}{\catch{4}}% + \Test[mult]{26}{17}{\catch{17}}% + \Test[mult]{26}{54}{\catch{2}\catch{2}\catch{2}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `alphalph-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-a.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-a.tex new file mode 100644 index 00000000000..b36335098b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-a.tex @@ -0,0 +1,47 @@ +%% +%% This is file `askinclude-a.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `a') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\chapter{Chapter A} +\let\filea=Y +\endinput +%% +%% End of file `askinclude-a.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-b.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-b.tex new file mode 100644 index 00000000000..57ec1a68851 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-b.tex @@ -0,0 +1,47 @@ +%% +%% This is file `askinclude-b.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `b') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\chapter{Chapter B} +\let\fileb=Y +\endinput +%% +%% End of file `askinclude-b.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-c.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-c.tex new file mode 100644 index 00000000000..35521c12b65 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-c.tex @@ -0,0 +1,47 @@ +%% +%% This is file `askinclude-c.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `c') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\chapter{Chapter C} +\let\filec=Y +\endinput +%% +%% End of file `askinclude-c.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test1.tex new file mode 100644 index 00000000000..41b0963b9ae --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test1.tex @@ -0,0 +1,238 @@ +%% +%% This is file `askinclude-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \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#1\EndTest{% + \RangeCatcodeInvalid{0}{47}% + \RangeCatcodeInvalid{58}{64}% + \RangeCatcodeInvalid{91}{96}% + \RangeCatcodeInvalid{123}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + #1\relax + \RestoreCatcodes + \makeatother + }% + \Test + \usepackage{askinclude}[2007/10/23]% + \EndTest +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{*} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{*} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test10.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test10.tex new file mode 100644 index 00000000000..a6c97696cd7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test10.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test10.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test10') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?{}N} +\CheckAnswer{askinclude-a} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test10.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test11.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test11.tex new file mode 100644 index 00000000000..7fe3ab90e3b --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test11.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test11.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test11') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?xxyxxN} +\CheckAnswer{askinclude-a} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test11.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test12.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test12.tex new file mode 100644 index 00000000000..6faec31a899 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test12.tex @@ -0,0 +1,210 @@ +%% +%% This is file `askinclude-test12.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test12') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{askinclude-b} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-b} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\AskInc@AddFile{askinclude-c} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-b} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{true} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test12.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test13.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test13.tex new file mode 100644 index 00000000000..49aa6a3c68c --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test13.tex @@ -0,0 +1,209 @@ +%% +%% This is file `askinclude-test13.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test13') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{askinclude-b} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-b} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-b} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{true} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test13.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test14.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test14.tex new file mode 100644 index 00000000000..ba67f07168a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test14.tex @@ -0,0 +1,209 @@ +%% +%% This is file `askinclude-test14.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test14') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{*} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{*} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{*} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test14.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test15.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test15.tex new file mode 100644 index 00000000000..074133b4c69 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test15.tex @@ -0,0 +1,211 @@ +%% +%% This is file `askinclude-test15.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test15') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?D} +\CheckAnswer{askinclude-a,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\gdef\AskInc@Answer{askinclude-a,askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test15.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test16.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test16.tex new file mode 100644 index 00000000000..98e3438b78d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test16.tex @@ -0,0 +1,212 @@ +%% +%% This is file `askinclude-test16.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test16') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?A} +\CheckAnswer{askinclude-a,askinclude-b,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\gdef\AskInc@Answer{askinclude-a,askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\gdef\AskInc@Answer{askinclude-a,askinclude-b,askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test16.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test17.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test17.tex new file mode 100644 index 00000000000..7f065e02f4a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test17.tex @@ -0,0 +1,209 @@ +%% +%% This is file `askinclude-test17.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test17') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?N} +\CheckAnswer{} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test17.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test18.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test18.tex new file mode 100644 index 00000000000..2dac7959bde --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test18.tex @@ -0,0 +1,210 @@ +%% +%% This is file `askinclude-test18.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test18') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\includeonly{askinclude-b} +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{} +\CheckAnswer{askinclude-a} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{true} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test18.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test19.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test19.tex new file mode 100644 index 00000000000..c54102de25b --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test19.tex @@ -0,0 +1,214 @@ +%% +%% This is file `askinclude-test19.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test19') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?N} +\CheckAnswer{} +\begin{filecontents*}{\jobname.aux} +\gdef\AskInc@Answer{askinclude-a} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\AskInc@AddFile{askinclude-b} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\ifx\AtBeginDocumentMode Y% + \AtBeginDocument{\includeonly{askinclude-b}}% +\else + \includeonly{askinclude-b}% +\fi +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test19.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex new file mode 100644 index 00000000000..fb2270519fe --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test2.tex @@ -0,0 +1,204 @@ +%% +%% This is file `askinclude-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{*} +\CheckAnswer{*} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{*} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test20.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test20.tex new file mode 100644 index 00000000000..0f689f5363e --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test20.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test20.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test20') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\let\AtBeginDocumentMode=N% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{*} +\begin{filecontents*}{\jobname.aux} +\@includeonly{*} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{*} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test20.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test21.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test21.tex new file mode 100644 index 00000000000..ab61dec472c --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test21.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test21.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test21') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\let\AtBeginDocumentMode=N% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{-} +\begin{filecontents*}{\jobname.aux} +\@includeonly{} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{-} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test21.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test22.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test22.tex new file mode 100644 index 00000000000..ee9bd2c75f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test22.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test22.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test22') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\let\AtBeginDocumentMode=N% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{}} +\CheckAnswer{askinclude-a,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\@includeonly{askinclude-a,askinclude-c} +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-a,askinclude-c} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test22.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test23.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test23.tex new file mode 100644 index 00000000000..c855fa077f5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test23.tex @@ -0,0 +1,208 @@ +%% +%% This is file `askinclude-test23.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test23') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{makematch}{*,!askinclude-b}} +\CheckAnswer{*,!askinclude-b} +\CheckMatchMethod{makematch} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{*,!askinclude-b} +\gdef\AskInc@MatchMethod{makematch} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +|AddMatch +\AskInc@AddMatch{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\AskInc@AddMatch{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test23.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test24.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test24.tex new file mode 100644 index 00000000000..98521c41003 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test24.tex @@ -0,0 +1,208 @@ +%% +%% This is file `askinclude-test24.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test24') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{pdfmatch}{.,!askinclude-b}} +\CheckAnswer{.,!askinclude-b} +\CheckMatchMethod{pdfmatch} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{.,!askinclude-b} +\gdef\AskInc@MatchMethod{pdfmatch} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +|AddMatch +\AskInc@AddMatch{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\AskInc@AddMatch{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test24.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test3.tex new file mode 100644 index 00000000000..57c2abaf228 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test3.tex @@ -0,0 +1,204 @@ +%% +%% This is file `askinclude-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{-}% +\CheckAnswer{-} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{-} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test4.tex new file mode 100644 index 00000000000..952ea8cbdcf --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test4.tex @@ -0,0 +1,204 @@ +%% +%% This is file `askinclude-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{askinclude-b}} +\CheckAnswer{askinclude-b} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-b} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{false} +\CheckInclude{b}{true} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test5.tex new file mode 100644 index 00000000000..1b3f293b550 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test5.tex @@ -0,0 +1,204 @@ +%% +%% This is file `askinclude-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test5') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{{askinclude-a,askinclude-c}} +\CheckAnswer{askinclude-a,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{askinclude-a,askinclude-c} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test6.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test6.tex new file mode 100644 index 00000000000..a47b258b7e2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test6.tex @@ -0,0 +1,206 @@ +%% +%% This is file `askinclude-test6.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test6') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?yny} +\CheckAnswer{askinclude-a,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\gdef\AskInc@Answer{askinclude-a,askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test6.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex new file mode 100644 index 00000000000..80eae1bb8c8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test7.tex @@ -0,0 +1,207 @@ +%% +%% This is file `askinclude-test7.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test7') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?yA} +\CheckAnswer{askinclude-a,askinclude-b,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\gdef\AskInc@Answer{askinclude-a,askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\gdef\AskInc@Answer{askinclude-a,askinclude-b,askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test7.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test8.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test8.tex new file mode 100644 index 00000000000..f90d7ed43dc --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test8.tex @@ -0,0 +1,207 @@ +%% +%% This is file `askinclude-test8.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test8') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?yD} +\CheckAnswer{askinclude-a,askinclude-b,askinclude-c} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\gdef\AskInc@Answer{askinclude-a,askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\gdef\AskInc@Answer{askinclude-a,askinclude-b,askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{true} +\CheckInclude{c}{true} +\end{document} +\endinput +%% +%% End of file `askinclude-test8.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test9.tex b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test9.tex new file mode 100644 index 00000000000..ab1f15e67ea --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/askinclude-test9.tex @@ -0,0 +1,205 @@ +%% +%% This is file `askinclude-test9.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% askinclude.dtx (with options: `test0,test9') +%% +%% This is a generated file. +%% +%% Copyright (C) 1991-1994 by Pablo A. Straub +%% Copyright (C) 2007 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 askinclude.dtx +%% and the derived files +%% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv, +%% askinclude-a.tex, askinclude-b.tex, askinclude-c.tex, +%% askinclude-test1.tex, askinclude-test2.tex, +%% askinclude-test3.tex, askinclude-test4.tex, +%% askinclude-test5.tex, askinclude-test6.tex, +%% askinclude-test7.tex, askinclude-test8.tex, +%% askinclude-test9.tex, askinclude-test10.tex, +%% askinclude-test11.tex, askinclude-test12.tex, +%% askinclude-test13.tex, askinclude-test14.tex, +%% askinclude-test15.tex, askinclude-test16.tex, +%% askinclude-test17.tex, askinclude-test18.tex, +%% askinclude-test19.tex, askinclude-test20.tex, +%% askinclude-test21.tex, askinclude-test22.tex, +%% askinclude-test23.tex, askinclude-test24.tex. +%% +\ifx\CompatibilityMode Y% + \documentstyle[filecontents,qstest,askinclude]{book}% +\else + \documentclass{book}% + \usepackage{filecontents}% + \usepackage{qstest}% + \ifx\AtBeginDocumentMode Y% + \AtBeginDocument{% + \usepackage{askinclude}[2007/10/23]% + }% + \else + \usepackage{askinclude}[2007/10/23]% + \fi +\fi +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\org@typein\typein +\def\typein[#1]#2{% + \ifx\@Stack\@StackEmpty + \begin{qstest}{StackNonEmpty}{StackNonEmpty}% + \Expect{Error: empty stack}{}% + \end{qstest}% + \org@typein[{#1}]{#2}% + \else + \edef#1{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@car\@Stack\@nil + }% + }% + \xdef\@Stack{% + \unexpanded\expandafter\expandafter\expandafter{% + \expandafter\@cdr\@Stack\@nil + }% + }% + \typeout{}% + \typeout{\string#1=#1}% + \fi +} +\def\@StackEmpty{\BOTTOM} +\let\@Stack\@StackEmpty +\newcommand*{\Stack}[1]{% + \def\@Stack{#1\BOTTOM}% +} +\AtEndDocument{% + \begin{qstest}{StackUsed}{StackUsed}% + \Expect*{% + \ifx\@Stack\@StackEmpty + \else + Error: Unused stack entries% + \fi + }{}% + \end{qstest}% +} +\newcommand*{\CheckInclude}[2]{% + \include{askinclude-#1}% + \begin{qstest}{CheckInclude-#1}{CheckInclude-#1}% + \Expect*{% + \expandafter\ifx\csname file#1\endcsname Ytrue\else false\fi + }{#2}% + \end{qstest}% +} +\def\@EndChecks{} +\AtBeginDocument{% + \AtEndDocument{% + \if@filesw + \immediate\write\@mainaux{\string\@EndChecks}% + \fi + }% +} +\newcommand*{\CheckAnswer}[1]{% + \gdef\AnswerText{#1}% + \g@addto@macro\@EndChecks{\@CheckAnswer}% +} +\def\@CheckAnswer{% + \begin{qstest}{CheckAnswer}{CheckAnswer}% + \Expect*{\unexpanded\expandafter{\AskInc@Answer}}% + *{\unexpanded\expandafter{\AnswerText}}% + \end{qstest}% +} +\newcommand*{\CheckMatchMethod}[1]{% + \gdef\MatchMethodText{#1}% + \g@addto@macro\@EndChecks{\@CheckMatchMethod}% +} +\def\@CheckMatchMethod{% + \begin{qstest}{CheckMatchMethod}{CheckMatchMethod}% + \Expect*{\unexpanded\expandafter{\AskInc@MatchMethod}}% + *{\unexpanded\expandafter{\MatchMethodText}}% + \end{qstest}% +} +\def\@CheckAux{% + \begin{qstest}{CheckAux}{CheckAux}% + \def\GetFileContents##1{% + \pdfunescapehex{% + \pdffiledump length\pdffilesize{##1}{##1}% + }% + }% + \Expect*{\GetFileContents{\jobname.aux}}% + *{\GetFileContents{\jobname-aux.aux}}% + \end{qstest}% +} +\g@addto@macro\@EndChecks{\@CheckAux} +\let\org@filec@ntents\filec@ntents +\def\filec@ntents{% + \catcode`\|=0 % + \org@filec@ntents +} +\begingroup + \endlinechar=-1 % + \catcode`\|=0 % + \@makeother\#% + \@makeother\\% + |gdef|AddList{% + \providecommand*\AskInc@AddList[2]{% + \ifcase\ifx#1\@undefined + \else\ifx#1\relax + \else\ifx#1\@empty + \else1\fi\fi\fi0 % + \gdef#1{#2}% + \else + \g@addto@macro#1{,#2}% + \fi + }% + }% + |gdef|AddFile{% + \providecommand\AskInc@AddFile{% + \AskInc@AddList\AskInc@Files + }% + }% + |gdef|AddMatch{% + \providecommand\AskInc@AddMatch{% + \AskInc@AddList\AskInc@MatchFiles + }% + }% +|endgroup +\Stack{?yN} +\CheckAnswer{askinclude-a} +\begin{filecontents*}{\jobname.aux} +\relax +\end{filecontents*} +\begin{filecontents*}{\jobname-aux.aux} +\relax|space +\gdef\AskInc@Answer{} +\gdef\AskInc@MatchMethod{} +|AddList +|AddFile +\AskInc@AddFile{askinclude-a} +\gdef\AskInc@Answer{askinclude-a} +\@input{askinclude-a.aux} +\AskInc@AddFile{askinclude-b} +\@input{askinclude-b.aux} +\AskInc@AddFile{askinclude-c} +\@input{askinclude-c.aux} +\@EndChecks +\end{filecontents*} +\begin{document} +\CheckInclude{a}{true} +\CheckInclude{b}{false} +\CheckInclude{c}{false} +\end{document} +\endinput +%% +%% End of file `askinclude-test9.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test1.tex new file mode 100644 index 00000000000..b6677eb7b7c --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `atbegshi-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% atbegshi.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 atbegshi.dtx +%% and the derived files +%% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, +%% atbegshi-example.tex, atbegshi-test1.tex, +%% atbegshi-test2.tex, atbegshi-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input atbegshi.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `atbegshi-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test2.tex new file mode 100644 index 00000000000..4ce167f48f6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test2.tex @@ -0,0 +1,126 @@ +%% +%% This is file `atbegshi-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% atbegshi.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 atbegshi.dtx +%% and the derived files +%% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, +%% atbegshi-example.tex, atbegshi-test1.tex, +%% atbegshi-test2.tex, atbegshi-test3.tex. +%% +\input atbegshi.sty\relax +\def\msg#{\immediate\write16} +\msg{File: atbegshi-test2.tex 2007/09/09 v1.6 Test file for plain-TeX} +\def\testmsg#1#2{% + \msg{}% + \msg{*** Test with box (#1), expected page output [#2]}% hash-ok +} + +\newbox\voidbox +\def\void{\box\voidbox} +\begingroup + \setbox\voidbox=\void +\endgroup + +\count0=0\relax +\AtBeginShipout{% + \global\advance\count0 by 1\relax + \msg{* Inside \string\AtBeginShipout: [\the\count0]}% +} + +\AtBeginShipoutFirst{% + \msg{* Inside \string\AtBeginShipoutFirst}% + Hello World% +} + +\testmsg{\string\null}{1} +\shipout\null + +\AtBeginShipoutFirst{% + This is too late% +} + +\testmsg{void}{} +\shipout\void + +\testmsg{\string\copy255 (not void)}{2} +\setbox255\hbox{\vrule height 10bp width 10bp} +\shipout\copy255 % + +\testmsg{\string\copy255 (again)}{3} +\shipout\copy255 % + +\testmsg{\string\box255}{4} +\shipout\box255 % + +\testmsg{\string\box255 (again)}{} +\shipout\box255 % + +\testmsg{\string\hbox}{5} +\shipout\hbox{\vrule height 5bp width 20bp} + +\testmsg{\string\vbox}{6} +\shipout\vbox{\hrule height 20bp width 5bp} + +\testmsg{\string\null, voided by hook}{} +\def\VoidBox{% + \begingroup + \setbox\AtBeginShipoutBox=\box\AtBeginShipoutBox + \endgroup +} +\AtBeginShipout{\VoidBox} +\shipout\null +\def\VoidBox{} + +\msg{*** \string\begingroup} +\begingroup + \testmsg{void}{}% + \shipout\void +\msg{*** \string\endgroup} +\endgroup + +\msg{*** \string\begingroup} +\begingroup + \testmsg{void}{}% + \shipout\void + \testmsg{\string\null}{8}% + \shipout\null +\msg{*** \string\endgroup} +\endgroup + +\testmsg{output routine}{9} +Hello World +\vfill +\eject + +\testmsg{\string\null\space(discarded)}{} +\AtBeginShipout{% + \msg{* Inside \string\AtBeginShipout: DISCARD}% + \AtBeginShipoutDiscard +} +\shipout\null + +\end +\endinput +%% +%% End of file `atbegshi-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test3.tex new file mode 100644 index 00000000000..d8d20c078dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/atbegshi-test3.tex @@ -0,0 +1,75 @@ +%% +%% This is file `atbegshi-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% atbegshi.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 atbegshi.dtx +%% and the derived files +%% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, +%% atbegshi-example.tex, atbegshi-test1.tex, +%% atbegshi-test2.tex, atbegshi-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{atbegshi-test3.tex}[2007/09/09 v1.6 Test file for LaTeX] +\RequirePackage{color} +\pagecolor{yellow} +\documentclass[a5paper,showtrims]{memoir} +\usepackage{atbegshi} +\AtBeginShipout{% + \setbox\AtBeginShipoutBox=\vbox{% + \vbox to 0pt{% + \kern-1.5in % + \hbox to 0pt{% + \kern-1.5in % + \color{blue}% + \rule{1in}{1in}% + \hss + }% + \vss + }% + \hrule + \hbox{\vrule\box\AtBeginShipoutBox\vrule}% + \hrule + }% +} +\usepackage{eso-pic} +\makeatletter +\@EveryShipout@Init +\let\@EveryShipout@Init\relax +\makeatother +\AddToShipoutPicture{% + \hspace{.52\paperwidth}% + \colorbox{cyan}{% + \rule{0mm}{\paperheight}% + \hspace{.48\paperwidth}% + }% +} +\expandafter\let\csname ver@crop.sty\endcsname\relax +\usepackage[color=red,cross,a4,center]{crop} +\begin{document} +\shipout\null +\shipout\box\csname voidb@x\endcsname +\section{Hello World} +\end{document} +\endinput +%% +%% End of file `atbegshi-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test1.tex new file mode 100644 index 00000000000..acedbc7d1bf --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `bigintcalc-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bigintcalc.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bigintcalc.dtx +%% and the derived files +%% bigintcalc.sty, bigintcalc.pdf, bigintcalc.ins, bigintcalc.drv, +%% bigintcalc-test1.tex, bigintcalc-test2.tex, +%% bigintcalc-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input bigintcalc.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `bigintcalc-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test2.tex new file mode 100644 index 00000000000..3d34ec0e48f --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test2.tex @@ -0,0 +1,812 @@ +%% +%% This is file `bigintcalc-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bigintcalc.dtx (with options: `test2,etex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bigintcalc.dtx +%% and the derived files +%% bigintcalc.sty, bigintcalc.pdf, bigintcalc.ins, bigintcalc.drv, +%% bigintcalc-test1.tex, bigintcalc-test2.tex, +%% bigintcalc-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\chardef\BIC@TestMode=1 % +\makeatother +\usepackage{bigintcalc}[2007/09/27] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newcommand*{\TestSpaceAtEnd}[1]{% + \edef\resultA{#1}% + \edef\resultB{#1 }% + \Expect*{\resultA\space}*{\resultB}% +} +\newcommand*{\TestResult}[2]{% + \edef\result{#1}% + \Expect*{\result}{#2}% +} +\newcommand*{\TestResultTwoExpansions}[2]{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1}{#2}% +} +\newcount\TestCount +\newcommand*{\TestArg}[1]{\numexpr#1\relax} +\newcommand*{\TestTeXDivide}[2]{% + \TestCount=\TestArg{#1}\relax + \divide\TestCount by \TestArg{#2}\relax + \Expect*{\bigintcalcDiv{#1}{#2}}*{\the\TestCount}% +} +\newcommand*{\Test}[2]{% + \TestResult{#1}{#2}% + \TestResultTwoExpansions{#1}{#2}% + \TestSpaceAtEnd{#1}% +} +\newcommand*{\TestExch}[2]{\Test{#2}{#1}} +\newcommand*{\TestInv}[2]{% + \Test{\bigintcalcInv{#1}}{#2}% +} +\newcommand*{\TestAbs}[2]{% + \Test{\bigintcalcAbs{#1}}{#2}% +} +\newcommand*{\TestSgn}[2]{% + \Test{\bigintcalcSgn{#1}}{#2}% +} +\newcommand*{\TestMin}[3]{% + \Test{\bigintcalcMin{#1}{#2}}{#3}% +} +\newcommand*{\TestMax}[3]{% + \Test{\bigintcalcMax{#1}{#2}}{#3}% +} +\newcommand*{\TestCmp}[3]{% + \Test{\bigintcalcCmp{#1}{#2}}{#3}% +} +\newcommand*{\TestOdd}[2]{% + \Test{\bigintcalcOdd{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcOdd + \bigintcalcAbs{#1}!% + }{#2}% + }% + \x +} +\newcommand*{\TestInc}[2]{% + \Test{\bigintcalcInc{#1}}{#2}% + \ifnum\bigintcalcSgn{#1}>-1 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcInc\bigintcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestDec}[2]{% + \Test{\bigintcalcDec{#1}}{#2}% + \ifnum\bigintcalcSgn{#1}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcDec\bigintcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestAdd}[3]{% + \Test{\bigintcalcAdd{#1}{#2}}{#3}% + \ifnum\bigintcalcSgn{#1}>0 % + \ifnum\bigintcalcSgn{#2}> 0 % + \ifnum\bigintcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcAdd + \bigintcalcNum{#1}!\bigintcalcNum{#2}!% + }{#3}% + }% + \x + \else + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcAdd + \bigintcalcNum{#2}!\bigintcalcNum{#1}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestSub}[3]{% + \Test{\bigintcalcSub{#1}{#2}}{#3}% + \ifnum\bigintcalcSgn{#1}>0 % + \ifnum\bigintcalcSgn{#2}> 0 % + \ifnum\bigintcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcSub + \bigintcalcNum{#1}!\bigintcalcNum{#2}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestShl}[2]{% + \Test{\bigintcalcShl{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcShl\bigintcalcAbs{#1}!% + }{\bigintcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestShr}[2]{% + \Test{\bigintcalcShr{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcShr\bigintcalcAbs{#1}!% + }{\bigintcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestMul}[3]{% + \Test{\bigintcalcMul{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcMul + \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% + \x +} +\newcommand*{\TestSqr}[2]{% + \Test{\bigintcalcSqr{#1}}{#2}% +} +\newcommand*{\TestFac}[2]{% + \expandafter\TestExch\expandafter{% + \the\numexpr#2% + }{\bigintcalcFac{#1}}% +} +\newcommand*{\TestFacBig}[2]{% + \Test{\bigintcalcFac{#1}}{#2}% +} +\newcommand*{\TestPow}[3]{% + \Test{\bigintcalcPow{#1}{#2}}{#3}% +} +\newcommand*{\TestDiv}[3]{% + \Test{\bigintcalcDiv{#1}{#2}}{#3}% + \TestTeXDivide{#1}{#2}% +} +\newcommand*{\TestDivBig}[3]{% + \Test{\bigintcalcDiv{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcDiv\bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% +} +\newcommand*{\TestMod}[3]{% + \Test{\bigintcalcMod{#1}{#2}}{#3}% + \ifcase\ifcase\bigintcalcSgn{#1} 0% + \or + \ifcase\bigintcalcSgn{#2} 1% + \or 0% + \else 1% + \fi + \else + \ifcase\bigintcalcSgn{#2} 1% + \or 1% + \else 0% + \fi + \fi\relax + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcMod + \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% + \x + \fi +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter + +\begin{qstest}{inv}{inv}% + \TestInv{0}{0}% + \TestInv{1}{-1}% + \TestInv{-1}{1}% + \TestInv{10}{-10}% + \TestInv{-10}{10}% + \TestInv{2147483647}{-2147483647}% + \TestInv{-2147483647}{2147483647}% + \TestInv{12345678901234567890}{-12345678901234567890}% + \TestInv{-12345678901234567890}{12345678901234567890}% + \TestInv{ 0 }{0}% + \TestInv{ 1 }{-1}% + \TestInv{--1}{-1}% + \TestInv{\number\z@}{0}% + \TestInv{\ifx\relax\relax1\fi}{-1}% + \TestInv{\ifx\relax\relax-\fi\ifx234\else1\fi}{1}% +\end{qstest} + +\begin{qstest}{abs}{abs}% + \TestAbs{0}{0}% + \TestAbs{1}{1}% + \TestAbs{-1}{1}% + \TestAbs{10}{10}% + \TestAbs{-10}{10}% + \TestAbs{2147483647}{2147483647}% + \TestAbs{-2147483647}{2147483647}% + \TestAbs{12345678901234567890}{12345678901234567890}% + \TestAbs{-12345678901234567890}{12345678901234567890}% + \TestAbs{ 0 }{0}% + \TestAbs{ 1 }{1}% + \TestAbs{--1}{1}% + \TestAbs{-+-+1}{1}% + \TestAbs{00000000000}{0}% + \TestAbs{00000001000}{1000}% + \TestAbs{\ifx\relax\relax 0\else 1\fi}{0}% +\end{qstest} + +\begin{qstest}{sign}{sign}% + \TestSgn{0}{0}% + \TestSgn{1}{1}% + \TestSgn{-1}{-1}% + \TestSgn{10}{1}% + \TestSgn{-10}{-1}% + \TestSgn{2147483647}{1}% + \TestSgn{-2147483647}{-1}% + \TestSgn{12345678901234567890}{1}% + \TestSgn{-12345678901234567890}{-1}% + \TestSgn{ 0 }{0}% + \TestSgn{ 2 }{1}% + \TestSgn{ -2 }{-1}% + \TestSgn{--2}{1}% + \TestSgn{\number\z@}{0}% + \TestSgn{\number\@ne}{1}% + \TestSgn{\number\m@ne}{-1}% + \TestSgn{% + -+-+\number\z@\number\z@ + \iftrue1\fi\iftrue2\fi\iftrue3\fi + }{1}% +\end{qstest} + +\begin{qstest}{min}{min}% + \TestMin{0}{1}{0}% + \TestMin{1}{0}{0}% + \TestMin{-10}{-20}{-20}% + \TestMin{ 1 }{ 2 }{1}% + \TestMin{ 2 }{ 1 }{1}% + \TestMin{1}{1}{1}% + \TestMin{\number\z@}{\number\@ne}{0}% + \TestMin{\number\@ne}{\number\m@ne}{-1}% +\end{qstest} + +\begin{qstest}{max}{max}% + \TestMax{0}{1}{1}% + \TestMax{1}{0}{1}% + \TestMax{-10}{-20}{-10}% + \TestMax{ 1 }{ 2 }{2}% + \TestMax{ 2 }{ 1 }{2}% + \TestMax{1}{1}{1}% + \TestMax{\number\z@}{\number\@ne}{1}% + \TestMax{\number\@ne}{\number\m@ne}{1}% +\end{qstest} + +\begin{qstest}{cmp}{cmp}% + \TestCmp{0}{0}{0}% + \TestCmp{-21}{17}{-1}% + \TestCmp{3}{4}{-1}% + \TestCmp{-10}{-10}{0}% + \TestCmp{-10}{-11}{1}% + \TestCmp{100}{5}{1}% + \TestCmp{9}{10}{-1}% + \TestCmp{10}{9}{1}% + \TestCmp{ 3 }{ 3 }{0}% + \TestCmp{-9}{-10}{1}% + \TestCmp{-10}{-9}{-1}% + \TestCmp{-3}{-3}{0}% + \TestCmp{0}{-2}{1}% + \TestCmp{0}{2}{-1}% + \TestCmp{2}{0}{1}% + \TestCmp{-2}{0}{-1}% + \TestCmp{12}{11}{1}% + \TestCmp{11}{12}{-1}% + \TestCmp{2147483647}{-2147483647}{1}% + \TestCmp{-2147483647}{2147483647}{-1}% + \TestCmp{2147483647}{2147483647}{0}% + \TestCmp{\number\z@}{\number\@ne}{-1}% + \TestCmp{\number\@ne}{\number\m@ne}{1}% + \TestCmp{ 4 }{ 5 }{-1}% + \TestCmp{ -3 }{ -7 }{1}% +\end{qstest} + +\begin{qstest}{odd}{odd} +\tracingmacros=1 + \TestOdd{0}{0}% + \TestOdd{1}{1}% + \TestOdd{2}{0}% + \TestOdd{3}{1}% + \TestOdd{14}{0}% + \TestOdd{15}{1}% + \TestOdd{12345678901234567896}{0}% + \TestOdd{12345678901234567897}{1}% +\end{qstest} + +\begin{qstest}{inc}{inc}% + \TestInc{0}{1}% + \TestInc{1}{2}% + \TestInc{-1}{0}% + \TestInc{10}{11}% + \TestInc{-10}{-9}% + \TestInc{ 3 }{4}% + \TestInc{999}{1000}% + \TestInc{-1000}{-999}% + \TestInc{129}{130}% + \TestInc{2147483646}{2147483647}% + \TestInc{-2147483647}{-2147483646}% + \TestInc{12345678901234567890}{12345678901234567891}% + \TestInc{99999999999999999999}{100000000000000000000}% + \TestInc{-12345678901234567891}{-12345678901234567890}% + \TestInc{-100000000000000000000}{-99999999999999999999}% +\end{qstest} + +\begin{qstest}{dec}{dec}% + \TestDec{0}{-1}% + \TestDec{1}{0}% + \TestDec{-1}{-2}% + \TestDec{10}{9}% + \TestDec{-10}{-11}% + \TestDec{1000}{999}% + \TestDec{-999}{-1000}% + \TestDec{130}{129}% + \TestDec{2147483647}{2147483646}% + \TestDec{-2147483646}{-2147483647}% + \TestDec{12345678901234567891}{12345678901234567890}% + \TestDec{100000000000000000000}{99999999999999999999}% + \TestDec{-12345678901234567890}{-12345678901234567891}% + \TestDec{-99999999999999999999}{-100000000000000000000}% +\end{qstest} + +\begin{qstest}{add}{add}% + \TestAdd{0}{0}{0}% + \TestAdd{1}{0}{1}% + \TestAdd{0}{1}{1}% + \TestAdd{1}{2}{3}% + \TestAdd{-1}{-1}{-2}% + \TestAdd{2147483646}{1}{2147483647}% + \TestAdd{-2147483647}{2147483647}{0}% + \TestAdd{20}{-5}{15}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{-4}{1}{-3}% + \TestAdd{-1}{4}{3}% + \TestAdd{4}{-1}{3}% + \TestAdd{1}{-4}{-3}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{ -4 }{ 1 }{-3}% + \TestAdd{ -1 }{ 4 }{3}% + \TestAdd{ 4 }{ -1 }{3}% + \TestAdd{ 1 }{ -4 }{-3}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{876543210}{111111111}{987654321}% + \TestAdd{999999999}{2}{1000000001}% +\end{qstest} + +\begin{qstest}{sub}{sub} + \TestSub{0}{0}{0}% + \TestSub{1}{0}{1}% + \TestSub{1}{2}{-1}% + \TestSub{-1}{-1}{0}% + \TestSub{2147483646}{-1}{2147483647}% + \TestSub{-2147483647}{-2147483647}{0}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{-4}{1}{-5}% + \TestSub{-1}{4}{-5}% + \TestSub{4}{-1}{5}% + \TestSub{1}{-4}{5}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{ -4 }{ 1 }{-5}% + \TestSub{ -1 }{ 4 }{-5}% + \TestSub{ 4 }{ -1 }{5}% + \TestSub{ 1 }{ -4 }{5}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{1000000000}{2}{999999998}% + \TestSub{987654321}{111111111}{876543210}% +\end{qstest} + +\begin{qstest}{shl}{shl} + \TestShl{0}{0}% + \TestShl{1}{2}% + \TestShl{2}{4}% + \TestShl{5621}{11242}% + \TestShl{1073741823}{2147483646}% +\end{qstest} + +\begin{qstest}{shr}{shr} + \TestShr{0}{0}% + \TestShr{1}{0}% + \TestShr{2}{1}% + \TestShr{3}{1}% + \TestShr{4}{2}% + \TestShr{5}{2}% + \TestShr{6}{3}% + \TestShr{7}{3}% + \TestShr{8}{4}% + \TestShr{9}{4}% + \TestShr{10}{5}% + \TestShr{11}{5}% + \TestShr{12}{6}% + \TestShr{13}{6}% + \TestShr{14}{7}% + \TestShr{15}{7}% + \TestShr{16}{8}% + \TestShr{17}{8}% + \TestShr{18}{9}% + \TestShr{19}{9}% + \TestShr{20}{10}% + \TestShr{21}{10}% + \TestShr{22}{11}% + \TestShr{11241}{5620}% + \TestShr{73054202}{36527101}% + \TestShr{2147483646}{1073741823}% +\end{qstest} + +\begin{qstest}{mul}{mul} + \TestMul{0}{0}{0}% + \TestMul{1}{0}{0}% + \TestMul{0}{1}{0}% + \TestMul{1}{1}{1}% + \TestMul{3}{1}{3}% + \TestMul{1}{-3}{-3}% + \TestMul{-4}{-5}{20}% + \TestMul{3}{7}{21}% + \TestMul{7}{3}{21}% + \TestMul{3}{-7}{-21}% + \TestMul{7}{-3}{-21}% + \TestMul{-3}{7}{-21}% + \TestMul{-7}{3}{-21}% + \TestMul{-3}{-7}{21}% + \TestMul{-7}{-3}{21}% + \TestMul{12}{11}{132}% + \TestMul{999}{333}{332667}% + \TestMul{1000}{4321}{4321000}% + \TestMul{12345}{173955}{2147474475}% + \TestMul{1073741823}{2}{2147483646}% + \TestMul{2}{1073741823}{2147483646}% + \TestMul{-1073741823}{2}{-2147483646}% + \TestMul{2}{-1073741823}{-2147483646}% + \TestMul{6706022400}{13}{87178291200}% +\end{qstest} + +\begin{qstest}{sqr}{sqr} + \TestSqr{0}{0}% + \TestSqr{1}{1}% + \TestSqr{2}{4}% + \TestSqr{3}{9}% + \TestSqr{4}{16}% + \TestSqr{9}{81}% + \TestSqr{10}{100}% + \TestSqr{46340}{2147395600}% + \TestSqr{-1}{1}% + \TestSqr{-2}{4}% + \TestSqr{-46340}{2147395600}% +\end{qstest} + +\begin{qstest}{fac}{fac} + \TestFac{0}{1}% + \TestFac{1}{1}% + \TestFac{2}{2}% + \TestFac{3}{2*3}% + \TestFac{4}{2*3*4}% + \TestFac{5}{2*3*4*5}% + \TestFac{6}{2*3*4*5*6}% + \TestFac{7}{2*3*4*5*6*7}% + \TestFac{8}{2*3*4*5*6*7*8}% + \TestFac{9}{2*3*4*5*6*7*8*9}% + \TestFac{10}{2*3*4*5*6*7*8*9*10}% + \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% + \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% + \TestFacBig{13}{6227020800}% + \TestFacBig{14}{87178291200}% + \TestFacBig{15}{1307674368000}% + \TestFacBig{16}{20922789888000}% + \TestFacBig{17}{355687428096000}% + \TestFacBig{18}{6402373705728000}% + \TestFacBig{19}{121645100408832000}% + \TestFacBig{20}{2432902008176640000}% + \TestFacBig{21}{51090942171709440000}% + \TestFacBig{22}{1124000727777607680000}% +\end{qstest} + +\begin{qstest}{pow}{pow} + \TestPow{-2}{0}{1}% + \TestPow{-1}{0}{1}% + \TestPow{0}{0}{1}% + \TestPow{1}{0}{1}% + \TestPow{2}{0}{1}% + \TestPow{3}{0}{1}% + \TestPow{-2}{1}{-2}% + \TestPow{-1}{1}{-1}% + \TestPow{1}{1}{1}% + \TestPow{2}{1}{2}% + \TestPow{3}{1}{3}% + \TestPow{-2}{2}{4}% + \TestPow{-1}{2}{1}% + \TestPow{0}{2}{0}% + \TestPow{1}{2}{1}% + \TestPow{2}{2}{4}% + \TestPow{3}{2}{9}% + \TestPow{0}{1}{0}% + \TestPow{1}{-2}{1}% + \TestPow{1}{-1}{1}% + \TestPow{-1}{-2}{1}% + \TestPow{-1}{-1}{-1}% + \TestPow{-1}{3}{-1}% + \TestPow{-1}{4}{1}% + \TestPow{-2}{-1}{0}% + \TestPow{-2}{-2}{0}% + \TestPow{2}{3}{8}% + \TestPow{2}{4}{16}% + \TestPow{2}{5}{32}% + \TestPow{2}{6}{64}% + \TestPow{2}{7}{128}% + \TestPow{2}{8}{256}% + \TestPow{2}{9}{512}% + \TestPow{2}{10}{1024}% + \TestPow{-2}{3}{-8}% + \TestPow{-2}{4}{16}% + \TestPow{-2}{5}{-32}% + \TestPow{-2}{6}{64}% + \TestPow{-2}{7}{-128}% + \TestPow{-2}{8}{256}% + \TestPow{-2}{9}{-512}% + \TestPow{-2}{10}{1024}% + \TestPow{3}{3}{27}% + \TestPow{3}{4}{81}% + \TestPow{3}{5}{243}% + \TestPow{-3}{3}{-27}% + \TestPow{-3}{4}{81}% + \TestPow{-3}{5}{-243}% + \TestPow{2}{30}{1073741824}% + \TestPow{-3}{19}{-1162261467}% + \TestPow{5}{13}{1220703125}% + \TestPow{-7}{11}{-1977326743}% +\end{qstest} + +\begin{qstest}{div}{div} + \TestDiv{1}{1}{1}% + \TestDiv{2}{1}{2}% + \TestDiv{-2}{1}{-2}% + \TestDiv{2}{-1}{-2}% + \TestDiv{-2}{-1}{2}% + \TestDiv{15}{2}{7}% + \TestDiv{-16}{2}{-8}% + \TestDiv{1}{2}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{-2}{3}{0}% + \TestDiv{2}{-3}{0}% + \TestDiv{-2}{-3}{0}% + \TestDiv{13}{3}{4}% + \TestDiv{-13}{-3}{4}% + \TestDiv{-13}{3}{-4}% + \TestDiv{-6}{5}{-1}% + \TestDiv{-5}{5}{-1}% + \TestDiv{-4}{5}{0}% + \TestDiv{-3}{5}{0}% + \TestDiv{-2}{5}{0}% + \TestDiv{-1}{5}{0}% + \TestDiv{0}{5}{0}% + \TestDiv{1}{5}{0}% + \TestDiv{2}{5}{0}% + \TestDiv{3}{5}{0}% + \TestDiv{4}{5}{0}% + \TestDiv{5}{5}{1}% + \TestDiv{6}{5}{1}% + \TestDiv{-5}{4}{-1}% + \TestDiv{-4}{4}{-1}% + \TestDiv{-3}{4}{0}% + \TestDiv{-2}{4}{0}% + \TestDiv{-1}{4}{0}% + \TestDiv{0}{4}{0}% + \TestDiv{1}{4}{0}% + \TestDiv{2}{4}{0}% + \TestDiv{3}{4}{0}% + \TestDiv{4}{4}{1}% + \TestDiv{5}{4}{1}% + \TestDiv{12345}{678}{18}% + \TestDiv{32372}{5952}{5}% + \TestDiv{284271294}{18162}{15651}% + \TestDiv{217652429}{12561}{17327}% + \TestDiv{462028434}{5439}{84947}% + \TestDiv{2147483647}{1000}{2147483}% + \TestDiv{2147483647}{-1000}{-2147483}% + \TestDiv{-2147483647}{1000}{-2147483}% + \TestDiv{-2147483647}{-1000}{2147483}% + \TestDiv{0}{3}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{3}{3}{1}% + \TestDiv{4}{3}{1}% + \TestDiv{5}{3}{1}% + \TestDiv{6}{3}{2}% + \TestDiv{7}{3}{2}% + \TestDiv{8}{3}{2}% + \TestDiv{9}{3}{3}% + \TestDiv{10}{3}{3}% + \TestDiv{11}{3}{3}% + \TestDiv{12}{3}{4}% + \TestDiv{13}{3}{4}% + \TestDiv{14}{3}{4}% + \TestDiv{15}{3}{5}% + \TestDiv{16}{3}{5}% + \TestDiv{17}{3}{5}% + \TestDiv{18}{3}{6}% + \TestDiv{19}{3}{6}% + \TestDiv{20}{3}{6}% + \TestDiv{21}{3}{7}% + \TestDiv{22}{3}{7}% + \TestDiv{23}{3}{7}% + \TestDiv{24}{3}{8}% + \TestDiv{25}{3}{8}% + \TestDiv{26}{3}{8}% + \TestDiv{27}{3}{9}% + \TestDiv{28}{3}{9}% + \TestDiv{29}{3}{9}% + \TestDiv{30}{3}{10}% + \TestDiv{31}{3}{10}% + \TestDivBig{17363436332507}{24702}{702916214}% +\end{qstest} + +\begin{qstest}{mod}{mod} + \TestMod{-6}{5}{4}% + \TestMod{-5}{5}{0}% + \TestMod{-4}{5}{1}% + \TestMod{-3}{5}{2}% + \TestMod{-2}{5}{3}% + \TestMod{-1}{5}{4}% + \TestMod{0}{5}{0}% + \TestMod{1}{5}{1}% + \TestMod{2}{5}{2}% + \TestMod{3}{5}{3}% + \TestMod{4}{5}{4}% + \TestMod{5}{5}{0}% + \TestMod{6}{5}{1}% + \TestMod{-5}{4}{3}% + \TestMod{-4}{4}{0}% + \TestMod{-3}{4}{1}% + \TestMod{-2}{4}{2}% + \TestMod{-1}{4}{3}% + \TestMod{0}{4}{0}% + \TestMod{1}{4}{1}% + \TestMod{2}{4}{2}% + \TestMod{3}{4}{3}% + \TestMod{4}{4}{0}% + \TestMod{5}{4}{1}% + \TestMod{-6}{-5}{-1}% + \TestMod{-5}{-5}{0}% + \TestMod{-4}{-5}{-4}% + \TestMod{-3}{-5}{-3}% + \TestMod{-2}{-5}{-2}% + \TestMod{-1}{-5}{-1}% + \TestMod{0}{-5}{0}% + \TestMod{1}{-5}{-4}% + \TestMod{2}{-5}{-3}% + \TestMod{3}{-5}{-2}% + \TestMod{4}{-5}{-1}% + \TestMod{5}{-5}{0}% + \TestMod{6}{-5}{-4}% + \TestMod{-5}{-4}{-1}% + \TestMod{-4}{-4}{0}% + \TestMod{-3}{-4}{-3}% + \TestMod{-2}{-4}{-2}% + \TestMod{-1}{-4}{-1}% + \TestMod{0}{-4}{0}% + \TestMod{1}{-4}{-3}% + \TestMod{2}{-4}{-2}% + \TestMod{3}{-4}{-1}% + \TestMod{4}{-4}{0}% + \TestMod{5}{-4}{-3}% + \TestMod{2147483647}{1000}{647}% + \TestMod{2147483647}{-1000}{-353}% + \TestMod{-2147483647}{1000}{353}% + \TestMod{-2147483647}{-1000}{-647}% + \TestMod{ 0 }{ 4 }{0}% + \TestMod{ 1 }{ 4 }{1}% + \TestMod{ -1 }{ 4 }{3}% + \TestMod{ 0 }{ -4 }{0}% + \TestMod{ 1 }{ -4 }{-3}% + \TestMod{ -1 }{ -4 }{-1}% + \TestMod{18362}{25}{12}% +\end{qstest} + +\newcommand*{\TestError}[2]{% + \begingroup + \expandafter\def\csname BigIntCalcError:#1\endcsname{}% + \Expect*{#2}{0}% + \expandafter\def\csname BigIntCalcError:#1\endcsname{ERROR}% + \Expect*{#2}{0ERROR}% + \endgroup +} +\begin{qstest}{error}{error} + \TestError{FacNegative}{\bigintcalcFac{-1}}% + \TestError{FacNegative}{\bigintcalcFac{-2147483647}}% + \TestError{DivisionByZero}{\bigintcalcPow{0}{-1}}% + \TestError{DivisionByZero}{\bigintcalcDiv{1}{0}}% + \TestError{DivisionByZero}{\bigintcalcMod{1}{0}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `bigintcalc-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test3.tex new file mode 100644 index 00000000000..67b97d45a8d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bigintcalc-test3.tex @@ -0,0 +1,825 @@ +%% +%% This is file `bigintcalc-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bigintcalc.dtx (with options: `test2,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bigintcalc.dtx +%% and the derived files +%% bigintcalc.sty, bigintcalc.pdf, bigintcalc.ins, bigintcalc.drv, +%% bigintcalc-test1.tex, bigintcalc-test2.tex, +%% bigintcalc-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\let\SavedNumexpr\numexpr +\let\numexpr\UNDEFINED +\makeatletter +\chardef\BIC@TestMode=1 % +\makeatother +\usepackage{bigintcalc}[2007/09/27] +\let\numexpr\SavedNumexpr +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newcommand*{\TestSpaceAtEnd}[1]{% + \let\SavedNumexpr\numexpr + \let\numexpr\UNDEFINED + \edef\resultA{#1}% + \edef\resultB{#1 }% + \let\numexpr\SavedNumexpr + \Expect*{\resultA\space}*{\resultB}% +} +\newcommand*{\TestResult}[2]{% + \let\SavedNumexpr\numexpr + \let\numexpr\UNDEFINED + \edef\result{#1}% + \let\numexpr\SavedNumexpr + \Expect*{\result}{#2}% +} +\newcommand*{\TestResultTwoExpansions}[2]{% + \begingroup + \let\numexpr\UNDEFINED + \expandafter\expandafter\expandafter + \endgroup + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1}{#2}% +} +\newcount\TestCount +\newcommand*{\TestArg}[1]{#1} +\newcommand*{\TestTeXDivide}[2]{% + \TestCount=\TestArg{#1}\relax + \divide\TestCount by \TestArg{#2}\relax + \Expect*{\bigintcalcDiv{#1}{#2}}*{\the\TestCount}% +} +\newcommand*{\Test}[2]{% + \TestResult{#1}{#2}% + \TestResultTwoExpansions{#1}{#2}% + \TestSpaceAtEnd{#1}% +} +\newcommand*{\TestExch}[2]{\Test{#2}{#1}} +\newcommand*{\TestInv}[2]{% + \Test{\bigintcalcInv{#1}}{#2}% +} +\newcommand*{\TestAbs}[2]{% + \Test{\bigintcalcAbs{#1}}{#2}% +} +\newcommand*{\TestSgn}[2]{% + \Test{\bigintcalcSgn{#1}}{#2}% +} +\newcommand*{\TestMin}[3]{% + \Test{\bigintcalcMin{#1}{#2}}{#3}% +} +\newcommand*{\TestMax}[3]{% + \Test{\bigintcalcMax{#1}{#2}}{#3}% +} +\newcommand*{\TestCmp}[3]{% + \Test{\bigintcalcCmp{#1}{#2}}{#3}% +} +\newcommand*{\TestOdd}[2]{% + \Test{\bigintcalcOdd{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcOdd + \bigintcalcAbs{#1}!% + }{#2}% + }% + \x +} +\newcommand*{\TestInc}[2]{% + \Test{\bigintcalcInc{#1}}{#2}% + \ifnum\bigintcalcSgn{#1}>-1 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcInc\bigintcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestDec}[2]{% + \Test{\bigintcalcDec{#1}}{#2}% + \ifnum\bigintcalcSgn{#1}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcDec\bigintcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestAdd}[3]{% + \Test{\bigintcalcAdd{#1}{#2}}{#3}% + \ifnum\bigintcalcSgn{#1}>0 % + \ifnum\bigintcalcSgn{#2}> 0 % + \ifnum\bigintcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcAdd + \bigintcalcNum{#1}!\bigintcalcNum{#2}!% + }{#3}% + }% + \x + \else + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcAdd + \bigintcalcNum{#2}!\bigintcalcNum{#1}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestSub}[3]{% + \Test{\bigintcalcSub{#1}{#2}}{#3}% + \ifnum\bigintcalcSgn{#1}>0 % + \ifnum\bigintcalcSgn{#2}> 0 % + \ifnum\bigintcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcSub + \bigintcalcNum{#1}!\bigintcalcNum{#2}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestShl}[2]{% + \Test{\bigintcalcShl{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcShl\bigintcalcAbs{#1}!% + }{\bigintcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestShr}[2]{% + \Test{\bigintcalcShr{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcShr\bigintcalcAbs{#1}!% + }{\bigintcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestMul}[3]{% + \Test{\bigintcalcMul{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcMul + \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% + \x +} +\newcommand*{\TestSqr}[2]{% + \Test{\bigintcalcSqr{#1}}{#2}% +} +\newcommand*{\TestFac}[2]{% + \expandafter\TestExch\expandafter{% + \the\numexpr#2% + }{\bigintcalcFac{#1}}% +} +\newcommand*{\TestFacBig}[2]{% + \Test{\bigintcalcFac{#1}}{#2}% +} +\newcommand*{\TestPow}[3]{% + \Test{\bigintcalcPow{#1}{#2}}{#3}% +} +\newcommand*{\TestDiv}[3]{% + \Test{\bigintcalcDiv{#1}{#2}}{#3}% + \TestTeXDivide{#1}{#2}% +} +\newcommand*{\TestDivBig}[3]{% + \Test{\bigintcalcDiv{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcDiv\bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% +} +\newcommand*{\TestMod}[3]{% + \Test{\bigintcalcMod{#1}{#2}}{#3}% + \ifcase\ifcase\bigintcalcSgn{#1} 0% + \or + \ifcase\bigintcalcSgn{#2} 1% + \or 0% + \else 1% + \fi + \else + \ifcase\bigintcalcSgn{#2} 1% + \or 1% + \else 0% + \fi + \fi\relax + \edef\x{% + \noexpand\Test{% + \noexpand\BigIntCalcMod + \bigintcalcAbs{#1}!\bigintcalcAbs{#2}!% + }{\bigintcalcAbs{#3}}% + }% + \x + \fi +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter + +\begin{qstest}{inv}{inv}% + \TestInv{0}{0}% + \TestInv{1}{-1}% + \TestInv{-1}{1}% + \TestInv{10}{-10}% + \TestInv{-10}{10}% + \TestInv{2147483647}{-2147483647}% + \TestInv{-2147483647}{2147483647}% + \TestInv{12345678901234567890}{-12345678901234567890}% + \TestInv{-12345678901234567890}{12345678901234567890}% + \TestInv{ 0 }{0}% + \TestInv{ 1 }{-1}% + \TestInv{--1}{-1}% + \TestInv{\number\z@}{0}% + \TestInv{\ifx\relax\relax1\fi}{-1}% + \TestInv{\ifx\relax\relax-\fi\ifx234\else1\fi}{1}% +\end{qstest} + +\begin{qstest}{abs}{abs}% + \TestAbs{0}{0}% + \TestAbs{1}{1}% + \TestAbs{-1}{1}% + \TestAbs{10}{10}% + \TestAbs{-10}{10}% + \TestAbs{2147483647}{2147483647}% + \TestAbs{-2147483647}{2147483647}% + \TestAbs{12345678901234567890}{12345678901234567890}% + \TestAbs{-12345678901234567890}{12345678901234567890}% + \TestAbs{ 0 }{0}% + \TestAbs{ 1 }{1}% + \TestAbs{--1}{1}% + \TestAbs{-+-+1}{1}% + \TestAbs{00000000000}{0}% + \TestAbs{00000001000}{1000}% + \TestAbs{\ifx\relax\relax 0\else 1\fi}{0}% +\end{qstest} + +\begin{qstest}{sign}{sign}% + \TestSgn{0}{0}% + \TestSgn{1}{1}% + \TestSgn{-1}{-1}% + \TestSgn{10}{1}% + \TestSgn{-10}{-1}% + \TestSgn{2147483647}{1}% + \TestSgn{-2147483647}{-1}% + \TestSgn{12345678901234567890}{1}% + \TestSgn{-12345678901234567890}{-1}% + \TestSgn{ 0 }{0}% + \TestSgn{ 2 }{1}% + \TestSgn{ -2 }{-1}% + \TestSgn{--2}{1}% + \TestSgn{\number\z@}{0}% + \TestSgn{\number\@ne}{1}% + \TestSgn{\number\m@ne}{-1}% + \TestSgn{% + -+-+\number\z@\number\z@ + \iftrue1\fi\iftrue2\fi\iftrue3\fi + }{1}% +\end{qstest} + +\begin{qstest}{min}{min}% + \TestMin{0}{1}{0}% + \TestMin{1}{0}{0}% + \TestMin{-10}{-20}{-20}% + \TestMin{ 1 }{ 2 }{1}% + \TestMin{ 2 }{ 1 }{1}% + \TestMin{1}{1}{1}% + \TestMin{\number\z@}{\number\@ne}{0}% + \TestMin{\number\@ne}{\number\m@ne}{-1}% +\end{qstest} + +\begin{qstest}{max}{max}% + \TestMax{0}{1}{1}% + \TestMax{1}{0}{1}% + \TestMax{-10}{-20}{-10}% + \TestMax{ 1 }{ 2 }{2}% + \TestMax{ 2 }{ 1 }{2}% + \TestMax{1}{1}{1}% + \TestMax{\number\z@}{\number\@ne}{1}% + \TestMax{\number\@ne}{\number\m@ne}{1}% +\end{qstest} + +\begin{qstest}{cmp}{cmp}% + \TestCmp{0}{0}{0}% + \TestCmp{-21}{17}{-1}% + \TestCmp{3}{4}{-1}% + \TestCmp{-10}{-10}{0}% + \TestCmp{-10}{-11}{1}% + \TestCmp{100}{5}{1}% + \TestCmp{9}{10}{-1}% + \TestCmp{10}{9}{1}% + \TestCmp{ 3 }{ 3 }{0}% + \TestCmp{-9}{-10}{1}% + \TestCmp{-10}{-9}{-1}% + \TestCmp{-3}{-3}{0}% + \TestCmp{0}{-2}{1}% + \TestCmp{0}{2}{-1}% + \TestCmp{2}{0}{1}% + \TestCmp{-2}{0}{-1}% + \TestCmp{12}{11}{1}% + \TestCmp{11}{12}{-1}% + \TestCmp{2147483647}{-2147483647}{1}% + \TestCmp{-2147483647}{2147483647}{-1}% + \TestCmp{2147483647}{2147483647}{0}% + \TestCmp{\number\z@}{\number\@ne}{-1}% + \TestCmp{\number\@ne}{\number\m@ne}{1}% + \TestCmp{ 4 }{ 5 }{-1}% + \TestCmp{ -3 }{ -7 }{1}% +\end{qstest} + +\begin{qstest}{odd}{odd} +\tracingmacros=1 + \TestOdd{0}{0}% + \TestOdd{1}{1}% + \TestOdd{2}{0}% + \TestOdd{3}{1}% + \TestOdd{14}{0}% + \TestOdd{15}{1}% + \TestOdd{12345678901234567896}{0}% + \TestOdd{12345678901234567897}{1}% +\end{qstest} + +\begin{qstest}{inc}{inc}% + \TestInc{0}{1}% + \TestInc{1}{2}% + \TestInc{-1}{0}% + \TestInc{10}{11}% + \TestInc{-10}{-9}% + \TestInc{ 3 }{4}% + \TestInc{999}{1000}% + \TestInc{-1000}{-999}% + \TestInc{129}{130}% + \TestInc{2147483646}{2147483647}% + \TestInc{-2147483647}{-2147483646}% + \TestInc{12345678901234567890}{12345678901234567891}% + \TestInc{99999999999999999999}{100000000000000000000}% + \TestInc{-12345678901234567891}{-12345678901234567890}% + \TestInc{-100000000000000000000}{-99999999999999999999}% +\end{qstest} + +\begin{qstest}{dec}{dec}% + \TestDec{0}{-1}% + \TestDec{1}{0}% + \TestDec{-1}{-2}% + \TestDec{10}{9}% + \TestDec{-10}{-11}% + \TestDec{1000}{999}% + \TestDec{-999}{-1000}% + \TestDec{130}{129}% + \TestDec{2147483647}{2147483646}% + \TestDec{-2147483646}{-2147483647}% + \TestDec{12345678901234567891}{12345678901234567890}% + \TestDec{100000000000000000000}{99999999999999999999}% + \TestDec{-12345678901234567890}{-12345678901234567891}% + \TestDec{-99999999999999999999}{-100000000000000000000}% +\end{qstest} + +\begin{qstest}{add}{add}% + \TestAdd{0}{0}{0}% + \TestAdd{1}{0}{1}% + \TestAdd{0}{1}{1}% + \TestAdd{1}{2}{3}% + \TestAdd{-1}{-1}{-2}% + \TestAdd{2147483646}{1}{2147483647}% + \TestAdd{-2147483647}{2147483647}{0}% + \TestAdd{20}{-5}{15}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{-4}{1}{-3}% + \TestAdd{-1}{4}{3}% + \TestAdd{4}{-1}{3}% + \TestAdd{1}{-4}{-3}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{ -4 }{ 1 }{-3}% + \TestAdd{ -1 }{ 4 }{3}% + \TestAdd{ 4 }{ -1 }{3}% + \TestAdd{ 1 }{ -4 }{-3}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{876543210}{111111111}{987654321}% + \TestAdd{999999999}{2}{1000000001}% +\end{qstest} + +\begin{qstest}{sub}{sub} + \TestSub{0}{0}{0}% + \TestSub{1}{0}{1}% + \TestSub{1}{2}{-1}% + \TestSub{-1}{-1}{0}% + \TestSub{2147483646}{-1}{2147483647}% + \TestSub{-2147483647}{-2147483647}{0}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{-4}{1}{-5}% + \TestSub{-1}{4}{-5}% + \TestSub{4}{-1}{5}% + \TestSub{1}{-4}{5}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{ -4 }{ 1 }{-5}% + \TestSub{ -1 }{ 4 }{-5}% + \TestSub{ 4 }{ -1 }{5}% + \TestSub{ 1 }{ -4 }{5}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{1000000000}{2}{999999998}% + \TestSub{987654321}{111111111}{876543210}% +\end{qstest} + +\begin{qstest}{shl}{shl} + \TestShl{0}{0}% + \TestShl{1}{2}% + \TestShl{2}{4}% + \TestShl{5621}{11242}% + \TestShl{1073741823}{2147483646}% +\end{qstest} + +\begin{qstest}{shr}{shr} + \TestShr{0}{0}% + \TestShr{1}{0}% + \TestShr{2}{1}% + \TestShr{3}{1}% + \TestShr{4}{2}% + \TestShr{5}{2}% + \TestShr{6}{3}% + \TestShr{7}{3}% + \TestShr{8}{4}% + \TestShr{9}{4}% + \TestShr{10}{5}% + \TestShr{11}{5}% + \TestShr{12}{6}% + \TestShr{13}{6}% + \TestShr{14}{7}% + \TestShr{15}{7}% + \TestShr{16}{8}% + \TestShr{17}{8}% + \TestShr{18}{9}% + \TestShr{19}{9}% + \TestShr{20}{10}% + \TestShr{21}{10}% + \TestShr{22}{11}% + \TestShr{11241}{5620}% + \TestShr{73054202}{36527101}% + \TestShr{2147483646}{1073741823}% +\end{qstest} + +\begin{qstest}{mul}{mul} + \TestMul{0}{0}{0}% + \TestMul{1}{0}{0}% + \TestMul{0}{1}{0}% + \TestMul{1}{1}{1}% + \TestMul{3}{1}{3}% + \TestMul{1}{-3}{-3}% + \TestMul{-4}{-5}{20}% + \TestMul{3}{7}{21}% + \TestMul{7}{3}{21}% + \TestMul{3}{-7}{-21}% + \TestMul{7}{-3}{-21}% + \TestMul{-3}{7}{-21}% + \TestMul{-7}{3}{-21}% + \TestMul{-3}{-7}{21}% + \TestMul{-7}{-3}{21}% + \TestMul{12}{11}{132}% + \TestMul{999}{333}{332667}% + \TestMul{1000}{4321}{4321000}% + \TestMul{12345}{173955}{2147474475}% + \TestMul{1073741823}{2}{2147483646}% + \TestMul{2}{1073741823}{2147483646}% + \TestMul{-1073741823}{2}{-2147483646}% + \TestMul{2}{-1073741823}{-2147483646}% + \TestMul{6706022400}{13}{87178291200}% +\end{qstest} + +\begin{qstest}{sqr}{sqr} + \TestSqr{0}{0}% + \TestSqr{1}{1}% + \TestSqr{2}{4}% + \TestSqr{3}{9}% + \TestSqr{4}{16}% + \TestSqr{9}{81}% + \TestSqr{10}{100}% + \TestSqr{46340}{2147395600}% + \TestSqr{-1}{1}% + \TestSqr{-2}{4}% + \TestSqr{-46340}{2147395600}% +\end{qstest} + +\begin{qstest}{fac}{fac} + \TestFac{0}{1}% + \TestFac{1}{1}% + \TestFac{2}{2}% + \TestFac{3}{2*3}% + \TestFac{4}{2*3*4}% + \TestFac{5}{2*3*4*5}% + \TestFac{6}{2*3*4*5*6}% + \TestFac{7}{2*3*4*5*6*7}% + \TestFac{8}{2*3*4*5*6*7*8}% + \TestFac{9}{2*3*4*5*6*7*8*9}% + \TestFac{10}{2*3*4*5*6*7*8*9*10}% + \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% + \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% + \TestFacBig{13}{6227020800}% + \TestFacBig{14}{87178291200}% + \TestFacBig{15}{1307674368000}% + \TestFacBig{16}{20922789888000}% + \TestFacBig{17}{355687428096000}% + \TestFacBig{18}{6402373705728000}% + \TestFacBig{19}{121645100408832000}% + \TestFacBig{20}{2432902008176640000}% + \TestFacBig{21}{51090942171709440000}% + \TestFacBig{22}{1124000727777607680000}% +\end{qstest} + +\begin{qstest}{pow}{pow} + \TestPow{-2}{0}{1}% + \TestPow{-1}{0}{1}% + \TestPow{0}{0}{1}% + \TestPow{1}{0}{1}% + \TestPow{2}{0}{1}% + \TestPow{3}{0}{1}% + \TestPow{-2}{1}{-2}% + \TestPow{-1}{1}{-1}% + \TestPow{1}{1}{1}% + \TestPow{2}{1}{2}% + \TestPow{3}{1}{3}% + \TestPow{-2}{2}{4}% + \TestPow{-1}{2}{1}% + \TestPow{0}{2}{0}% + \TestPow{1}{2}{1}% + \TestPow{2}{2}{4}% + \TestPow{3}{2}{9}% + \TestPow{0}{1}{0}% + \TestPow{1}{-2}{1}% + \TestPow{1}{-1}{1}% + \TestPow{-1}{-2}{1}% + \TestPow{-1}{-1}{-1}% + \TestPow{-1}{3}{-1}% + \TestPow{-1}{4}{1}% + \TestPow{-2}{-1}{0}% + \TestPow{-2}{-2}{0}% + \TestPow{2}{3}{8}% + \TestPow{2}{4}{16}% + \TestPow{2}{5}{32}% + \TestPow{2}{6}{64}% + \TestPow{2}{7}{128}% + \TestPow{2}{8}{256}% + \TestPow{2}{9}{512}% + \TestPow{2}{10}{1024}% + \TestPow{-2}{3}{-8}% + \TestPow{-2}{4}{16}% + \TestPow{-2}{5}{-32}% + \TestPow{-2}{6}{64}% + \TestPow{-2}{7}{-128}% + \TestPow{-2}{8}{256}% + \TestPow{-2}{9}{-512}% + \TestPow{-2}{10}{1024}% + \TestPow{3}{3}{27}% + \TestPow{3}{4}{81}% + \TestPow{3}{5}{243}% + \TestPow{-3}{3}{-27}% + \TestPow{-3}{4}{81}% + \TestPow{-3}{5}{-243}% + \TestPow{2}{30}{1073741824}% + \TestPow{-3}{19}{-1162261467}% + \TestPow{5}{13}{1220703125}% + \TestPow{-7}{11}{-1977326743}% +\end{qstest} + +\begin{qstest}{div}{div} + \TestDiv{1}{1}{1}% + \TestDiv{2}{1}{2}% + \TestDiv{-2}{1}{-2}% + \TestDiv{2}{-1}{-2}% + \TestDiv{-2}{-1}{2}% + \TestDiv{15}{2}{7}% + \TestDiv{-16}{2}{-8}% + \TestDiv{1}{2}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{-2}{3}{0}% + \TestDiv{2}{-3}{0}% + \TestDiv{-2}{-3}{0}% + \TestDiv{13}{3}{4}% + \TestDiv{-13}{-3}{4}% + \TestDiv{-13}{3}{-4}% + \TestDiv{-6}{5}{-1}% + \TestDiv{-5}{5}{-1}% + \TestDiv{-4}{5}{0}% + \TestDiv{-3}{5}{0}% + \TestDiv{-2}{5}{0}% + \TestDiv{-1}{5}{0}% + \TestDiv{0}{5}{0}% + \TestDiv{1}{5}{0}% + \TestDiv{2}{5}{0}% + \TestDiv{3}{5}{0}% + \TestDiv{4}{5}{0}% + \TestDiv{5}{5}{1}% + \TestDiv{6}{5}{1}% + \TestDiv{-5}{4}{-1}% + \TestDiv{-4}{4}{-1}% + \TestDiv{-3}{4}{0}% + \TestDiv{-2}{4}{0}% + \TestDiv{-1}{4}{0}% + \TestDiv{0}{4}{0}% + \TestDiv{1}{4}{0}% + \TestDiv{2}{4}{0}% + \TestDiv{3}{4}{0}% + \TestDiv{4}{4}{1}% + \TestDiv{5}{4}{1}% + \TestDiv{12345}{678}{18}% + \TestDiv{32372}{5952}{5}% + \TestDiv{284271294}{18162}{15651}% + \TestDiv{217652429}{12561}{17327}% + \TestDiv{462028434}{5439}{84947}% + \TestDiv{2147483647}{1000}{2147483}% + \TestDiv{2147483647}{-1000}{-2147483}% + \TestDiv{-2147483647}{1000}{-2147483}% + \TestDiv{-2147483647}{-1000}{2147483}% + \TestDiv{0}{3}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{3}{3}{1}% + \TestDiv{4}{3}{1}% + \TestDiv{5}{3}{1}% + \TestDiv{6}{3}{2}% + \TestDiv{7}{3}{2}% + \TestDiv{8}{3}{2}% + \TestDiv{9}{3}{3}% + \TestDiv{10}{3}{3}% + \TestDiv{11}{3}{3}% + \TestDiv{12}{3}{4}% + \TestDiv{13}{3}{4}% + \TestDiv{14}{3}{4}% + \TestDiv{15}{3}{5}% + \TestDiv{16}{3}{5}% + \TestDiv{17}{3}{5}% + \TestDiv{18}{3}{6}% + \TestDiv{19}{3}{6}% + \TestDiv{20}{3}{6}% + \TestDiv{21}{3}{7}% + \TestDiv{22}{3}{7}% + \TestDiv{23}{3}{7}% + \TestDiv{24}{3}{8}% + \TestDiv{25}{3}{8}% + \TestDiv{26}{3}{8}% + \TestDiv{27}{3}{9}% + \TestDiv{28}{3}{9}% + \TestDiv{29}{3}{9}% + \TestDiv{30}{3}{10}% + \TestDiv{31}{3}{10}% + \TestDivBig{17363436332507}{24702}{702916214}% +\end{qstest} + +\begin{qstest}{mod}{mod} + \TestMod{-6}{5}{4}% + \TestMod{-5}{5}{0}% + \TestMod{-4}{5}{1}% + \TestMod{-3}{5}{2}% + \TestMod{-2}{5}{3}% + \TestMod{-1}{5}{4}% + \TestMod{0}{5}{0}% + \TestMod{1}{5}{1}% + \TestMod{2}{5}{2}% + \TestMod{3}{5}{3}% + \TestMod{4}{5}{4}% + \TestMod{5}{5}{0}% + \TestMod{6}{5}{1}% + \TestMod{-5}{4}{3}% + \TestMod{-4}{4}{0}% + \TestMod{-3}{4}{1}% + \TestMod{-2}{4}{2}% + \TestMod{-1}{4}{3}% + \TestMod{0}{4}{0}% + \TestMod{1}{4}{1}% + \TestMod{2}{4}{2}% + \TestMod{3}{4}{3}% + \TestMod{4}{4}{0}% + \TestMod{5}{4}{1}% + \TestMod{-6}{-5}{-1}% + \TestMod{-5}{-5}{0}% + \TestMod{-4}{-5}{-4}% + \TestMod{-3}{-5}{-3}% + \TestMod{-2}{-5}{-2}% + \TestMod{-1}{-5}{-1}% + \TestMod{0}{-5}{0}% + \TestMod{1}{-5}{-4}% + \TestMod{2}{-5}{-3}% + \TestMod{3}{-5}{-2}% + \TestMod{4}{-5}{-1}% + \TestMod{5}{-5}{0}% + \TestMod{6}{-5}{-4}% + \TestMod{-5}{-4}{-1}% + \TestMod{-4}{-4}{0}% + \TestMod{-3}{-4}{-3}% + \TestMod{-2}{-4}{-2}% + \TestMod{-1}{-4}{-1}% + \TestMod{0}{-4}{0}% + \TestMod{1}{-4}{-3}% + \TestMod{2}{-4}{-2}% + \TestMod{3}{-4}{-1}% + \TestMod{4}{-4}{0}% + \TestMod{5}{-4}{-3}% + \TestMod{2147483647}{1000}{647}% + \TestMod{2147483647}{-1000}{-353}% + \TestMod{-2147483647}{1000}{353}% + \TestMod{-2147483647}{-1000}{-647}% + \TestMod{ 0 }{ 4 }{0}% + \TestMod{ 1 }{ 4 }{1}% + \TestMod{ -1 }{ 4 }{3}% + \TestMod{ 0 }{ -4 }{0}% + \TestMod{ 1 }{ -4 }{-3}% + \TestMod{ -1 }{ -4 }{-1}% + \TestMod{18362}{25}{12}% +\end{qstest} + +\newcommand*{\TestError}[2]{% + \begingroup + \expandafter\def\csname BigIntCalcError:#1\endcsname{}% + \Expect*{#2}{0}% + \expandafter\def\csname BigIntCalcError:#1\endcsname{ERROR}% + \Expect*{#2}{0ERROR}% + \endgroup +} +\begin{qstest}{error}{error} + \TestError{FacNegative}{\bigintcalcFac{-1}}% + \TestError{FacNegative}{\bigintcalcFac{-2147483647}}% + \TestError{DivisionByZero}{\bigintcalcPow{0}{-1}}% + \TestError{DivisionByZero}{\bigintcalcDiv{1}{0}}% + \TestError{DivisionByZero}{\bigintcalcMod{1}{0}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `bigintcalc-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test1.tex new file mode 100644 index 00000000000..c5baacfbc56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test1.tex @@ -0,0 +1,73 @@ +%% +%% This is file `bitset-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bitset.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bitset.dtx +%% and the derived files +%% bitset.sty, bitset.pdf, bitset.ins, bitset.drv, +%% bitset-test1.tex, bitset-test2.tex, bitset-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input bitset.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `bitset-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test2.tex new file mode 100644 index 00000000000..146141d3171 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test2.tex @@ -0,0 +1,1080 @@ +%% +%% This is file `bitset-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bitset.dtx (with options: `test2,etex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bitset.dtx +%% and the derived files +%% bitset.sty, bitset.pdf, bitset.ins, bitset.drv, +%% bitset-test1.tex, bitset-test2.tex, bitset-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\makeatletter +\chardef\BitSet@TestMode=1 % +\makeatother +\usepackage{bitset}[2007/09/28] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% +\fi +\let\orig@qstest\qstest +\let\orig@endqstest\endqstest +\def\qstest#1#2{% + \orig@qstest{#1}{#2}% + \setbox0\hbox\bgroup\begingroup\ignorespaces +} +\def\endqstest{% + \endgroup\egroup + \Expect*{\the\wd0}{0.0pt}% + \orig@endqstest +} +\newcounter{Test} + +\def\TestError#1#2{% + \begingroup + \setcounter{Test}{0}% + \sbox0{% + \def\@PackageError##1##2##3{% + \stepcounter{Test}% + \begingroup + \let\MessageBreak\relax + \Expect{##1}{bitset}% + \Expect*{##2}*{#1}% + \endgroup + }% + #2% + }% + \Expect*{\theTest}{1}% + \Expect*{\the\wd0}{0.0pt}% + \endgroup +} + +\def\TestErrorNegativeIndex#1#2{% + \TestError{Invalid negative index (#1)}{#2}% +} + +\def\TestGetterUndefined#1{% + \CheckUndef{dummy}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1{dummy}}{0}% +} + +\def\ExpectBitSet#1#2{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter + {\csname BS@#1\endcsname}*{#2}% +} +\def\Check#1#2{% + \ExpectBitSet{#1}{#2}% +} +\def\CheckUndef#1{% + \begingroup + \Expect*{% + \expandafter + \ifx\csname BS@#1\endcsname\relax true\else false\fi + }{true}% + \endgroup +} +\def\RevCheck#1#2{% + \ExpectBitSet{#1}{\Reverse#2!!}% +} +\def\Set#1#2{% + \expandafter\def\csname BS@#1\endcsname{#2}% +} +\def\RevSet#1#2{% + \expandafter\edef\csname BS@#1\endcsname{% + \Reverse#2!!% + }% +} +\def\Reverse#1#2!#3!{% + \ifx\\#2\\% + #1#3% + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + {\Reverse#2!#1#3!}% +} +\begin{qstest}{Let}{Let} + \CheckUndef{abc}% + \CheckUndef{xyz}% + \bitsetLet{xyz}{abc}% + \CheckUndef{abc}% + \Check{xyz}{0}% + \Set{abc}{1}% + \Check{abc}{1}% + \Check{xyz}{0}% + \bitsetLet{xyz}{abc}% + \Check{abc}{1}% + \Check{xyz}{1}% + \Set{xyz}{11}% + \Check{abc}{1}% + \Check{xyz}{11}% +\end{qstest} + +\begin{qstest}{Reset}{Reset} + \bitsetReset{xyz}% + \Check{xyz}{0}% + \bitsetReset{abc}% + \Check{abc}{0}% + \Set{abc}{10101}% + \bitsetReset{abc}% + \Check{abc}{0}% +\end{qstest} + +\begin{qstest}{Get/Query}{Get/Query} + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGet{dummy}{0}% + }{0}% + \begingroup + \expandafter\def\csname BitSetError:NegativeIndex\endcsname{}% + \Set{abc}{1}% + \Expect*{\bitsetQuery{abc}{-1}{true}{false}}{false}% + \endgroup + \def\Test#1#2#3{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{\bitsetGet{abc}{#2}}{#3}% + \Expect*{\bitsetQuery{abc}{#2}{true}{false}}% + *{\ifcase#3 false\or true\else error\fi}% + }% + \Test{1}{100}{0}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{11}{1}{1}% + \Test{111}{1}{1}% + \Test{101}{1}{0}% + \Test{101}{2}{1}% + \Test{10100110011}{10}{1}% +\end{qstest} + +\begin{qstest}{Size}{Size} + \TestGetterUndefined\bitsetSize + \def\Test#1#2{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{\bitsetSize{abc}}{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{00}{0}% + \Test{0000000}{0}% + \Test{10}{1}% + \Test{01}{2}% + \Test{11}{2}% + \Test{010}{2}% + \Test{011}{3}% + \Test{100110011}{9}% + \Test{0000011111000001111100000}{20}% + \Test{000000000000000000000000011111111111111111111}{45}% +\end{qstest} + +\begin{qstest}{Cardinality}{Cardinality} + \TestGetterUndefined\bitsetCardinality + \def\Test#1#2{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetCardinality{abc}% + }{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{00}{0}% + \Test{0000000}{0}% + \Test{10}{1}% + \Test{01}{1}% + \Test{11}{2}% + \Test{010}{1}% + \Test{011}{2}% + \Test{100110011}{5}% + \Test{0000011111000001111100000}{10}% + \Test{000000000000000000000000011111111111111111111}{20}% +\end{qstest} + +\begin{qstest}{NextClearBit/NextSetBit}{NextClearBit/NextSetBit} + \def\Test#1#2{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \TestOp{abc}{#1}% + }{#2}% + }% + \def\Clear{\let\TestOp\bitsetNextClearBit}% + \def\Set{\let\TestOp\bitsetNextSetBit}% + \begingroup + \catcode`\:=11 % + \bitsetSetBin{abc}{1}% + \Clear + \Test{-1}{1\BitSetError:NegativeIndex}% + \Set + \Test{-1}{0\BitSetError:NegativeIndex}% + \endgroup + \let\BS@abc\@undefined + \Clear + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{-1}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetReset{abc}% + \Clear + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{-1}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1}% + \Clear + \Test{0}{1}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{0}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{111000111000111000111}% + \Clear + \Test{0}{3}% + \Test{1}{3}% + \Test{2}{3}% + \Test{3}{3}% + \Test{4}{4}% + \Test{5}{5}% + \Test{6}{9}% + \Test{7}{9}% + \Test{8}{9}% + \Test{9}{9}% + \Test{10}{10}% + \Test{11}{11}% + \Test{12}{15}% + \Test{13}{15}% + \Test{14}{15}% + \Test{15}{15}% + \Test{16}{16}% + \Test{17}{17}% + \Test{18}{21}% + \Test{19}{21}% + \Test{20}{21}% + \Test{21}{21}% + \Test{22}{22}% + \Test{100}{100}% + \Set + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{3}{6}% + \Test{4}{6}% + \Test{5}{6}% + \Test{6}{6}% + \Test{7}{7}% + \Test{8}{8}% + \Test{9}{12}% + \Test{10}{12}% + \Test{11}{12}% + \Test{12}{12}% + \Test{13}{13}% + \Test{14}{14}% + \Test{15}{18}% + \Test{16}{18}% + \Test{17}{18}% + \Test{18}{18}% + \Test{19}{19}% + \Test{20}{20}% + \Test{21}{-1}% + \Test{22}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1111111}% + \Clear + \Test{6}{7}% + \Test{7}{7}% + \Test{8}{8}% + \Test{100}{100}% + \Set + \Test{6}{6}% + \Test{7}{-1}% + \Test{8}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{11111111}% + \Clear + \Test{7}{8}% + \Test{8}{8}% + \Test{9}{9}% + \Test{100}{100}% + \Set + \Test{7}{7}% + \Test{8}{-1}% + \Test{9}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{111111111}% + \Clear + \Test{8}{9}% + \Test{9}{9}% + \Test{10}{10}% + \Test{100}{100}% + \Set + \Test{8}{8}% + \Test{9}{-1}% + \Test{10}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1111111111}% + \Clear + \Test{9}{10}% + \Test{10}{10}% + \Test{11}{11}% + \Test{100}{100}% + \Set + \Test{9}{9}% + \Test{10}{-1}% + \Test{11}{-1}% + \Test{100}{-1}% +\end{qstest} + +\begin{qstest}{GetSetBitList}{GetSetBitList} + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetSetBitList{abc}% + }{}% + \def\Test#1#2{% + \bitsetSetBin{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetSetBitList{abc}% + }{#2}% + }% + \Test{0}{}% + \Test{1}{0}% + \Test{10}{1}% + \Test{11}{0,1}% + \Test{10110100}{2,4,5,7}% + \Test{101101001010011}{0,1,4,6,9,11,12,14}% +\end{qstest} + +\begin{qstest}{GetDec}{GetDec} + \TestGetterUndefined\bitsetGetDec + \def\Test#1#2{% + \RevSet{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetDec{abc}% + }{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{10}{2}% + \Test{11}{3}% + \Test{100}{4}% + \Test{101}{5}% + \Test{110}{6}% + \Test{111}{7}% + \Test{1000}{8}% + \Test{000111}{7}% + \Test{1111111111111111% + 111111111111111}{2147483647}% + \Test{0001111111111111111% + 111111111111111}{2147483647}% + \Test{1000000000000000% + 0000000000000000}{2147483648}% + \Test{1000000000000000% + 00000000000000000}{4294967296}% + \Test{0001000000000000000% + 00000000000000000}{4294967296}% + \Test{1100000000000000% + 00000000000000011}{6442450947}% +\end{qstest} + +\begin{qstest}{Clear}{Clear} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetClear{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetClear{abc}{2}% + \RevCheck{abc}{0}% + \TestErrorNegativeIndex{-1}{\bitsetClear{abc}{-1}}% + \RevCheck{abc}{0}% + \Test{0}{0}{0}% + \Test{1}{0}{0}% + \Test{111}{1}{101}% + \Test{111}{30}{111}% + \Test{0000111}{5}{0000111}% 111 would also be ok + \Test{10000111}{5}{10000111}% + \Test{1001001}{3}{1000001}% +\end{qstest} + +\begin{qstest}{Set}{Set} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetSet{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetSet{abc}{2}% + \RevCheck{abc}{100}% + \TestErrorNegativeIndex{-1}{\bitsetSet{abc}{-1}}% + \RevCheck{abc}{100}% + \Test{0}{0}{1}% + \Test{1}{0}{1}% + \Test{100}{1}{110}% + \Test{111}{1}{111}% + \Test{11}{1}{11}% + \Test{11}{2}{111}% + \Test{11}{3}{1011}% + \Test{111}{10}{10000000111}% + \Test{0000111}{5}{0100111}% 100111 would also be ok + \Test{10000111}{5}{10100111}% + \Test{1000001}{3}{1001001}% + \Test{1001001}{3}{1001001}% +\end{qstest} + +\begin{qstest}{Flip}{Flip} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetFlip{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetFlip{abc}{2}% + \RevCheck{abc}{100}% + \TestErrorNegativeIndex{-1}{\bitsetFlip{abc}{-1}}% + \RevCheck{abc}{100}% + \Test{0}{0}{1}% + \Test{1}{0}{0}% + \Test{0}{2}{100}% + \Test{100}{1}{110}% + \Test{111}{1}{101}% + \Test{11}{1}{1}% + \Test{11}{2}{111}% + \Test{11}{3}{1011}% + \Test{111}{10}{10000000111}% + \Test{0000111}{5}{0100111}% 100111 would also be ok + \Test{10000111}{5}{10100111}% + \Test{1000001}{3}{1001001}% + \Test{1001001}{3}{1000001}% + \Test{11111}{2}{11011}% +\end{qstest} + +\begin{qstest}{SetValue}{SetValue} + \def\Test#1#2{% + \TestError{Invalid bit value (#2) not in range 0..1}{% + \bitsetSetValue{abc}{#1}{#2}% + }% + }% + \Test{0}{-1}% + \Test{0}{2}% + \Test{0}{10}% + \def\Test#1#2#3{% + \let\BS@abc\@undefined + \bitsetSetValue{abc}{#1}{#2}% + \bitsetSetBin{result}{#3}% + \Expect*{\BS@abc}*{\BS@result}% + }% + \Test{0}{0}{0}% + \Test{0}{1}{1}% + \Test{1}{0}{0}% + \Test{1}{1}{10}% + \def\Test#1#2#3#4{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{result}{#4}% + \bitsetSetValue{abc}{#2}{#3}% + \Expect*{\BS@abc}*{\BS@result}% + }% + \Test{0}{0}{0}{0}% + \Test{0}{0}{0}{0}% + \Test{0}{0}{1}{1}% + \Test{0}{1}{0}{0}% + \Test{0}{1}{1}{10}% + \Test{1010}{2}{1}{1110}% + \Test{1010}{4}{1}{11010}% + \Test{1010}{6}{1}{1001010}% + \Test{1010}{1}{0}{1000}% + \Test{1010}{2}{0}{1010}% + \Test{1010}{3}{0}{10}% + \Test{1010}{4}{0}{1010}% + \Test{1010}{6}{0}{1010}% + \Test{1010}{2}{\csname iffalse\endcsname 0\else 1\fi}{1110}% + \Test{1010}{1}{\csname iffalse\endcsname 1\else 0\fi}{1000}% +\end{qstest} + +\begin{qstest}{IsDefined}{IsDefined} + \let\BS@abc\@undefined + \Expect*{\bitsetIsDefined{abc}{true}{false}}{false}% + \bitsetReset{abc}% + \Expect*{\bitsetIsDefined{abc}{true}{false}}{true}% +\end{qstest} + +\begin{qstest}{IsEmpty}{IsEmpty} + \let\BS@abc\@undefined + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{true}% + \bitsetReset{abc}% + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{true}% + \bitsetSet{abc}{1}% + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{false}% +\end{qstest} + +\begin{qstest}{Equals}{Equals} + \def\Test#1#2#3{% + \Expect*{\bitsetEquals{#1}{#2}{true}{false}}{#3}% + }% + \let\BS@abc\@undefined + \Test{abc}{abc}{true}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% + \bitsetReset{abc}% + \Test{abc}{abc}{true}% + \Test{abc}{foo}{false}% + \Test{foo}{abc}{false}% + \bitsetReset{foo}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% + \bitsetSet{abc}{4}% + \Test{abc}{foo}{false}% + \Test{foo}{abc}{false}% + \bitsetFlip{foo}{4}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% +\end{qstest} + +\begin{qstest}{Intersects}{Intersects} + \def\Test#1{% + \Expect*{\bitsetIntersects{abc}{foo}{true}{false}}{#1}% + }% + \let\BS@abc\@undefined + \let\BS@foo\@undefined + \Test{false}% + \Set{abc}{0}% + \Test{false}% + \Set{foo}{0}% + \Test{false}% + \let\BS@abc\@undefined + \Test{false}% + \Set{foo}{1}% + \Test{false}% + \Set{abc}{0}% + \Test{false}% + \Set{abc}{1}% + \Test{true}% + \let\BS@foo\@undefined + \Test{false}% + \Set{foo}{0}% + \Test{false}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{foo}{#2}% + \Expect*{\bitsetIntersects{abc}{foo}{true}{false}}{#3}% + }% + \Test{1010}{0101}{false}% + \Test{0}{10}{false}% + \Test{1}{11}{true}% + \Test{11}{1}{true}% + \Test{10}{1}{false}% +\end{qstest} + +\begin{qstest}{And/AndNot/Or/Xor}{And/AndNot/Or/Xor} + \def\@Test#1#2#3#4#5{% + \begingroup + #5% + \begingroup + \let\BS@foo\@undefined + \csname bitset#1\endcsname{abc}{foo}% + \CheckUndef{foo}% + \Check{abc}{#2}% + \endgroup + \begingroup + \bitsetReset{foo}% + \csname bitset#1\endcsname{abc}{foo}% + \Check{foo}{0}% + \Check{abc}{#3}% + \endgroup + \begingroup + \def\BS@foo{0101}% + \csname bitset#1\endcsname{abc}{foo}% + \Check{foo}{0101}% + \Check{abc}{#4}% + \endgroup + \endgroup + }% + \def\Test#1{% + \def\Op{#1}% + \Test@ + }% + \def\Test@#1#2#3#4#5#6#7#8#9{% + \@Test\Op{#1}{#2}{#3}{% + \let\BS@abc\@undefined + }% + \@Test\Op{#4}{#5}{#6}{% + \bitsetReset{abc}% + }% + \@Test\Op{#7}{#8}{#9}{% + \def\BS@abc{1001}% + }% + }% + \Test{And}% + {0}{0}{0}% + {0}{0}{0}% + {0}{0}{0001}% + \Test{AndNot}% + {0}{0}{0}% + {0}{0}{0}% + {1001}{1001}{1}% + \Test{Or}% + {0}{0}{0101}% + {0}{0}{0101}% + {1001}{1001}{1101}% + \Test{Xor}% + {0}{0}{0101}% + {0}{0}{0101}% + {1001}{1001}{11}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{foo}{#2}% + \csname bitset\Op\endcsname{abc}{foo}% + \RevCheck{foo}{#2}% + \RevCheck{abc}{#3}% + }% + \def\Op{And}% + \Test{1}{111}{1}% + \Test{111}{1}{1}% + \Test{10}{111}{10}% + \Test{111}{10}{10}% + \Test{111}{1000}{0}% + \Test{1000}{111}{0}% + \def\Op{AndNot}% + \Test{1010}{11}{1000}% + \Test{100}{100}{0}% + \Test{111}{1111}{0}% + \Test{100}{111}{0}% + \def\Op{Or}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{0}{1}{1}% + \Test{1}{1}{1}% + \Test{1000}{10}{1010}% + \Test{10}{1000}{1010}% + \def\Op{Xor}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{0}{1}{1}% + \Test{1}{1}{0}% + \Test{1000}{10}{1010}% + \Test{10}{1000}{1010}% + \Test {110011001100}% + {111000111000111}% + {111110100001011}% + \Test{111000111000111}% + {110011001100}% + {111110100001011}% +\end{qstest} + +\begin{qstest}{GetUndef}{GetUndef, GetBin, GetOct, GetHex} + \def\TestUndef#1#2{% + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \x{abc}{#1}% + }{#2}% + }% + \let\x\bitsetGetBin + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{00}% + \TestUndef{8}{00000000}% + \let\x\bitsetGetOct + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{0}% + \TestUndef{3}{0}% + \TestUndef{4}{00}% + \TestUndef{5}{00}% + \TestUndef{6}{00}% + \TestUndef{7}{000}% + \TestUndef{8}{000}% + \TestUndef{9}{000}% + \TestUndef{10}{0000}% + \let\x\bitsetGetHex + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{0}% + \TestUndef{3}{0}% + \TestUndef{4}{0}% + \TestUndef{5}{00}% + \TestUndef{6}{00}% + \TestUndef{7}{00}% + \TestUndef{8}{00}% + \TestUndef{9}{000}% + \TestUndef{10}{000}% + \TestUndef{12}{000}% + \TestUndef{13}{0000}% + \TestUndef{16}{0000}% + \TestUndef{17}{00000}% +\end{qstest} + +\begin{qstest}{SetBin}{SetBin} + \def\Test#1#2{% + \let\BS@abc\@undefined + \bitsetSetBin{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{1}{1}% + \Test{10}{01}% + \Test{11}{11}% + \Test{010}{01}% + \Test{011}{11}% + \Test{0010}{01}% + \Test{1010}{0101}% +\end{qstest} + +\begin{qstest}{SetOct}{SetOct} + \def\Test#1#2{% + \bitsetSetOct{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{001}{1}% + \Test{010}{0001}% + \Test{020}{00001}% + \Test{42}{010001}% + \Test{377}{11111111}% + \Test{0377}{11111111}% + \Test{76543210}{000100010110001101011111}% + \Test{ 0 7 0 7 1 }{100111000111}% +\end{qstest} + +\begin{qstest}{SetHex}{SetHex} + \def\Test#1#2{% + \bitsetSetHex{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{001}{1}% + \Test{010}{00001}% + \Test{020}{000001}% + \Test{42}{0100001}% + \Test{3F}{111111}% + \Test{03F}{111111}% + \Test{43210}{0000100001001100001}% + \Test{98765}{10100110111000011001}% + \Test{FEDCBA}{010111010011101101111111}% + \Test{ 0 F 0 F 1 }{1000111100001111}% +\end{qstest} + +\begin{qstest}{SetDec}{SetDec} + \def\Test#1#2{% + \bitsetSetDec{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{7}{111}% + \Test{8}{0001}% + \Test{001}{1}% + \Test{010}{0101}% + \Test{020}{00101}% + \Test{53}{101011}% + \Test{255}{11111111}% + \Test{256}{000000001}% + \Test{999999999}{111111111001001101011001110111}% + \Test{1000000000}{000000000101001101011001110111}% + \Test{4210987654}{01100001010010010111111101011111}% + \Test{2147483647}{1111111111111111111111111111111}% + \Test{2147483648}{00000000000000000000000000000001}% +\end{qstest} + +\begin{qstest}{GetBin}{GetBin} + \def\TestUndef#1#2{% + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetBin{abc}{#1}% + }{#2}% + }% + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{00}% + \TestUndef{8}{00000000}% + \def\Test#1#2{% + \bitsetSetBin{abc}{#2}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetBin{abc}{#1}% + }{#2}% + }% + \Test{-1}{0}% + \Test{0}{0}% + \Test{1}{0}% + \Test{1}{1}% + \Test{2}{01}% + \Test{2}{10}% + \Test{3}{010}% + \Test{2}{00}% + \Test{2}{01}% + \Test{8}{00101100}% + \Test{2}{10101}% + \Test{-100}{11011}% +\end{qstest} + +\begin{qstest}{GetOct}{GetOct} + \def\Test#1#2#3{% + \edef\x{\zap@space#1 \@empty}% + \edef\x{\noexpand\bitsetSetBin{abc}{\x}}% + \x + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetOct{abc}{#2}% + }{#3}% + }% + \Test{111 110 101 100 011 010 001 000}{0}{76543210}% + \Test{000 111}{0}{7}% + \Test{101 000}{-1}{50}% + \Test{111}{-1}{7}% + \Test{111}{0}{7}% + \Test{111}{1}{7}% + \Test{111}{3}{7}% + \Test{111}{4}{07}% + \Test{111}{6}{07}% + \Test{111}{7}{007}% + \Test{111 010}{6}{72}% + \Test{111 010}{7}{072}% + \Test{011 111}{0}{37}% + \Test{011 111}{6}{37}% + \Test{011 111}{7}{037}% + \Test{001 111}{0}{17}% + \Test{001 111}{6}{17}% + \Test{001 111}{7}{017}% +\end{qstest} + +\begin{qstest}{GetHex}{GetHex} + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetHex{abc}{#2}% + }{#3}% + }% + \Test{1111 1110 1101 1100 1011 1010 1001 1000}{0}{FEDCBA98}% + \Test{0111 0110 0101 0100 0011 0010 0001 0000}{0}{76543210}% + \Test{0000 1111}{0}{F}% + \Test{0101 0000}{-1}{50}% + \Test{1111}{-1}{F}% + \Test{1111}{0}{F}% + \Test{1111}{1}{F}% + \Test{1111}{4}{F}% + \Test{1111}{5}{0F}% + \Test{1111}{8}{0F}% + \Test{1111}{9}{00F}% + \Test{1111 0010}{8}{F2}% + \Test{1111 0010}{9}{0F2}% + \Test{0111 1111}{0}{7F}% + \Test{0111 1111}{8}{7F}% + \Test{0111 1111}{9}{07F}% + \Test{0011 1111}{0}{3F}% + \Test{0011 1111}{8}{3F}% + \Test{0011 1111}{9}{03F}% + \Test{0001 1111}{0}{1F}% + \Test{0001 1111}{8}{1F}% + \Test{0001 1111}{9}{01F}% +\end{qstest} + +\begin{qstest}{Range}{Range} + \TestError{% + Wrong index numbers in range [9..8]\MessageBreak% hash-ok + for clear/set/flip on bit set `abc'.\MessageBreak + The lower index exceeds the upper index.\MessageBreak + Canceling the operation as error recovery% + }{% + \bitsetSetRange{abc}{9}{8}% + }% + \def\TestErrorNegInd#1#2#3#4#5#6{% + \TestError{% + Negative index in range [#2..#3]\MessageBreak % hash-ok + for \string\bitset #1Range on bit set `abc'.\MessageBreak + Using [#4..#5] as error recovery% hash-ok + }{% + \csname bitset#1Range\endcsname{abc}{#2}{#3}% + \global\let\BS@global\BS@abc + }% + \Check{global}{#6}% + }% + \Set{abc}{111}% + \TestErrorNegInd{Clear}{-1}{0}{0}{0}{111}% + \TestErrorNegInd{Clear}{0}{-1}{0}{0}{111}% + \TestErrorNegInd{Clear}{-2}{2}{0}{2}{001}% + \bitsetReset{abc}% + \TestErrorNegInd{Set}{-1}{0}{0}{0}{0}% + \TestErrorNegInd{Set}{0}{-1}{0}{0}{0}% + \TestErrorNegInd{Set}{-2}{2}{0}{2}{11}% + \Set{abc}{101}% + \TestErrorNegInd{Flip}{-1}{0}{0}{0}{101}% + \TestErrorNegInd{Flip}{0}{-1}{0}{0}{101}% + \TestErrorNegInd{Flip}{-2}{2}{0}{2}{011}% + \def\Test#1#2#3#4{% + \bitsetSetBin{abc}{#1}% + \csname bitset\TestOp Range\endcsname{abc}{#2}{#3}% + \Expect*{\bitsetGetBin{abc}{0}}{#4}% + }% + \def\TestOp{Clear}% + \Test{0}{0}{1}{0}% + \Test{1111}{1}{2}{1101}% + \Test{1111}{1}{3}{1001}% + \Test{1111111100000000}{12}{14}{1100111100000000}% + \def\TestOp{Set}% + \Test{0}{0}{1}{1}% + \Test{1000}{1}{2}{1010}% + \Test{0}{1}{2}{10}% + \Test{1}{12}{15}{111000000000001}% + \Test{1111}{1}{3}{1111}% + \Test{1000000000000000}{12}{14}{1011000000000000}% + \def\TestOp{Flip}% + \Test{0}{0}{1}{1}% + \Test{1}{0}{1}{0}% + \Test{10101010}{1}{5}{10110100}% + \def\Test#1#2#3#4#5{% + \bitsetSetBin{abc}{#1}% + \bitsetSetValueRange{abc}{#2}{#3}{#4}% + \Expect*{\bitsetGetBin{abc}{0}}{#5}% + }% + \Test{0}{0}{1}{0}{0}% + \Test{0}{0}{1}{1}{1}% + \Test{1010}{1}{3}{0}{1000}% + \Test{1010}{1}{3}{1}{1110}% +\end{qstest} + +\begin{qstest}{ShiftLeft/ShiftRight}{ShiftLeft/ShiftRight} + \def\@Test#1#2{% + \let\BS@abc\@undefined + \csname bitsetShift#1\endcsname{abc}{#2}% + \Expect*{\BS@abc}{0}% + }% + \def\Test#1{% + \@Test{Left}{#1}% + \@Test{Right}{#1}% + }% + \Test{-16}% + \Test{-1}% + \Test{0}% + \Test{1}% + \Test{16}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{result}{#3}% + \csname bitsetShift\Op\endcsname{abc}{#2}% + \Expect*{\bitsetGetBin{abc}{0}}*{\bitsetGetBin{result}{0}}% + }% + \def\Op{Left}% + \Test{0}{0}{0}% + \Test{0}{1}{0}% + \Test{0}{-1}{0}% + \Test{1}{0}{1}% + \Test{1}{1}{10}% + \Test{1}{-1}{0}% + \Test{10}{1}{100}% + \Test{10}{-1}{1}% + \Test{1}{32}{100000000000000000000000000000000}% + \Test{1}{-100}{0}% + \def\Op{Right}% + \Test{0}{0}{0}% + \Test{0}{1}{0}% + \Test{0}{-1}{0}% + \Test{1}{0}{1}% + \Test{1}{1}{0}% + \Test{1}{-1}{10}% + \Test{10}{1}{1}% + \Test{10}{-1}{100}% + \Test{1}{-32}{100000000000000000000000000000000}% + \Test{1}{100}{0}% + \Test{110110110110110}{10}{11011}% + \Test{110110110110110}{100}{0}% + \Test{1}{100000}{0}% +\end{qstest} + +\begin{qstest}{Profile: Set}{Profile: Set} + \bitsetSet{abc}{4095}% + \global\let\BS@global\BS@abc +\end{qstest} + +\begin{qstest}{Profile: Get}{Profile: Get} + \edef\x{\bitsetGet{global}{4095}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `bitset-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test3.tex new file mode 100644 index 00000000000..a53c82704c8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/bitset-test3.tex @@ -0,0 +1,1098 @@ +%% +%% This is file `bitset-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bitset.dtx (with options: `test2,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 bitset.dtx +%% and the derived files +%% bitset.sty, bitset.pdf, bitset.ins, bitset.drv, +%% bitset-test1.tex, bitset-test2.tex, bitset-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\let\SavedNumexpr\numexpr +\let\SavedIfcsname\ifcsname +\let\SavedCurrentgrouplevel\currentgrouplevel +\def\ETeXDisable{% + \let\ifcsname\@undefined + \let\numexpr\@undefined + \let\currentgrouplevel\@undefined +} +\ETeXDisable +\makeatletter +\chardef\BitSet@TestMode=1 % +\makeatother +\usepackage{bitset}[2007/09/28] +\def\ETeXEnable{% + \let\numexpr\SavedNumexpr + \let\ifcsname\SavedIfcsname + \let\currentgrouplevel\SavedCurrentgrouplevel +} +\ETeXEnable +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% +\fi +\let\orig@qstest\qstest +\let\orig@endqstest\endqstest +\def\qstest#1#2{% + \orig@qstest{#1}{#2}% + \setbox0\hbox\bgroup\begingroup\ignorespaces +} +\def\endqstest{% + \endgroup\egroup + \Expect*{\the\wd0}{0.0pt}% + \orig@endqstest +} +\newcounter{Test} + +\def\TestError#1#2{% + \begingroup + \setcounter{Test}{0}% + \sbox0{% + \def\@PackageError##1##2##3{% + \stepcounter{Test}% + \begingroup + \let\MessageBreak\relax + \ETeXEnable + \Expect{##1}{bitset}% + \Expect*{##2}*{#1}% + \endgroup + }% + \ETeXDisable + #2% + }% + \Expect*{\theTest}{1}% + \Expect*{\the\wd0}{0.0pt}% + \endgroup +} + +\def\TestErrorNegativeIndex#1#2{% + \TestError{Invalid negative index (#1)}{#2}% +} + +\def\TestGetterUndefined#1{% + \CheckUndef{dummy}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1{dummy}}{0}% +} + +\def\ExpectBitSet#1#2{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter + {\csname BS@#1\endcsname}*{#2}% +} +\def\Check#1#2{% + \ExpectBitSet{#1}{#2}% +} +\def\CheckUndef#1{% + \begingroup + \Expect*{% + \expandafter + \ifx\csname BS@#1\endcsname\relax true\else false\fi + }{true}% + \endgroup +} +\def\RevCheck#1#2{% + \ExpectBitSet{#1}{\Reverse#2!!}% +} +\def\Set#1#2{% + \expandafter\def\csname BS@#1\endcsname{#2}% +} +\def\RevSet#1#2{% + \expandafter\edef\csname BS@#1\endcsname{% + \Reverse#2!!% + }% +} +\def\Reverse#1#2!#3!{% + \ifx\\#2\\% + #1#3% + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + {\Reverse#2!#1#3!}% +} +\begin{qstest}{Let}{Let} + \CheckUndef{abc}% + \CheckUndef{xyz}% + \bitsetLet{xyz}{abc}% + \CheckUndef{abc}% + \Check{xyz}{0}% + \Set{abc}{1}% + \Check{abc}{1}% + \Check{xyz}{0}% + \bitsetLet{xyz}{abc}% + \Check{abc}{1}% + \Check{xyz}{1}% + \Set{xyz}{11}% + \Check{abc}{1}% + \Check{xyz}{11}% +\end{qstest} + +\begin{qstest}{Reset}{Reset} + \bitsetReset{xyz}% + \Check{xyz}{0}% + \bitsetReset{abc}% + \Check{abc}{0}% + \Set{abc}{10101}% + \bitsetReset{abc}% + \Check{abc}{0}% +\end{qstest} + +\begin{qstest}{Get/Query}{Get/Query} + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGet{dummy}{0}% + }{0}% + \begingroup + \expandafter\def\csname BitSetError:NegativeIndex\endcsname{}% + \Set{abc}{1}% + \Expect*{\bitsetQuery{abc}{-1}{true}{false}}{false}% + \endgroup + \def\Test#1#2#3{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{\bitsetGet{abc}{#2}}{#3}% + \Expect*{\bitsetQuery{abc}{#2}{true}{false}}% + *{\ifcase#3 false\or true\else error\fi}% + }% + \Test{1}{100}{0}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{11}{1}{1}% + \Test{111}{1}{1}% + \Test{101}{1}{0}% + \Test{101}{2}{1}% + \Test{10100110011}{10}{1}% +\end{qstest} + +\begin{qstest}{Size}{Size} + \TestGetterUndefined\bitsetSize + \def\Test#1#2{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{\bitsetSize{abc}}{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{00}{0}% + \Test{0000000}{0}% + \Test{10}{1}% + \Test{01}{2}% + \Test{11}{2}% + \Test{010}{2}% + \Test{011}{3}% + \Test{100110011}{9}% + \Test{0000011111000001111100000}{20}% + \Test{000000000000000000000000011111111111111111111}{45}% +\end{qstest} + +\begin{qstest}{Cardinality}{Cardinality} + \TestGetterUndefined\bitsetCardinality + \def\Test#1#2{% + \Set{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetCardinality{abc}% + }{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{00}{0}% + \Test{0000000}{0}% + \Test{10}{1}% + \Test{01}{1}% + \Test{11}{2}% + \Test{010}{1}% + \Test{011}{2}% + \Test{100110011}{5}% + \Test{0000011111000001111100000}{10}% + \Test{000000000000000000000000011111111111111111111}{20}% +\end{qstest} + +\begin{qstest}{NextClearBit/NextSetBit}{NextClearBit/NextSetBit} + \def\Test#1#2{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \TestOp{abc}{#1}% + }{#2}% + }% + \def\Clear{\let\TestOp\bitsetNextClearBit}% + \def\Set{\let\TestOp\bitsetNextSetBit}% + \begingroup + \catcode`\:=11 % + \bitsetSetBin{abc}{1}% + \Clear + \Test{-1}{1\BitSetError:NegativeIndex}% + \Set + \Test{-1}{0\BitSetError:NegativeIndex}% + \endgroup + \let\BS@abc\@undefined + \Clear + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{-1}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetReset{abc}% + \Clear + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{-1}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1}% + \Clear + \Test{0}{1}% + \Test{1}{1}% + \Test{2}{2}% + \Test{100}{100}% + \Set + \Test{0}{0}% + \Test{1}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{111000111000111000111}% + \Clear + \Test{0}{3}% + \Test{1}{3}% + \Test{2}{3}% + \Test{3}{3}% + \Test{4}{4}% + \Test{5}{5}% + \Test{6}{9}% + \Test{7}{9}% + \Test{8}{9}% + \Test{9}{9}% + \Test{10}{10}% + \Test{11}{11}% + \Test{12}{15}% + \Test{13}{15}% + \Test{14}{15}% + \Test{15}{15}% + \Test{16}{16}% + \Test{17}{17}% + \Test{18}{21}% + \Test{19}{21}% + \Test{20}{21}% + \Test{21}{21}% + \Test{22}{22}% + \Test{100}{100}% + \Set + \Test{0}{0}% + \Test{1}{1}% + \Test{2}{2}% + \Test{3}{6}% + \Test{4}{6}% + \Test{5}{6}% + \Test{6}{6}% + \Test{7}{7}% + \Test{8}{8}% + \Test{9}{12}% + \Test{10}{12}% + \Test{11}{12}% + \Test{12}{12}% + \Test{13}{13}% + \Test{14}{14}% + \Test{15}{18}% + \Test{16}{18}% + \Test{17}{18}% + \Test{18}{18}% + \Test{19}{19}% + \Test{20}{20}% + \Test{21}{-1}% + \Test{22}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1111111}% + \Clear + \Test{6}{7}% + \Test{7}{7}% + \Test{8}{8}% + \Test{100}{100}% + \Set + \Test{6}{6}% + \Test{7}{-1}% + \Test{8}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{11111111}% + \Clear + \Test{7}{8}% + \Test{8}{8}% + \Test{9}{9}% + \Test{100}{100}% + \Set + \Test{7}{7}% + \Test{8}{-1}% + \Test{9}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{111111111}% + \Clear + \Test{8}{9}% + \Test{9}{9}% + \Test{10}{10}% + \Test{100}{100}% + \Set + \Test{8}{8}% + \Test{9}{-1}% + \Test{10}{-1}% + \Test{100}{-1}% + \bitsetSetBin{abc}{1111111111}% + \Clear + \Test{9}{10}% + \Test{10}{10}% + \Test{11}{11}% + \Test{100}{100}% + \Set + \Test{9}{9}% + \Test{10}{-1}% + \Test{11}{-1}% + \Test{100}{-1}% +\end{qstest} + +\begin{qstest}{GetSetBitList}{GetSetBitList} + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetSetBitList{abc}% + }{}% + \def\Test#1#2{% + \bitsetSetBin{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetSetBitList{abc}% + }{#2}% + }% + \Test{0}{}% + \Test{1}{0}% + \Test{10}{1}% + \Test{11}{0,1}% + \Test{10110100}{2,4,5,7}% + \Test{101101001010011}{0,1,4,6,9,11,12,14}% +\end{qstest} + +\begin{qstest}{GetDec}{GetDec} + \TestGetterUndefined\bitsetGetDec + \def\Test#1#2{% + \RevSet{abc}{#1}% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetDec{abc}% + }{#2}% + }% + \Test{0}{0}% + \Test{1}{1}% + \Test{10}{2}% + \Test{11}{3}% + \Test{100}{4}% + \Test{101}{5}% + \Test{110}{6}% + \Test{111}{7}% + \Test{1000}{8}% + \Test{000111}{7}% + \Test{1111111111111111% + 111111111111111}{2147483647}% + \Test{0001111111111111111% + 111111111111111}{2147483647}% + \Test{1000000000000000% + 0000000000000000}{2147483648}% + \Test{1000000000000000% + 00000000000000000}{4294967296}% + \Test{0001000000000000000% + 00000000000000000}{4294967296}% + \Test{1100000000000000% + 00000000000000011}{6442450947}% +\end{qstest} + +\begin{qstest}{Clear}{Clear} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetClear{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetClear{abc}{2}% + \RevCheck{abc}{0}% + \TestErrorNegativeIndex{-1}{\bitsetClear{abc}{-1}}% + \RevCheck{abc}{0}% + \Test{0}{0}{0}% + \Test{1}{0}{0}% + \Test{111}{1}{101}% + \Test{111}{30}{111}% + \Test{0000111}{5}{0000111}% 111 would also be ok + \Test{10000111}{5}{10000111}% + \Test{1001001}{3}{1000001}% +\end{qstest} + +\begin{qstest}{Set}{Set} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetSet{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetSet{abc}{2}% + \RevCheck{abc}{100}% + \TestErrorNegativeIndex{-1}{\bitsetSet{abc}{-1}}% + \RevCheck{abc}{100}% + \Test{0}{0}{1}% + \Test{1}{0}{1}% + \Test{100}{1}{110}% + \Test{111}{1}{111}% + \Test{11}{1}{11}% + \Test{11}{2}{111}% + \Test{11}{3}{1011}% + \Test{111}{10}{10000000111}% + \Test{0000111}{5}{0100111}% 100111 would also be ok + \Test{10000111}{5}{10100111}% + \Test{1000001}{3}{1001001}% + \Test{1001001}{3}{1001001}% +\end{qstest} + +\begin{qstest}{Flip}{Flip} + \def\Test#1#2#3{% + \RevSet{abc}{#1}% + \bitsetFlip{abc}{#2}% + \Expect*{\BS@abc}*{\Reverse#3!!}% + }% + \bitsetFlip{abc}{2}% + \RevCheck{abc}{100}% + \TestErrorNegativeIndex{-1}{\bitsetFlip{abc}{-1}}% + \RevCheck{abc}{100}% + \Test{0}{0}{1}% + \Test{1}{0}{0}% + \Test{0}{2}{100}% + \Test{100}{1}{110}% + \Test{111}{1}{101}% + \Test{11}{1}{1}% + \Test{11}{2}{111}% + \Test{11}{3}{1011}% + \Test{111}{10}{10000000111}% + \Test{0000111}{5}{0100111}% 100111 would also be ok + \Test{10000111}{5}{10100111}% + \Test{1000001}{3}{1001001}% + \Test{1001001}{3}{1000001}% + \Test{11111}{2}{11011}% +\end{qstest} + +\begin{qstest}{SetValue}{SetValue} + \def\Test#1#2{% + \TestError{Invalid bit value (#2) not in range 0..1}{% + \bitsetSetValue{abc}{#1}{#2}% + }% + }% + \Test{0}{-1}% + \Test{0}{2}% + \Test{0}{10}% + \def\Test#1#2#3{% + \let\BS@abc\@undefined + \bitsetSetValue{abc}{#1}{#2}% + \bitsetSetBin{result}{#3}% + \Expect*{\BS@abc}*{\BS@result}% + }% + \Test{0}{0}{0}% + \Test{0}{1}{1}% + \Test{1}{0}{0}% + \Test{1}{1}{10}% + \def\Test#1#2#3#4{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{result}{#4}% + \bitsetSetValue{abc}{#2}{#3}% + \Expect*{\BS@abc}*{\BS@result}% + }% + \Test{0}{0}{0}{0}% + \Test{0}{0}{0}{0}% + \Test{0}{0}{1}{1}% + \Test{0}{1}{0}{0}% + \Test{0}{1}{1}{10}% + \Test{1010}{2}{1}{1110}% + \Test{1010}{4}{1}{11010}% + \Test{1010}{6}{1}{1001010}% + \Test{1010}{1}{0}{1000}% + \Test{1010}{2}{0}{1010}% + \Test{1010}{3}{0}{10}% + \Test{1010}{4}{0}{1010}% + \Test{1010}{6}{0}{1010}% + \Test{1010}{2}{\csname iffalse\endcsname 0\else 1\fi}{1110}% + \Test{1010}{1}{\csname iffalse\endcsname 1\else 0\fi}{1000}% +\end{qstest} + +\begin{qstest}{IsDefined}{IsDefined} + \let\BS@abc\@undefined + \Expect*{\bitsetIsDefined{abc}{true}{false}}{false}% + \bitsetReset{abc}% + \Expect*{\bitsetIsDefined{abc}{true}{false}}{true}% +\end{qstest} + +\begin{qstest}{IsEmpty}{IsEmpty} + \let\BS@abc\@undefined + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{true}% + \bitsetReset{abc}% + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{true}% + \bitsetSet{abc}{1}% + \Expect*{\bitsetIsEmpty{abc}{true}{false}}{false}% +\end{qstest} + +\begin{qstest}{Equals}{Equals} + \def\Test#1#2#3{% + \Expect*{\bitsetEquals{#1}{#2}{true}{false}}{#3}% + }% + \let\BS@abc\@undefined + \Test{abc}{abc}{true}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% + \bitsetReset{abc}% + \Test{abc}{abc}{true}% + \Test{abc}{foo}{false}% + \Test{foo}{abc}{false}% + \bitsetReset{foo}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% + \bitsetSet{abc}{4}% + \Test{abc}{foo}{false}% + \Test{foo}{abc}{false}% + \bitsetFlip{foo}{4}% + \Test{abc}{foo}{true}% + \Test{foo}{abc}{true}% +\end{qstest} + +\begin{qstest}{Intersects}{Intersects} + \def\Test#1{% + \Expect*{\bitsetIntersects{abc}{foo}{true}{false}}{#1}% + }% + \let\BS@abc\@undefined + \let\BS@foo\@undefined + \Test{false}% + \Set{abc}{0}% + \Test{false}% + \Set{foo}{0}% + \Test{false}% + \let\BS@abc\@undefined + \Test{false}% + \Set{foo}{1}% + \Test{false}% + \Set{abc}{0}% + \Test{false}% + \Set{abc}{1}% + \Test{true}% + \let\BS@foo\@undefined + \Test{false}% + \Set{foo}{0}% + \Test{false}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{foo}{#2}% + \Expect*{\bitsetIntersects{abc}{foo}{true}{false}}{#3}% + }% + \Test{1010}{0101}{false}% + \Test{0}{10}{false}% + \Test{1}{11}{true}% + \Test{11}{1}{true}% + \Test{10}{1}{false}% +\end{qstest} + +\begin{qstest}{And/AndNot/Or/Xor}{And/AndNot/Or/Xor} + \def\@Test#1#2#3#4#5{% + \begingroup + #5% + \begingroup + \let\BS@foo\@undefined + \csname bitset#1\endcsname{abc}{foo}% + \CheckUndef{foo}% + \Check{abc}{#2}% + \endgroup + \begingroup + \bitsetReset{foo}% + \csname bitset#1\endcsname{abc}{foo}% + \Check{foo}{0}% + \Check{abc}{#3}% + \endgroup + \begingroup + \def\BS@foo{0101}% + \csname bitset#1\endcsname{abc}{foo}% + \Check{foo}{0101}% + \Check{abc}{#4}% + \endgroup + \endgroup + }% + \def\Test#1{% + \def\Op{#1}% + \Test@ + }% + \def\Test@#1#2#3#4#5#6#7#8#9{% + \@Test\Op{#1}{#2}{#3}{% + \let\BS@abc\@undefined + }% + \@Test\Op{#4}{#5}{#6}{% + \bitsetReset{abc}% + }% + \@Test\Op{#7}{#8}{#9}{% + \def\BS@abc{1001}% + }% + }% + \Test{And}% + {0}{0}{0}% + {0}{0}{0}% + {0}{0}{0001}% + \Test{AndNot}% + {0}{0}{0}% + {0}{0}{0}% + {1001}{1001}{1}% + \Test{Or}% + {0}{0}{0101}% + {0}{0}{0101}% + {1001}{1001}{1101}% + \Test{Xor}% + {0}{0}{0101}% + {0}{0}{0101}% + {1001}{1001}{11}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{foo}{#2}% + \csname bitset\Op\endcsname{abc}{foo}% + \RevCheck{foo}{#2}% + \RevCheck{abc}{#3}% + }% + \def\Op{And}% + \Test{1}{111}{1}% + \Test{111}{1}{1}% + \Test{10}{111}{10}% + \Test{111}{10}{10}% + \Test{111}{1000}{0}% + \Test{1000}{111}{0}% + \def\Op{AndNot}% + \Test{1010}{11}{1000}% + \Test{100}{100}{0}% + \Test{111}{1111}{0}% + \Test{100}{111}{0}% + \def\Op{Or}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{0}{1}{1}% + \Test{1}{1}{1}% + \Test{1000}{10}{1010}% + \Test{10}{1000}{1010}% + \def\Op{Xor}% + \Test{0}{0}{0}% + \Test{1}{0}{1}% + \Test{0}{1}{1}% + \Test{1}{1}{0}% + \Test{1000}{10}{1010}% + \Test{10}{1000}{1010}% + \Test {110011001100}% + {111000111000111}% + {111110100001011}% + \Test{111000111000111}% + {110011001100}% + {111110100001011}% +\end{qstest} + +\begin{qstest}{GetUndef}{GetUndef, GetBin, GetOct, GetHex} + \def\TestUndef#1#2{% + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \x{abc}{#1}% + }{#2}% + }% + \let\x\bitsetGetBin + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{00}% + \TestUndef{8}{00000000}% + \let\x\bitsetGetOct + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{0}% + \TestUndef{3}{0}% + \TestUndef{4}{00}% + \TestUndef{5}{00}% + \TestUndef{6}{00}% + \TestUndef{7}{000}% + \TestUndef{8}{000}% + \TestUndef{9}{000}% + \TestUndef{10}{0000}% + \let\x\bitsetGetHex + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{0}% + \TestUndef{3}{0}% + \TestUndef{4}{0}% + \TestUndef{5}{00}% + \TestUndef{6}{00}% + \TestUndef{7}{00}% + \TestUndef{8}{00}% + \TestUndef{9}{000}% + \TestUndef{10}{000}% + \TestUndef{12}{000}% + \TestUndef{13}{0000}% + \TestUndef{16}{0000}% + \TestUndef{17}{00000}% +\end{qstest} + +\begin{qstest}{SetBin}{SetBin} + \def\Test#1#2{% + \let\BS@abc\@undefined + \bitsetSetBin{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{1}{1}% + \Test{10}{01}% + \Test{11}{11}% + \Test{010}{01}% + \Test{011}{11}% + \Test{0010}{01}% + \Test{1010}{0101}% +\end{qstest} + +\begin{qstest}{SetOct}{SetOct} + \def\Test#1#2{% + \bitsetSetOct{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{001}{1}% + \Test{010}{0001}% + \Test{020}{00001}% + \Test{42}{010001}% + \Test{377}{11111111}% + \Test{0377}{11111111}% + \Test{76543210}{000100010110001101011111}% + \Test{ 0 7 0 7 1 }{100111000111}% +\end{qstest} + +\begin{qstest}{SetHex}{SetHex} + \def\Test#1#2{% + \bitsetSetHex{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{001}{1}% + \Test{010}{00001}% + \Test{020}{000001}% + \Test{42}{0100001}% + \Test{3F}{111111}% + \Test{03F}{111111}% + \Test{43210}{0000100001001100001}% + \Test{98765}{10100110111000011001}% + \Test{FEDCBA}{010111010011101101111111}% + \Test{ 0 F 0 F 1 }{1000111100001111}% +\end{qstest} + +\begin{qstest}{SetDec}{SetDec} + \def\Test#1#2{% + \bitsetSetDec{abc}{#1}% + \expandafter\Expect\expandafter{\BS@abc}{#2}% + }% + \Test{}{0}% + \Test{0}{0}% + \Test{000}{0}% + \Test{1}{1}% + \Test{7}{111}% + \Test{8}{0001}% + \Test{001}{1}% + \Test{010}{0101}% + \Test{020}{00101}% + \Test{53}{101011}% + \Test{255}{11111111}% + \Test{256}{000000001}% + \Test{999999999}{111111111001001101011001110111}% + \Test{1000000000}{000000000101001101011001110111}% + \Test{4210987654}{01100001010010010111111101011111}% + \Test{2147483647}{1111111111111111111111111111111}% + \Test{2147483648}{00000000000000000000000000000001}% +\end{qstest} + +\begin{qstest}{GetBin}{GetBin} + \def\TestUndef#1#2{% + \let\BS@abc\@undefined + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetBin{abc}{#1}% + }{#2}% + }% + \TestUndef{-1}{0}% + \TestUndef{0}{0}% + \TestUndef{1}{0}% + \TestUndef{2}{00}% + \TestUndef{8}{00000000}% + \def\Test#1#2{% + \bitsetSetBin{abc}{#2}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetBin{abc}{#1}% + }{#2}% + }% + \Test{-1}{0}% + \Test{0}{0}% + \Test{1}{0}% + \Test{1}{1}% + \Test{2}{01}% + \Test{2}{10}% + \Test{3}{010}% + \Test{2}{00}% + \Test{2}{01}% + \Test{8}{00101100}% + \Test{2}{10101}% + \Test{-100}{11011}% +\end{qstest} + +\begin{qstest}{GetOct}{GetOct} + \def\Test#1#2#3{% + \edef\x{\zap@space#1 \@empty}% + \edef\x{\noexpand\bitsetSetBin{abc}{\x}}% + \x + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetOct{abc}{#2}% + }{#3}% + }% + \Test{111 110 101 100 011 010 001 000}{0}{76543210}% + \Test{000 111}{0}{7}% + \Test{101 000}{-1}{50}% + \Test{111}{-1}{7}% + \Test{111}{0}{7}% + \Test{111}{1}{7}% + \Test{111}{3}{7}% + \Test{111}{4}{07}% + \Test{111}{6}{07}% + \Test{111}{7}{007}% + \Test{111 010}{6}{72}% + \Test{111 010}{7}{072}% + \Test{011 111}{0}{37}% + \Test{011 111}{6}{37}% + \Test{011 111}{7}{037}% + \Test{001 111}{0}{17}% + \Test{001 111}{6}{17}% + \Test{001 111}{7}{017}% +\end{qstest} + +\begin{qstest}{GetHex}{GetHex} + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{% + \bitsetGetHex{abc}{#2}% + }{#3}% + }% + \Test{1111 1110 1101 1100 1011 1010 1001 1000}{0}{FEDCBA98}% + \Test{0111 0110 0101 0100 0011 0010 0001 0000}{0}{76543210}% + \Test{0000 1111}{0}{F}% + \Test{0101 0000}{-1}{50}% + \Test{1111}{-1}{F}% + \Test{1111}{0}{F}% + \Test{1111}{1}{F}% + \Test{1111}{4}{F}% + \Test{1111}{5}{0F}% + \Test{1111}{8}{0F}% + \Test{1111}{9}{00F}% + \Test{1111 0010}{8}{F2}% + \Test{1111 0010}{9}{0F2}% + \Test{0111 1111}{0}{7F}% + \Test{0111 1111}{8}{7F}% + \Test{0111 1111}{9}{07F}% + \Test{0011 1111}{0}{3F}% + \Test{0011 1111}{8}{3F}% + \Test{0011 1111}{9}{03F}% + \Test{0001 1111}{0}{1F}% + \Test{0001 1111}{8}{1F}% + \Test{0001 1111}{9}{01F}% +\end{qstest} + +\begin{qstest}{Range}{Range} + \TestError{% + Wrong index numbers in range [9..8]\MessageBreak% hash-ok + for clear/set/flip on bit set `abc'.\MessageBreak + The lower index exceeds the upper index.\MessageBreak + Canceling the operation as error recovery% + }{% + \bitsetSetRange{abc}{9}{8}% + }% + \def\TestErrorNegInd#1#2#3#4#5#6{% + \TestError{% + Negative index in range [#2..#3]\MessageBreak % hash-ok + for \string\bitset #1Range on bit set `abc'.\MessageBreak + Using [#4..#5] as error recovery% hash-ok + }{% + \csname bitset#1Range\endcsname{abc}{#2}{#3}% + \global\let\BS@global\BS@abc + }% + \Check{global}{#6}% + }% + \Set{abc}{111}% + \TestErrorNegInd{Clear}{-1}{0}{0}{0}{111}% + \TestErrorNegInd{Clear}{0}{-1}{0}{0}{111}% + \TestErrorNegInd{Clear}{-2}{2}{0}{2}{001}% + \bitsetReset{abc}% + \TestErrorNegInd{Set}{-1}{0}{0}{0}{0}% + \TestErrorNegInd{Set}{0}{-1}{0}{0}{0}% + \TestErrorNegInd{Set}{-2}{2}{0}{2}{11}% + \Set{abc}{101}% + \TestErrorNegInd{Flip}{-1}{0}{0}{0}{101}% + \TestErrorNegInd{Flip}{0}{-1}{0}{0}{101}% + \TestErrorNegInd{Flip}{-2}{2}{0}{2}{011}% + \def\Test#1#2#3#4{% + \bitsetSetBin{abc}{#1}% + \csname bitset\TestOp Range\endcsname{abc}{#2}{#3}% + \Expect*{\bitsetGetBin{abc}{0}}{#4}% + }% + \def\TestOp{Clear}% + \Test{0}{0}{1}{0}% + \Test{1111}{1}{2}{1101}% + \Test{1111}{1}{3}{1001}% + \Test{1111111100000000}{12}{14}{1100111100000000}% + \def\TestOp{Set}% + \Test{0}{0}{1}{1}% + \Test{1000}{1}{2}{1010}% + \Test{0}{1}{2}{10}% + \Test{1}{12}{15}{111000000000001}% + \Test{1111}{1}{3}{1111}% + \Test{1000000000000000}{12}{14}{1011000000000000}% + \def\TestOp{Flip}% + \Test{0}{0}{1}{1}% + \Test{1}{0}{1}{0}% + \Test{10101010}{1}{5}{10110100}% + \def\Test#1#2#3#4#5{% + \bitsetSetBin{abc}{#1}% + \bitsetSetValueRange{abc}{#2}{#3}{#4}% + \Expect*{\bitsetGetBin{abc}{0}}{#5}% + }% + \Test{0}{0}{1}{0}{0}% + \Test{0}{0}{1}{1}{1}% + \Test{1010}{1}{3}{0}{1000}% + \Test{1010}{1}{3}{1}{1110}% +\end{qstest} + +\begin{qstest}{ShiftLeft/ShiftRight}{ShiftLeft/ShiftRight} + \def\@Test#1#2{% + \let\BS@abc\@undefined + \csname bitsetShift#1\endcsname{abc}{#2}% + \Expect*{\BS@abc}{0}% + }% + \def\Test#1{% + \@Test{Left}{#1}% + \@Test{Right}{#1}% + }% + \Test{-16}% + \Test{-1}% + \Test{0}% + \Test{1}% + \Test{16}% + \def\Test#1#2#3{% + \bitsetSetBin{abc}{#1}% + \bitsetSetBin{result}{#3}% + \csname bitsetShift\Op\endcsname{abc}{#2}% + \Expect*{\bitsetGetBin{abc}{0}}*{\bitsetGetBin{result}{0}}% + }% + \def\Op{Left}% + \Test{0}{0}{0}% + \Test{0}{1}{0}% + \Test{0}{-1}{0}% + \Test{1}{0}{1}% + \Test{1}{1}{10}% + \Test{1}{-1}{0}% + \Test{10}{1}{100}% + \Test{10}{-1}{1}% + \Test{1}{32}{100000000000000000000000000000000}% + \Test{1}{-100}{0}% + \def\Op{Right}% + \Test{0}{0}{0}% + \Test{0}{1}{0}% + \Test{0}{-1}{0}% + \Test{1}{0}{1}% + \Test{1}{1}{0}% + \Test{1}{-1}{10}% + \Test{10}{1}{1}% + \Test{10}{-1}{100}% + \Test{1}{-32}{100000000000000000000000000000000}% + \Test{1}{100}{0}% + \Test{110110110110110}{10}{11011}% + \Test{110110110110110}{100}{0}% + \Test{1}{100000}{0}% +\end{qstest} + +\begin{qstest}{Profile: Set}{Profile: Set} + \bitsetSet{abc}{4095}% + \global\let\BS@global\BS@abc +\end{qstest} + +\begin{qstest}{Profile: Get}{Profile: Get} + \edef\x{\bitsetGet{global}{4095}}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `bitset-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test1.tex new file mode 100644 index 00000000000..db2fbc18b9e --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `catchfile-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% catchfile.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 catchfile.dtx +%% and the derived files +%% catchfile.sty, catchfile.pdf, catchfile.ins, catchfile.drv, +%% catchfile-test1.tex, catchfile-test2.tex, +%% catchfile-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input catchfile.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `catchfile-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex new file mode 100644 index 00000000000..c3d195fb607 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test2.tex @@ -0,0 +1,56 @@ +%% +%% This is file `catchfile-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% catchfile.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 catchfile.dtx +%% and the derived files +%% catchfile.sty, catchfile.pdf, catchfile.ins, catchfile.drv, +%% catchfile-test1.tex, catchfile-test2.tex, +%% catchfile-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\listfiles +\documentclass{minimal} +\usepackage{catchfile}[2007/09/09] +\makeatletter +\def\mysetup{% + \let\do\@makeother + \dospecials +} +\makeatother +\begin{document} + +\CatchFileDef\contents{catchfile.sty}\mysetup +\typeout{\meaning\contents} + +\CatchFileEdef\contents{catchfile.sty}{% + \mysetup + \def\par{^^J}% + \obeylines +} +\typeout{\contents} +\end{document} +\endinput +%% +%% End of file `catchfile-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test3.tex new file mode 100644 index 00000000000..b5344616da6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/catchfile-test3.tex @@ -0,0 +1,56 @@ +%% +%% This is file `catchfile-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% catchfile.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 catchfile.dtx +%% and the derived files +%% catchfile.sty, catchfile.pdf, catchfile.ins, catchfile.drv, +%% catchfile-test1.tex, catchfile-test2.tex, +%% catchfile-test3.tex. +%% +\def\msg#{\immediate\write16} +\newlinechar=10 % +\input catchfile.sty\relax + +\def\mysetup{% + \def\do##1{% + \catcode`##1=12\relax + }% + \dospecials +} + +\CatchFileDef\contents{catchfile.sty}\mysetup +\msg{\meaning\contents} + +\CatchFileEdef\contents{catchfile.sty}{% + \mysetup + \def\par{^^J}% + \obeylines +} +\msg{\contents} + +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `catchfile-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test1.tex new file mode 100644 index 00000000000..97e77f68cd2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test1.tex @@ -0,0 +1,75 @@ +%% +%% This is file `embedfile-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% embedfile.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 embedfile.dtx +%% and the derived files +%% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, +%% dtx-attach.sty, embedfile-example-plain.tex, +%% embedfile-test1.tex, embedfile-test2.tex, +%% embedfile-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input embedfile.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `embedfile-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test2.tex new file mode 100644 index 00000000000..3ddfb6eaa83 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test2.tex @@ -0,0 +1,44 @@ +%% +%% This is file `embedfile-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% embedfile.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 embedfile.dtx +%% and the derived files +%% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, +%% dtx-attach.sty, embedfile-example-plain.tex, +%% embedfile-test1.tex, embedfile-test2.tex, +%% embedfile-test3.tex. +%% +\input embedfile.sty\relax +\embedfile[% + stringmethod=escape,% + mimetype=plain/text,% + desc={LaTeX docstrip source archive for package `embedfile'}% +]{embedfile.dtx} +\nopagenumbers +Test (plain-\TeX): {\tt embedfile.dtx} should be embedded.% +\embedfilefinish +\bye +\endinput +%% +%% End of file `embedfile-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test3.tex new file mode 100644 index 00000000000..b04fe415556 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/embedfile-test3.tex @@ -0,0 +1,43 @@ +%% +%% This is file `embedfile-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% embedfile.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 embedfile.dtx +%% and the derived files +%% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, +%% dtx-attach.sty, embedfile-example-plain.tex, +%% embedfile-test1.tex, embedfile-test2.tex, +%% embedfile-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\let\SavedJobname\jobname +\def\jobname{embedfile} +\RequirePackage{dtx-attach}[2007/09/09] +\let\jobname\SavedJobname +\documentclass{minimal} +\begin{document} + Test (\LaTeX): \texttt{embedfile.dtx} should be embedded.% +\end{document} +\endinput +%% +%% End of file `embedfile-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/engord-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/engord-test1.tex new file mode 100644 index 00000000000..329ce58e477 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/engord-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `engord-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% engord.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2000, 2003, 2006, 2007 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 engord.dtx +%% and the derived files +%% engord.sty, engord.pdf, engord.ins, engord.drv, +%% engord-test1.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input engord.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `engord-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/epstopdf-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/epstopdf-test1.tex new file mode 100644 index 00000000000..86f8a5979e4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/epstopdf-test1.tex @@ -0,0 +1,78 @@ +%% +%% This is file `epstopdf-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% epstopdf.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2006, 2007 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 epstopdf.dtx +%% and the derived files +%% epstopdf.sty, epstopdf.pdf, epstopdf.ins, epstopdf.drv, +%% epstopdf-test1.tex. +%% +\input miniltx.tex\relax +\def\Gin@driver{pdftex.def} +\input graphicx.sty\relax +\resetatcatcode +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input epstopdf.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `epstopdf-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test1.tex new file mode 100644 index 00000000000..6812abb9a5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `etexcmds-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% etexcmds.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 etexcmds.dtx +%% and the derived files +%% etexcmds.sty, etexcmds.pdf, etexcmds.ins, etexcmds.drv, +%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex, +%% etexcmds-test4.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input etexcmds.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `etexcmds-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test2.tex new file mode 100644 index 00000000000..02e5af69e34 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test2.tex @@ -0,0 +1,43 @@ +%% +%% This is file `etexcmds-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% etexcmds.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 etexcmds.dtx +%% and the derived files +%% etexcmds.sty, etexcmds.pdf, etexcmds.ins, etexcmds.drv, +%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex, +%% etexcmds-test4.tex. +%% +\immediate\write16{etexcmds-test2.tex: test file for plainTeX} +\input etexcmds.sty\relax +\catcode`\@=11 % +\edef\x{\string\unexpanded} +\edef\y{\meaning\etex@unexpanded} +\ifx\x\y +\else + \@PackageError{etexcmds-test2}{Test failed}\@ehc +\fi +\end +\endinput +%% +%% End of file `etexcmds-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test3.tex new file mode 100644 index 00000000000..da5c70f24ba --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test3.tex @@ -0,0 +1,44 @@ +%% +%% This is file `etexcmds-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% etexcmds.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 etexcmds.dtx +%% and the derived files +%% etexcmds.sty, etexcmds.pdf, etexcmds.ins, etexcmds.drv, +%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex, +%% etexcmds-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{etexcmds-test3.tex}[2007/09/09 v1.1 Test file for LaTeX] +\RequirePackage{etexcmds} +\makeatletter +\edef\x{\string\unexpanded} +\edef\y{\meaning\etex@unexpanded} +\ifx\x\y +\else + \@PackageError{etexcmds-test3}{Test failed}\@ehc +\fi +\stop +\endinput +%% +%% End of file `etexcmds-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test4.tex new file mode 100644 index 00000000000..d17a4c7dd95 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/etexcmds-test4.tex @@ -0,0 +1,53 @@ +%% +%% This is file `etexcmds-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% etexcmds.dtx (with options: `test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 etexcmds.dtx +%% and the derived files +%% etexcmds.sty, etexcmds.pdf, etexcmds.ins, etexcmds.drv, +%% etexcmds-test1.tex, etexcmds-test2.tex, etexcmds-test3.tex, +%% etexcmds-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{etexcmds-test4.tex}[2007/09/09 v1.1 Test file for LaTeX] +\documentclass{article} +\usepackage{m-pictex} +\usepackage{m-ch-de} +\usepackage{etexcmds} +\makeatletter +\ifetex@unexpanded + \edef\x{\string\unexpanded}% + \edef\y{\meaning\etex@unexpanded}% + \ifx\x\y + \else + \@PackageWarningNoLine{etexcmds-test4}{Test failed}% + \fi +\else + \@PackageWarningNoLine{etexcmds-test4}{% + Test failed because of ConTeXt% + }% +\fi +\stop +\endinput +%% +%% End of file `etexcmds-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test1.tex new file mode 100644 index 00000000000..4d8e64b1138 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test1.tex @@ -0,0 +1,75 @@ +%% +%% This is file `grfext-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% grfext.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 grfext.dtx +%% and the derived files +%% grfext.sty, grfext.pdf, grfext.ins, grfext.drv, +%% grfext-test1.tex, grfext-test2.tex. +%% +\input miniltx.tex\relax +\resetatcatcode +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input grfext.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `grfext-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test2.tex new file mode 100644 index 00000000000..514e0710c2d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/grfext-test2.tex @@ -0,0 +1,169 @@ +%% +%% This is file `grfext-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% grfext.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 grfext.dtx +%% and the derived files +%% grfext.sty, grfext.pdf, grfext.ins, grfext.drv, +%% grfext-test1.tex, grfext-test2.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\usepackage[pdftex]{graphics} +\usepackage{grfext}[2007/09/30] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\makeatletter +\let\orig@qstest\qstest +\let\orig@endqstest\endqstest +\def\qstest#1#2{% + \orig@qstest{#1}{#2}% + \setbox0\hbox\bgroup\begingroup\ignorespaces +} +\def\endqstest{% + \endgroup\egroup + \Expect*{\the\wd0}{0.0pt}% + \orig@endqstest +} +\def\Test{\@ifnextchar\bgroup\TestInitList\TestInitCmd}% +\def\TestInitList#1{% + \def\Gin@extensions{#1}% + \@Test +} +\def\TestInitCmd#1{% + \let\Gin@extensions#1\relax + \@Test +} +\def\@Test#1#2{% + \TestCmd{#1}% + \expandafter\Expect\expandafter*{\Gin@extensions}{#2}% +} +\begin{qstest}{AppendGraphicsExtensions}{AppendGraphicsExtensions} + \let\TestCmd\AppendGraphicsExtensions + \Test\@undefined{.test}{.test}% + \Test\relax{.test}{.test}% + \Test{}{.test}{.test}% + \Test{.foo}{.test}{.foo,.test}% + \Test{.foo,.bar}{.test}{.foo,.bar,.test}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.foo,.test}% + \Test{.test,.foo}{.test}{.foo,.test}% + \Test{.foo,.test,.bar}{.test}{.foo,.bar,.test}% + \Test{.foo}{.test,.bar}{.foo,.test,.bar}% + \Test{.foo}{.test,.foo}{.test,.foo}% + \Test{.foo}{ .test ,.bar , .x, .y }{.foo,.test,.bar,.x,.y}% + \def\TestCmd{\AppendGraphicsExtensions*}% + \Test\@undefined{.test}{}% + \Test\relax{.test}{}% + \Test{}{.test}{}% + \Test{.test}{.test}{.test}% + \Test{.foo}{.test}{.foo}% + \Test{.foo,.bar}{.test}{.foo,.bar}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.foo,.test}% + \Test{.test,.foo}{.test}{.test,.foo}% + \Test{.foo,.test,.bar}{.test}{.foo,.test,.bar}% + \Test{.foo}{.test,.bar}{.foo}% + \Test{.foo}{.test,.foo}{.foo}% + \DeclareGraphicsRule{.test}{test}{.test}{}% + \Test\@undefined{.test}{.test}% + \Test\relax{.test}{.test}% + \Test{}{.test}{.test}% + \Test{.foo}{.test}{.foo,.test}% + \Test{.foo,.bar}{.test}{.foo,.bar,.test}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.foo,.test}% + \Test{.test,.foo}{.test}{.foo,.test}% + \Test{.foo,.test,.bar}{.test}{.foo,.bar,.test}% + \Test{.foo}{.test,.bar}{.foo,.test}% + \Test{.foo}{.test,.foo}{.foo,.test}% + \DeclareGraphicsRule{.bar}{bar}{.bar}{}% + \Test{.foo}{.test,.bar}{.foo,.test,.bar}% + \Test{.bar}{.test,.bar}{.test,.bar}% + \Test{.bar}{.bar,.test}{.bar,.test}% +\end{qstest} +\begin{qstest}{PrependGraphicsExtensions}{PrependGraphicsExtensions} + \let\TestCmd\PrependGraphicsExtensions + \Test\@undefined{.test}{.test}% + \Test\relax{.test}{.test}% + \Test{}{.test}{.test}% + \Test{.foo}{.test}{.test,.foo}% + \Test{.foo,.bar}{.test}{.test,.foo,.bar}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.test,.foo}% + \Test{.test,.foo}{.test}{.test,.foo}% + \Test{.foo,.test,.bar}{.test}{.test,.foo,.bar}% + \Test{.foo}{.test,.bar}{.test,.bar,.foo}% + \Test{.foo}{.test,.foo}{.test,.foo}% + \Test{.foo}{ .test ,.bar , .x, .y }{.test,.bar,.x,.y,.foo}% + \def\TestCmd{\PrependGraphicsExtensions*}% + \Test\@undefined{.test}{}% + \Test\relax{.test}{}% + \Test{}{.test}{}% + \Test{.test}{.test}{.test}% + \Test{.foo}{.test}{.foo}% + \Test{.foo,.bar}{.test}{.foo,.bar}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.foo,.test}% + \Test{.test,.foo}{.test}{.test,.foo}% + \Test{.foo,.test,.bar}{.test}{.foo,.test,.bar}% + \DeclareGraphicsRule{.test}{test}{.test}{}% + \Test\@undefined{.test}{.test}% + \Test\relax{.test}{.test}% + \Test{}{.test}{.test}% + \Test{.foo}{.test}{.test,.foo}% + \Test{.foo,.bar}{.test}{.test,.foo,.bar}% + \Test{.test}{.test}{.test}% + \Test{.foo,.test}{.test}{.test,.foo}% + \Test{.test,.foo}{.test}{.test,.foo}% + \Test{.foo,.test,.bar}{.test}{.test,.foo,.bar}% + \Test{.foo}{.test,.bar}{.test,.foo}% + \Test{.foo}{.test,.foo}{.test,.foo}% + \DeclareGraphicsRule{.bar}{bar}{.bar}{}% + \Test{.foo}{.test,.bar}{.test,.bar,.foo}% + \Test{.bar}{.test,.bar}{.test,.bar}% + \Test{.bar}{.bar,.test}{.bar,.test}% +\end{qstest} +\begin{qstest}{RemoveGraphicsExtensions}{RemoveGraphicsExtensions} + \let\TestCmd\RemoveGraphicsExtensions + \Test\@undefined{.test}{}% + \Test\relax{.test}{}% + \Test{}{.test}{}% + \Test{.foo}{.test}{.foo}% + \Test{.foo,.bar}{.test}{.foo,.bar}% + \Test{.test}{.test}{}% + \Test{.foo,.test}{.test}{.foo}% + \Test{.test,.foo}{.test}{.foo}% + \Test{.foo,.test,.bar}{.test}{.foo,.bar}% + \Test{.test,.test}{.test}{}% + \Test{.foo,.test,.bar,.test,.test,.bar}{.test}{.foo,.bar,.bar}% + \Test{.foo,.test,.bar,.foo,.test,.bar}{.test,.bar}{.foo,.foo}% + \Test{.foo,.test,.bar,.foo,.test,.bar}{ .test , .bar }{.foo,.foo}% +\end{qstest} +\begin{document} +\end{document} +\endinput +%% +%% End of file `grfext-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test1.tex new file mode 100644 index 00000000000..cdfefea856c --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test1.tex @@ -0,0 +1,275 @@ +%% +%% This is file `hycolor-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hycolor.dtx (with options: `test,test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 hycolor.dtx +%% and the derived files +%% hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv, +%% hycolor-test1.tex, hycolor-test2.tex. +%% +\ProvidesFile{hycolor-test1.tex}[2007/04/11 test file 1] +\documentclass{article} + +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\makeatletter + +\newcommand*{\TestPackageName}{test-package} +\newcommand*{\TestOptionName}{test-option} + +\newcommand\Message{} +\def\Message#1#{\immediate\write16} + +\newcommand*{\ExpectError}[2]{% + \begingroup + \global\let\saved@errhelp\errhelp + \global\let\saved@errmessage\errmessage + \let\errhelp\@gobble + \def\errmessage##1{% + \xdef\@ExpectErrorMessage{##1}% + }% + \PackageError\TestPackageName{#1}\@ehc + \def\errhelp##1{% + \global\let\errhelp\saved@errhelp + }% + \global\let\@ResultErrorMessage\@empty + \def\errmessage##1{% + \xdef\@ResultErrorMessage{##1}% + \global\let\errmessage\saved@errmessage + % \Message{[ ##1}% + % \Message{] (ignored error)}% + % \Message{}% + }% + #2% + \endgroup + \Expect*{\@ResultErrorMessage}*{\@ExpectErrorMessage}% +} + +\usepackage{hycolor} +\begin{qstest}{NumNormalize}{num, normalize} + \def\test#1#2{% + \HyColor@NormalizeNum{#1}\cmd + \Expect*{\cmd}{#2}% + }% + \test{0}{0}% + \test{000}{0}% + \test{-1}{0}% + \test{ 0 }{0}% + \test{1.1}{1}% + \test{100}{1}% + \test{00100}{1}% + \test{99.99}{1}% + \test{0.0}{0}% + \test{00.00}{0}% + \test{0.}{0}% + \test{.0}{0}% + \test{0.1}{.1}% + \test{0.10}{.1}% + \test{0.1000}{.1}% + \test{.1000}{.1}% + \test{0.01}{.01}% + \test{0.01010}{.0101}% + \test{.0000000001}{.0000000001}% + \test{.9999999999}{.9999999999}% +\end{qstest} + +\begin{qstest}{BookmarkColor without xcolor}{bookmark, noxcolor} + \def\test#1#2{% + \HyColor@BookmarkColor{#1}\cmd\TestPackageName\TestOptionName + \Expect*{\cmd}{#2}% + }% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1 .1 .1}% + \test{}{}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \def\errortest[#1]#2{% + \ExpectError{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `\TestOptionName=[#1]{#2}'% hash-ok + }{% + \test{[#1]{#2}}{}% hash-ok + }% + }% + \errortest[cmyk]{1,0,0,0}% + \errortest[empty]{}% + \def\errortest#1{% + \ExpectError{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `\TestOptionName=#1'% + }{% + \test{#1}{}% + }% + }% +\end{qstest} +\begin{qstest}{X0134 without xcolor}{X0134, noxcolor} + \def\test#1#2{% + \HyColor@XZeroOneThreeFour{#1}\cmd\TestPackageName\TestOptionName + \Expect*{\cmd}{#2}% + }% + \test{[empty]{}}{}% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1}% + \test{[cmyk]{0,1,0,0}}{0 1 0 0}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \def\errortest[#1]#2{% + \ExpectError{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=[#1]{#2}'% hash-ok + }{% + \HyColor@XZeroOneThreeFour{[{#1}]{#2}}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest[Gray]{10}% + \errortest[cmy]{1,0,0}% + \def\errortest#1{% + \ExpectError{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=#1'% + }{% + \HyColor@XZeroOneThreeFour{#1}\cmd\TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest{yellow}% +\end{qstest} + +\begin{qstest}{HyperrefBorderColor without xcolor}% + {hyperef bordercolor, noxcolor}% + \def\test#1#2{% + \HyColor@HyperrefBorderColor{#1}\cmd\TestPackageName\TestOptionName + \Expect*{\cmd}{#2}% + }% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1 .1 .1}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \def\errortest[#1]#2{% + \ExpectError{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=[#1]{#2}'% hash-ok + }{% + \HyColor@HyperrefBorderColor{[{#1}]{#2}}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest[Gray]{10}% + \errortest[cmy]{1,0,0}% + \errortest[cmyk]{0,1,0,0}% + \def\errortest#1{% + \ExpectError{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=#1'% + }{% + \HyColor@HyperrefBorderColor{#1}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest{yellow}% +\end{qstest} +\usepackage{xcolor} +\definecolor[named]{MyGreen}{rgb}{0,0.7,0} +\definecolor{mygreen}{named}{MyGreen} +\begin{qstest}{BookmarkColor with xcolor}{bookmark, xcolor} + \def\test#1#2{% + \HyColor@BookmarkColor{#1}\cmd\PackageName\OptionName + \Expect*{\cmd}{#2}% + }% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1 .1 .1}% + \test{}{}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \test{[cmyk]{1,0,0,0}}{0 1 1}% + \test{red}{1 0 0}% + \test{cyan}{0 1 1}% + \test{red!40!blue}{.4 0 .6}% + \test{[Gray]{10}}{.66667 .66667 .66667}% + \test{[RGB]{100,200,50}}{.39217 .78432 .19609}% + \test{[wave]{363}}{.00316 0 .00316}% + \test{[wave]814}{.00797 0 0}% + \test{[HSB]{100,200,50}}{.03473 .20833 .12152}% + \test{[HTML]{A800FF}}{.65881 0 1}% + \test{[cmy]{.3,.5,.2}}{.7 .5 .8}% + \test{[cmyk]{.3,.5,.2,.1}}{.6 .4 .7}% + \test{[hsb]{.3,.5,.2}}{.12 .2 .1}% + \test{[Hsb]{120,.5,.2}}{.1 .2 .1}% + \test{[tHsb]{120,.5,.2}}{.2 .2 .1}% + \test{[named]{MyGreen}}{0 .7 0}% + \test{mygreen}{0 .7 0}% +\end{qstest} + +\begin{qstest}{HyperrefColor}{hyperref, color} + \def\test#1#2{% + \HyColor@HyperrefColor{#1}\cmd + \Expect*{\cmd}{#2}% + }% + \test{red}{red}% + \test{[rgb]{1,0,0}}{[{rgb}]{1,0,0}}% + \HyColor@HyperrefColor{}\cmd + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% +\end{qstest} +\begin{qstest}{X0134 with xcolor}{hyperref, X0134, xcolor} + \def\test#1#2{% + \HyColor@XZeroOneThreeFour{#1}\cmd\PackageName\OptionName + \Expect*{\cmd}{#2}% + }% + \test{[empty]{}}{}% + \test{[gray]{0.1}}{.1}% + \test{[rgb]{1,0.5,0.0}}{1 .5 0}% + \test{[cmyk]{0,1,0,0.5}}{0 1 0 .5}% + \test{[Gray]{10}}{.66667}% + \test{red}{1 0 0}% + \test{1 0 0}{1 0 0}% + \test{001.0 .23 0}{1 .23 0}% + \test{[named]{MyGreen}}{0 .7 0}% + \test{mygreen}{0 .7 0}% + \HyColor@XZeroOneThreeFour{}\cmd\PackageName\OptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% +\end{qstest} + +\begin{qstest}{FieldColor}{hyperref, field, FieldColor} + \def\test#1#2{% + \HyColor@FieldColor{#1}\cmd\PackageName\OptionName + \Expect*{\cmd}{#2}% + }% + \test{}{}% + \test{[gray]{0.7}}{.7 g}% + \test{[rgb]{1,0,0}}{1 0 0 rg}% + \test{[cmyk]{0,1,0,0}}{0 1 0 0 k}% + \test{[cmy]{.5,.4,.3}}{.5 .6 .7 rg}% +\end{qstest} +\begin{document} +\end{document} +\endinput +%% +%% End of file `hycolor-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test2.tex new file mode 100644 index 00000000000..f76c74d23e4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/hycolor-test2.tex @@ -0,0 +1,181 @@ +%% +%% This is file `hycolor-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hycolor.dtx (with options: `test,test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 hycolor.dtx +%% and the derived files +%% hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv, +%% hycolor-test1.tex, hycolor-test2.tex. +%% +\ProvidesFile{hycolor-test2.tex}[2007/04/11 test file 2] +\let\pdfmatch\relax +\documentclass{article} + +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\makeatletter + +\newcommand*{\TestPackageName}{test-package} +\newcommand*{\TestOptionName}{test-option} + +\newcommand\Message{} +\def\Message#1#{\immediate\write16} + +\newcommand*{\ExpectError}[2]{% + \begingroup + \global\let\saved@errhelp\errhelp + \global\let\saved@errmessage\errmessage + \let\errhelp\@gobble + \def\errmessage##1{% + \xdef\@ExpectErrorMessage{##1}% + }% + \PackageError\TestPackageName{#1}\@ehc + \def\errhelp##1{% + \global\let\errhelp\saved@errhelp + }% + \global\let\@ResultErrorMessage\@empty + \def\errmessage##1{% + \xdef\@ResultErrorMessage{##1}% + \global\let\errmessage\saved@errmessage + % \Message{[ ##1}% + % \Message{] (ignored error)}% + % \Message{}% + }% + #2% + \endgroup + \Expect*{\@ResultErrorMessage}*{\@ExpectErrorMessage}% +} + +\usepackage{hycolor} +\begin{qstest}{X0134 without xcolor}{X0134, noxcolor} + \def\test#1#2{% + \HyColor@XZeroOneThreeFour{#1}\cmd\TestPackageName\TestOptionName + \Expect*{\cmd}{#2}% + }% + \test{[empty]{}}{}% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1}% + \test{[cmyk]{0,1,0,0}}{0 1 0 0}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \def\errortest[#1]#2{% + \ExpectError{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=[#1]{#2}'% hash-ok + }{% + \HyColor@XZeroOneThreeFour{[{#1}]{#2}}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest[Gray]{10}% + \errortest[cmy]{1,0,0}% + \def\errortest#1{% + \ExpectError{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=#1'% + }{% + \HyColor@XZeroOneThreeFour{#1}\cmd\TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest{yellow}% +\end{qstest} + +\begin{qstest}{HyperrefBorderColor without xcolor}% + {hyperef bordercolor, noxcolor}% + \def\test#1#2{% + \HyColor@HyperrefBorderColor{#1}\cmd\TestPackageName\TestOptionName + \Expect*{\cmd}{#2}% + }% + \test{[rgb]{1,0,0}}{1 0 0}% + \test{[gray]{0.10}}{.1 .1 .1}% + \test{[rgb]{ 1 , 1 , 0 }}{1 1 0}% + \def\errortest[#1]#2{% + \ExpectError{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=[#1]{#2}'% hash-ok + }{% + \HyColor@HyperrefBorderColor{[{#1}]{#2}}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest[Gray]{10}% + \errortest[cmy]{1,0,0}% + \errortest[cmyk]{0,1,0,0}% + \def\errortest#1{% + \ExpectError{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=#1'% + }{% + \HyColor@HyperrefBorderColor{#1}\cmd + \TestPackageName\TestOptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% + }% + }% + \errortest{yellow}% +\end{qstest} +\usepackage{xcolor} +\definecolor[named]{MyGreen}{rgb}{0,0.7,0} +\definecolor{mygreen}{named}{MyGreen} +\begin{qstest}{X0134 with xcolor}{hyperref, X0134, xcolor} + \def\test#1#2{% + \HyColor@XZeroOneThreeFour{#1}\cmd\PackageName\OptionName + \Expect*{\cmd}{#2}% + }% + \test{[empty]{}}{}% + \test{[gray]{0.1}}{.1}% + \test{[rgb]{1,0.5,0.0}}{1 .5 0}% + \test{[cmyk]{0,1,0,0.5}}{0 1 0 .5}% + \test{[Gray]{10}}{.66667}% + \test{red}{1 0 0}% + \test{1 0 0}{1 0 0}% + \test{001.0 .23 0}{1 .23 0}% + \test{[named]{MyGreen}}{0 .7 0}% + \test{mygreen}{0 .7 0}% + \HyColor@XZeroOneThreeFour{}\cmd\PackageName\OptionName + \Expect{true}*{\ifx\cmd\relax true\else false\fi}% +\end{qstest} + +\begin{qstest}{FieldColor}{hyperref, field, FieldColor} + \def\test#1#2{% + \HyColor@FieldColor{#1}\cmd\PackageName\OptionName + \Expect*{\cmd}{#2}% + }% + \test{}{}% + \test{[gray]{0.7}}{.7 g}% + \test{[rgb]{1,0,0}}{1 0 0 rg}% + \test{[cmyk]{0,1,0,0}}{0 1 0 0 k}% + \test{[cmy]{.5,.4,.3}}{.5 .6 .7 rg}% +\end{qstest} +\begin{document} +\end{document} +\endinput +%% +%% End of file `hycolor-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test1.tex new file mode 100644 index 00000000000..19fe407c9f9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `iflang-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iflang.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 iflang.dtx +%% and the derived files +%% iflang.sty, iflang.pdf, iflang.ins, iflang.drv, +%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +%% iflang-test4.tex, iflang-test5.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input iflang.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `iflang-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test2.tex new file mode 100644 index 00000000000..6dc72d704eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test2.tex @@ -0,0 +1,107 @@ +%% +%% This is file `iflang-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iflang.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 iflang.dtx +%% and the derived files +%% iflang.sty, iflang.pdf, iflang.ins, iflang.drv, +%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +%% iflang-test4.tex, iflang-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\usepackage[english,naustrian,ngerman]{babel} +\usepackage{iflang} +\begin{document} +\begin{qstest}{IfLanguagePatterns}{language, pattern} + \def\test#1#2{% + \Expect*{\IfLanguagePatterns{#1}{true}{false}}{#2}% + }% + \test{ngerman}{true}% + \test{naustrian}{true}% + \test{english}{false}% + \test{foobar}{false}% +\end{qstest} +\begin{qstest}{IfLanguageName}{language, name} + \def\test#1#2{% + \Expect*{\IfLanguageName{#1}{true}{false}}{#2}% + }% + \test{ngerman}{true}% + \test{naustrian}{false}% + \selectlanguage{naustrian}% + \test{ngerman}{false}% + \test{naustrian}{true}% + \test{foobar}{false}% + % + \def\languagename{naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \edef\languagename{\string naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \makeatletter + \@onelevel@sanitize\languagename + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \def\xaustrian{naustrian}% + \def\xgerman{ngerman}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + % + \def\languagename{\xaustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + \test{\languagename}{true}% + \test{\languagename\space}{false}% + % + \def\languagename{\empty\xaustrian\empty}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\empty\xaustrian\empty}{true}% + \test{\empty\xgerman\empty}{false}% +\end{qstest} +\begin{qstest}{IfDefined}{defined} + \makeatletter + \let\foobar\relax + \Expect*{\IfLang@IfDefined{foobar}{true}{false}}{false}% + \Expect*{\ifx\foobar\relax true\else false\fi}{true}% + \let\foobar\UNDEFINED + \Expect*{\IfLang@IfDefined{foobar}{true}{false}}{false}% + \Expect*{\ifx\foobar\relax true\else false\fi}{false}% + \Expect*{\ifx\foobar\UNDEFINED true\else false\fi}{true}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `iflang-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test3.tex new file mode 100644 index 00000000000..667bd85afac --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test3.tex @@ -0,0 +1,108 @@ +%% +%% This is file `iflang-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iflang.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 iflang.dtx +%% and the derived files +%% iflang.sty, iflang.pdf, iflang.ins, iflang.drv, +%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +%% iflang-test4.tex, iflang-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\let\pdfstrcmp\relax +\nofiles +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\usepackage[english,naustrian,ngerman]{babel} +\usepackage{iflang} +\begin{document} +\begin{qstest}{IfLanguagePatterns}{language, pattern} + \def\test#1#2{% + \Expect*{\IfLanguagePatterns{#1}{true}{false}}{#2}% + }% + \test{ngerman}{true}% + \test{naustrian}{true}% + \test{english}{false}% + \test{foobar}{false}% +\end{qstest} +\begin{qstest}{IfLanguageName}{language, name} + \def\test#1#2{% + \Expect*{\IfLanguageName{#1}{true}{false}}{#2}% + }% + \test{ngerman}{true}% + \test{naustrian}{false}% + \selectlanguage{naustrian}% + \test{ngerman}{false}% + \test{naustrian}{true}% + \test{foobar}{false}% + % + \def\languagename{naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \edef\languagename{\string naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \makeatletter + \@onelevel@sanitize\languagename + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \def\xaustrian{naustrian}% + \def\xgerman{ngerman}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + % + \def\languagename{\xaustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + \test{\languagename}{true}% + \test{\languagename\space}{false}% + % + \def\languagename{\empty\xaustrian\empty}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\empty\xaustrian\empty}{true}% + \test{\empty\xgerman\empty}{false}% +\end{qstest} +\begin{qstest}{IfDefined}{defined} + \makeatletter + \let\foobar\relax + \Expect*{\IfLang@IfDefined{foobar}{true}{false}}{false}% + \Expect*{\ifx\foobar\relax true\else false\fi}{true}% + \let\foobar\UNDEFINED + \Expect*{\IfLang@IfDefined{foobar}{true}{false}}{false}% + \Expect*{\ifx\foobar\relax true\else false\fi}{false}% + \Expect*{\ifx\foobar\UNDEFINED true\else false\fi}{true}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `iflang-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test4.tex new file mode 100644 index 00000000000..b89af71f3dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test4.tex @@ -0,0 +1,66 @@ +%% +%% This is file `iflang-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iflang.dtx (with options: `test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 iflang.dtx +%% and the derived files +%% iflang.sty, iflang.pdf, iflang.ins, iflang.drv, +%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +%% iflang-test4.tex, iflang-test5.tex. +%% +%% Format `etex' based on `language.def' +\input iflang.sty +\catcode64=12 + +\def\TestGeneric#1#2#3{% + \begingroup + \edef\x{#1{#2}{true}{false}}% + \edef\y{#3}% + \ifx\x\y + \else + \errmessage{Failed test: \string#1{#2} <> #3}% + \fi + \endgroup +} +\def\TestPatterns{\TestGeneric\IfLanguagePatterns} +\def\TestName{\TestGeneric\IfLanguageName} + +\TestPatterns{USenglish}{true} +\TestPatterns{ngerman}{false} + +\TestName{USenglish}{true} +\TestName{ngerman}{false} + +\uselanguage{ngerman} + +\TestPatterns{USenglish}{false} +\TestPatterns{ngerman}{true} + +\TestName{USenglish}{false} +\TestName{ngerman}{true} + +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `iflang-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test5.tex new file mode 100644 index 00000000000..aa5d69fbdc4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/iflang-test5.tex @@ -0,0 +1,93 @@ +%% +%% This is file `iflang-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% iflang.dtx (with options: `test5') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 iflang.dtx +%% and the derived files +%% iflang.sty, iflang.pdf, iflang.ins, iflang.drv, +%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +%% iflang-test4.tex, iflang-test5.tex. +%% +%% Format `tex' (vanilla plain-TeX) +\let\ifcsname\UNDEFINED +\let\pdfstrcmp\UNDEFINED +\input iflang.sty +\catcode64=11 + +\def\TestDefined#1{% + \IfLang@IfDefined{foobar}{}{}% + \ifx\foobar#1% + \else + \errmessage{Failed test: \string\foobar <> \string#1}% + \fi +} +\let\foobar\relax +\TestDefined\relax +\let\foobar\UNDEFINED +\TestDefined\relax + +\def\strip@prefix#1>{} +\def\@onelevel@sanitize#1{% + \edef#1{\expandafter\strip@prefix\meaning#1}% +} +\def\TestCompare#1#2#3{% + \begingroup + \edef\x{% + \if\IfLang@StrEqual{#1}{#2}% + true% + \else + false% + \fi + }% + \def\expect{#3}% + \ifx\x\expect + \else + \def\a{#1}% + \@onelevel@sanitize\a + \def\b{#2}% + \@onelevel@sanitize\b + \errmessage{Failed test: `\a'='\b' <> \expect}% + \fi + \endgroup +} +\TestCompare{junk}{junk}{true} +\TestCompare{}{}{true} +\TestCompare{a}{b}{false} +\TestCompare{aa}{bb}{false} +\def\a{ax} +\def\b{bx} +\def\c{\a\b} +\def\d{\c\b} +\def\exch#1#2{#2#1} +\def\gobble#1{} +\TestCompare{\gobble a}{}{true} +\TestCompare{}{\gobble a}{true} +\TestCompare{a\exch xyb}{ayxb}{true} +\TestCompare{\c}{\c}{true} +\TestCompare{\d}{\c\b}{true} + +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `iflang-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/ifpdf-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/ifpdf-test1.tex new file mode 100644 index 00000000000..a34a9e296e8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/ifpdf-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `ifpdf-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ifpdf.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2005, 2006 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 ifpdf.dtx +%% and the derived files +%% ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv, +%% ifpdf-test1.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input ifpdf.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `ifpdf-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/ifvtex-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/ifvtex-test1.tex new file mode 100644 index 00000000000..3f8329bdbf5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/ifvtex-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `ifvtex-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ifvtex.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2006, 2007 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 ifvtex.dtx +%% and the derived files +%% ifvtex.sty, ifvtex.pdf, ifvtex.ins, ifvtex.drv, +%% ifvtex-test1.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input ifvtex.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `ifvtex-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test1.tex new file mode 100644 index 00000000000..39fe9a2f27f --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `infwarerr-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% infwarerr.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 infwarerr.dtx +%% and the derived files +%% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv, +%% infwarerr-test1.tex, infwarerr-test2.tex, +%% infwarerr-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input infwarerr.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `infwarerr-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test2.tex new file mode 100644 index 00000000000..e40eb3897ef --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test2.tex @@ -0,0 +1,214 @@ +%% +%% This is file `infwarerr-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% infwarerr.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 infwarerr.dtx +%% and the derived files +%% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv, +%% infwarerr-test1.tex, infwarerr-test2.tex, +%% infwarerr-test3.tex. +%% +\let\PackageInfo\relax +\input infwarerr.sty\relax +\let\OrgWrite\write +\chardef\WriteUnused=16 % +\def\msg#{\immediate\OrgWrite\WriteUnused} +\msg{File: infwarerr-test2.tex 2007/09/09 v1.2 Test file for plain-TeX} +\catcode64=11 % +\def\pkgname{PACKAGE} +\def\clsname{CLASS} +\def\msgtext{MESSAGE\MessageBreak SECOND LINE} +\def\hlptext{HELP\MessageBreak SECOND LINE} + +\let\OrgWrite\write +\let\OrgErrMessage\errmessage + +\def\write#1#{% + \@write{#1}% +} +\def\@write#1#2{% + \OrgWrite#1{#2}% + \xdef\WriteNum{\number#1}% + \xdef\WriteText{#2}% +} +\def\TestFailed#1#2{% + \OrgErrMessage{Test (\string#1) failed: #2}% +} +\def\TestWrite#1#2#3{% + \ifnum\WriteNum=#2\relax + \else + \TestFailed#1{write stream number: \WriteNum <> #2}% + \fi + \begingroup + \let~\space + \edef\TestString{#3}% + \ifx\WriteText\TestString + \else + \msg{}% + \msg{[\WriteText]}% + \msg{<>}% + \msg{[#3]}% hash-ok + \TestFailed#1{write text}% + \fi + \endgroup +} +\newtoks\ErrHelpToks +\def\errmessage#1{% + \global\ErrHelpToks=\expandafter{\the\errhelp}% + \msg{**************** error message ****************}% + \msg{! #1}% + \msg{**************** help message *****************}% + \msg{\the\errhelp}% + \msg{***********************************************}% + \xdef\ErrMessage{! #1}% +} +\def\TestInfo{% + \@PackageInfo\pkgname\msgtext + \TestWrite\@PackageInfo{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@PackageInfoNoLine\pkgname\msgtext + \TestWrite\@PackageInfoNoLine{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE.% + }% + \@ClassInfo\clsname\msgtext + \TestWrite\@ClassInfo{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@ClassInfoNoLine\clsname\msgtext + \TestWrite\@ClassInfoNoLine{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE.% + }% +} +\def\TestWarning{% + \@PackageWarning\pkgname\msgtext + \TestWrite\@PackageWarning\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@PackageWarningNoLine\pkgname\msgtext + \TestWrite\@PackageWarningNoLine\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% + \@ClassWarning\clsname\msgtext + \TestWrite\@ClassWarning\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@ClassWarningNoLine\clsname\msgtext + \TestWrite\@ClassWarningNoLine\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% +} +\def\TestError{% + \def\plaindots{.^^J ...^^J} + \@PackageError\pkgname\msgtext\hlptext + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + HELP^^J% + SECOND LINE% + }% + \@ClassError\clsname\msgtext\hlptext + \@TestError\@ClassError{% + ! Class CLASS Error: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the CLASS class documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + HELP^^J% + SECOND LINE% + }% + \@PackageError\pkgname\msgtext\@ehc + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% + \@PackageError\pkgname\msgtext\@ehd + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + You're in trouble here.~~Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% +} +\def\@TestError#1#2#3{% + \begingroup + \let~\space + \edef\x{#2}% + \ifx\x\ErrMessage + \else + \msg{}% + \msg{[\ErrMessage]}% + \msg{<>}% + \msg{[\x]}% + \TestFailed#1{errmessage text}% + \fi + \edef\x{\the\ErrHelpToks}% + \edef\y{#3}% + \ifx\x\y + \else + \msg{}% + \msg{[\the\ErrHelpToks]}% + \msg{<>}% + \msg{[\y]}% + \TestFailed#1{errhelp text}% + \fi + \endgroup +} +\TestInfo +\TestWarning +\TestError +\end +\endinput +%% +%% End of file `infwarerr-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test3.tex new file mode 100644 index 00000000000..4159934123d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/infwarerr-test3.tex @@ -0,0 +1,217 @@ +%% +%% This is file `infwarerr-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% infwarerr.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 infwarerr.dtx +%% and the derived files +%% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv, +%% infwarerr-test1.tex, infwarerr-test2.tex, +%% infwarerr-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{infwarerr-test3.tex}[2007/09/09 v1.2 Test file for LaTeX] +\RequirePackage{infwarerr}[2007/09/09] +\makeatletter +\let\OrgWrite\write +\chardef\WriteUnused=\@unused +\def\msg#{\immediate\OrgWrite\WriteUnused} +\def\pkgname{PACKAGE} +\def\clsname{CLASS} +\def\msgtext{MESSAGE\MessageBreak SECOND LINE} +\def\hlptext{HELP\MessageBreak SECOND LINE} + +\let\OrgWrite\write +\let\OrgErrMessage\errmessage + +\def\write#1#{% + \@write{#1}% +} +\def\@write#1#2{% + \OrgWrite#1{#2}% + \xdef\WriteNum{\number#1}% + \xdef\WriteText{#2}% +} +\def\TestFailed#1#2{% + \OrgErrMessage{Test (\string#1) failed: #2}% +} +\def\TestWrite#1#2#3{% + \ifnum\WriteNum=#2\relax + \else + \TestFailed#1{write stream number: \WriteNum <> #2}% + \fi + \begingroup + \let~\space + \edef\TestString{#3}% + \ifx\WriteText\TestString + \else + \msg{}% + \msg{[\WriteText]}% + \msg{<>}% + \msg{[#3]}% hash-ok + \TestFailed#1{write text}% + \fi + \endgroup +} +\newtoks\ErrHelpToks +\def\errmessage#1{% + \global\ErrHelpToks=\expandafter{\the\errhelp}% + \msg{**************** error message ****************}% + \msg{! #1}% + \msg{**************** help message *****************}% + \msg{\the\errhelp}% + \msg{***********************************************}% + \xdef\ErrMessage{! #1}% +} +\def\TestInfo{% + \@PackageInfo\pkgname\msgtext + \TestWrite\@PackageInfo{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@PackageInfoNoLine\pkgname\msgtext + \TestWrite\@PackageInfoNoLine{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE.% + }% + \@ClassInfo\clsname\msgtext + \TestWrite\@ClassInfo{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@ClassInfoNoLine\clsname\msgtext + \TestWrite\@ClassInfoNoLine{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE.% + }% +} +\def\TestWarning{% + \@PackageWarning\pkgname\msgtext + \TestWrite\@PackageWarning\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@PackageWarningNoLine\pkgname\msgtext + \TestWrite\@PackageWarningNoLine\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% + \@ClassWarning\clsname\msgtext + \TestWrite\@ClassWarning\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@ClassWarningNoLine\clsname\msgtext + \TestWrite\@ClassWarningNoLine\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% +} +\def\TestError{% + \let\write\OrgWrite + \def\plaindots{} + \@PackageError\pkgname\msgtext\hlptext + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + HELP^^J% + SECOND LINE% + }% + \@ClassError\clsname\msgtext\hlptext + \@TestError\@ClassError{% + ! Class CLASS Error: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the CLASS class documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + HELP^^J% + SECOND LINE% + }% + \@PackageError\pkgname\msgtext\@ehc + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% + \@PackageError\pkgname\msgtext\@ehd + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help\plaindots + }{% + You're in trouble here.~~Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% +} +\def\@TestError#1#2#3{% + \begingroup + \let~\space + \edef\x{#2}% + \@onelevel@sanitize\x + \@onelevel@sanitize\ErrMessage + \ifx\x\ErrMessage + \else + \msg{}% + \msg{[\ErrMessage]}% + \msg{<>}% + \msg{[\x]}% + \TestFailed#1{errmessage text}% + \fi + \edef\x{\the\ErrHelpToks}% + \edef\y{#3}% + \ifx\x\y + \else + \msg{}% + \msg{[\the\ErrHelpToks]}% + \msg{<>}% + \msg{[\y]}% + \TestFailed#1{errhelp text}% + \fi + \endgroup +} +\TestInfo +\TestWarning +\TestError +\@@end +\endinput +%% +%% End of file `infwarerr-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test1.tex new file mode 100644 index 00000000000..06bf9e08db3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test1.tex @@ -0,0 +1,76 @@ +%% +%% This is file `intcalc-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% intcalc.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 intcalc.dtx +%% and the derived files +%% intcalc.sty, intcalc.pdf, intcalc.ins, intcalc.drv, +%% intcalc-test1.tex, intcalc-test2.tex, intcalc-test3.tex, +%% intcalc-test4.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input intcalc.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end + + +\endinput +%% +%% End of file `intcalc-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test2.tex new file mode 100644 index 00000000000..8242acd1ee7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test2.tex @@ -0,0 +1,755 @@ +%% +%% This is file `intcalc-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% intcalc.dtx (with options: `test2,etex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 intcalc.dtx +%% and the derived files +%% intcalc.sty, intcalc.pdf, intcalc.ins, intcalc.drv, +%% intcalc-test1.tex, intcalc-test2.tex, intcalc-test3.tex, +%% intcalc-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\chardef\InCa@TestMode=1 % +\makeatother +\usepackage{intcalc}[2007/09/27] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newcommand*{\TestSpaceAtEnd}[1]{% + \edef\resultA{#1}% + \edef\resultB{#1 }% + \Expect*{\resultA\space}*{\resultB}% +} +\newcommand*{\TestResult}[2]{% + \edef\result{#1}% + \Expect*{\result}{#2}% +} +\newcommand*{\TestResultTwoExpansions}[2]{% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1}{#2}% +} +\newcount\TestCount +\newcommand*{\TestArg}[1]{\numexpr#1\relax} +\newcommand*{\TestTeXDivide}[2]{% + \TestCount=\TestArg{#1}\relax + \divide\TestCount by \TestArg{#2}\relax + \Expect*{\intcalcDiv{#1}{#2}}*{\the\TestCount}% +} +\newcommand*{\Test}[2]{% + \TestResult{#1}{#2}% + \TestResultTwoExpansions{#1}{#2}% + \TestSpaceAtEnd{#1}% +} +\newcommand*{\TestExch}[2]{\Test{#2}{#1}} +\newcommand*{\TestInv}[2]{% + \Test{\intcalcInv{#1}}{#2}% +} +\newcommand*{\TestNum}[2]{% + \Test{\intcalcNum{#1}}{#2}% +} +\newcommand*{\TestAbs}[2]{% + \Test{\intcalcAbs{#1}}{#2}% +} +\newcommand*{\TestSgn}[2]{% + \Test{\intcalcSgn{#1}}{#2}% +} +\newcommand*{\TestMin}[3]{% + \Test{\intcalcMin{#1}{#2}}{#3}% +} +\newcommand*{\TestMax}[3]{% + \Test{\intcalcMax{#1}{#2}}{#3}% +} +\newcommand*{\TestCmp}[3]{% + \Test{\intcalcCmp{#1}{#2}}{#3}% +} +\newcommand*{\TestInc}[2]{% + \Test{\intcalcInc{#1}}{#2}% + \ifnum\intcalcNum{#1}>-1 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcInc\intcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestDec}[2]{% + \Test{\intcalcDec{#1}}{#2}% + \ifnum\intcalcNum{#1}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcDec\intcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestAdd}[3]{% + \Test{\intcalcAdd{#1}{#2}}{#3}% + \ifnum\intcalcNum{#1}>0 % + \ifnum\intcalcNum{#2}> 0 % + \ifnum\intcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcAdd + \intcalcNum{#1}!\intcalcNum{#2}!% + }{#3}% + }% + \x + \else + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcAdd + \intcalcNum{#2}!\intcalcNum{#1}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestSub}[3]{% + \Test{\intcalcSub{#1}{#2}}{#3}% + \ifnum\intcalcNum{#1}>0 % + \ifnum\intcalcNum{#2}> 0 % + \ifnum\intcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcSub + \intcalcNum{#1}!\intcalcNum{#2}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestShl}[2]{% + \Test{\intcalcShl{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcShl\intcalcAbs{#1}!% + }{\intcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestShr}[2]{% + \Test{\intcalcShr{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcShr\intcalcAbs{#1}!% + }{\intcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestMul}[3]{% + \Test{\intcalcMul{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcMul\intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% + \x +} +\newcommand*{\TestSqr}[2]{% + \Test{\intcalcSqr{#1}}{#2}% +} +\newcommand*{\TestFac}[2]{% + \expandafter\TestExch\expandafter{\the\numexpr#2}{\intcalcFac{#1}}% +} +\newcommand*{\TestPow}[3]{% + \Test{\intcalcPow{#1}{#2}}{#3}% +} +\newcommand*{\TestDiv}[3]{% + \Test{\intcalcDiv{#1}{#2}}{#3}% + \TestTeXDivide{#1}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcDiv\intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% +} +\newcommand*{\TestMod}[3]{% + \Test{\intcalcMod{#1}{#2}}{#3}% + \ifcase\ifcase\intcalcSgn{#1} 0% + \or + \ifcase\intcalcSgn{#2} 1% + \or 0% + \else 1% + \fi + \else + \ifcase\intcalcSgn{#2} 1% + \or 1% + \else 0% + \fi + \fi\relax + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcMod + \intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% + \x + \fi +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter + +\begin{qstest}{num}{num}% + \TestNum{0}{0}% + \TestNum{1}{1}% + \TestNum{-1}{-1}% + \TestNum{10}{10}% + \TestNum{-10}{-10}% + \TestNum{2147483647}{2147483647}% + \TestNum{-2147483647}{-2147483647}% + \TestNum{ 0 }{0}% + \TestNum{ 1 }{1}% + \TestNum{--1}{1}% + \TestNum{ - + - + 4 }{4}% + \TestNum{\z@}{0}% + \TestNum{\@ne}{1}% + \TestNum{\m@ne}{-1}% + \TestNum{-10+30}{20}% + \TestNum{10-30}{-20}% +\end{qstest} + +\begin{qstest}{inv}{inv}% + \TestInv{0}{0}% + \TestInv{1}{-1}% + \TestInv{-1}{1}% + \TestInv{10}{-10}% + \TestInv{-10}{10}% + \TestInv{2147483647}{-2147483647}% + \TestInv{-2147483647}{2147483647}% + \TestInv{ 0 }{0}% + \TestInv{ 1 }{-1}% + \TestInv{--1}{-1}% + \TestInv{\z@}{0}% + \TestInv{\@ne}{-1}% + \TestInv{\m@ne}{1}% + \TestInv{-10+30}{-20}% + \TestInv{10-30}{20}% +\end{qstest} + +\begin{qstest}{abs}{abs}% + \TestAbs{0}{0}% + \TestAbs{1}{1}% + \TestAbs{-1}{1}% + \TestAbs{10}{10}% + \TestAbs{-10}{10}% + \TestAbs{2147483647}{2147483647}% + \TestAbs{-2147483647}{2147483647}% + \TestAbs{ 0 }{0}% + \TestAbs{ 1 }{1}% + \TestAbs{--1}{1}% + \TestAbs{\z@}{0}% + \TestAbs{\@ne}{1}% + \TestAbs{\m@ne}{1}% + \TestAbs{-10+30}{20}% + \TestAbs{10-30}{20}% +\end{qstest} + +\begin{qstest}{sign}{sign}% + \TestSgn{0}{0}% + \TestSgn{1}{1}% + \TestSgn{-1}{-1}% + \TestSgn{10}{1}% + \TestSgn{-10}{-1}% + \TestSgn{2147483647}{1}% + \TestSgn{-2147483647}{-1}% + \TestSgn{ 0 }{0}% + \TestSgn{ 2 }{1}% + \TestSgn{ -2 }{-1}% + \TestSgn{--2}{1}% + \TestSgn{\z@}{0}% + \TestSgn{\@ne}{1}% + \TestSgn{\m@ne}{-1}% + \TestSgn{-10+30}{1}% + \TestSgn{10-30}{-1}% +\end{qstest} + +\begin{qstest}{min}{min}% + \TestMin{0}{1}{0}% + \TestMin{1}{0}{0}% + \TestMin{-10}{-20}{-20}% + \TestMin{ 1 }{ 2 }{1}% + \TestMin{ 2 }{ 1 }{1}% + \TestMin{1}{1}{1}% + \TestMin{\z@}{\@ne}{0}% + \TestMin{\@ne}{\m@ne}{-1}% + \TestMin{1+2}{3+4}{3}% +\end{qstest} + +\begin{qstest}{max}{max}% + \TestMax{0}{1}{1}% + \TestMax{1}{0}{1}% + \TestMax{-10}{-20}{-10}% + \TestMax{ 1 }{ 2 }{2}% + \TestMax{ 2 }{ 1 }{2}% + \TestMax{1}{1}{1}% + \TestMax{\z@}{\@ne}{1}% + \TestMax{\@ne}{\m@ne}{1}% + \TestMax{1+2}{3+4}{7}% +\end{qstest} + +\begin{qstest}{cmp}{cmp}% + \TestCmp{0}{0}{0}% + \TestCmp{-21}{17}{-1}% + \TestCmp{3}{4}{-1}% + \TestCmp{-10}{-10}{0}% + \TestCmp{-10}{-11}{1}% + \TestCmp{100}{5}{1}% + \TestCmp{2147483647}{-2147483647}{1}% + \TestCmp{-2147483647}{2147483647}{-1}% + \TestCmp{2147483647}{2147483647}{0}% + \TestCmp{\z@}{\@ne}{-1}% + \TestCmp{\@ne}{\m@ne}{1}% + \TestCmp{ 4 }{ 5 }{-1}% + \TestCmp{ -3 }{ -7 }{1}% + \TestCmp{1+2}{3+4}{-1}% +\end{qstest} + +\begin{qstest}{fac}{fac} + \TestFac{0}{1}% + \TestFac{1}{1}% + \TestFac{2}{2}% + \TestFac{3}{2*3}% + \TestFac{4}{2*3*4}% + \TestFac{5}{2*3*4*5}% + \TestFac{6}{2*3*4*5*6}% + \TestFac{7}{2*3*4*5*6*7}% + \TestFac{8}{2*3*4*5*6*7*8}% + \TestFac{9}{2*3*4*5*6*7*8*9}% + \TestFac{10}{2*3*4*5*6*7*8*9*10}% + \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% + \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% +\end{qstest} + +\begin{qstest}{inc}{inc}% + \TestInc{0}{1}% + \TestInc{1}{2}% + \TestInc{-1}{0}% + \TestInc{10}{11}% + \TestInc{-10}{-9}% + \TestInc{999}{1000}% + \TestInc{-1000}{-999}% + \TestInc{129}{130}% + \TestInc{2147483646}{2147483647}% + \TestInc{-2147483647}{-2147483646}% +\end{qstest} + +\begin{qstest}{dec}{dec}% + \TestDec{0}{-1}% + \TestDec{1}{0}% + \TestDec{-1}{-2}% + \TestDec{10}{9}% + \TestDec{-10}{-11}% + \TestDec{1000}{999}% + \TestDec{-999}{-1000}% + \TestDec{130}{129}% + \TestDec{2147483647}{2147483646}% + \TestDec{-2147483646}{-2147483647}% +\end{qstest} + +\begin{qstest}{add}{add}% + \TestAdd{0}{0}{0}% + \TestAdd{1}{0}{1}% + \TestAdd{0}{1}{1}% + \TestAdd{1}{2}{3}% + \TestAdd{-1}{-1}{-2}% + \TestAdd{2147483646}{1}{2147483647}% + \TestAdd{-2147483647}{2147483647}{0}% + \TestAdd{20}{-5}{15}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{-4}{1}{-3}% + \TestAdd{-1}{4}{3}% + \TestAdd{4}{-1}{3}% + \TestAdd{1}{-4}{-3}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{ -4 }{ 1 }{-3}% + \TestAdd{ -1 }{ 4 }{3}% + \TestAdd{ 4 }{ -1 }{3}% + \TestAdd{ 1 }{ -4 }{-3}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{876543210}{111111111}{987654321}% + \TestAdd{999999999}{2}{1000000001}% + \TestAdd{100}{50+150}{300}% + \TestAdd{2147483647}{10-2147483647}{10}% +\end{qstest} + +\begin{qstest}{sub}{sub} + \TestSub{0}{0}{0}% + \TestSub{1}{0}{1}% + \TestSub{1}{2}{-1}% + \TestSub{-1}{-1}{0}% + \TestSub{2147483646}{-1}{2147483647}% + \TestSub{-2147483647}{-2147483647}{0}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{-4}{1}{-5}% + \TestSub{-1}{4}{-5}% + \TestSub{4}{-1}{5}% + \TestSub{1}{-4}{5}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{ -4 }{ 1 }{-5}% + \TestSub{ -1 }{ 4 }{-5}% + \TestSub{ 4 }{ -1 }{5}% + \TestSub{ 1 }{ -4 }{5}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{1000000000}{2}{999999998}% + \TestSub{987654321}{111111111}{876543210}% + \TestSub{100}{50+150}{-100}% + \TestSub{2147483647}{-10+2147483647}{10}% +\end{qstest} + +\begin{qstest}{shl}{shl} + \TestShl{0}{0}% + \TestShl{1}{2}% + \TestShl{5621}{11242}% + \TestShl{1073741823}{2147483646}% + \TestShl{-1}{-2}% + \TestShl{-5621}{-11242}% +\end{qstest} + +\begin{qstest}{shr}{shr} + \TestShr{0}{0}% + \TestShr{1}{0}% + \TestShr{2}{1}% + \TestShr{3}{1}% + \TestShr{4}{2}% + \TestShr{5}{2}% + \TestShr{6}{3}% + \TestShr{7}{3}% + \TestShr{8}{4}% + \TestShr{9}{4}% + \TestShr{10}{5}% + \TestShr{11}{5}% + \TestShr{12}{6}% + \TestShr{13}{6}% + \TestShr{14}{7}% + \TestShr{15}{7}% + \TestShr{16}{8}% + \TestShr{17}{8}% + \TestShr{18}{9}% + \TestShr{19}{9}% + \TestShr{20}{10}% + \TestShr{21}{10}% + \TestShr{22}{11}% + \TestShr{11241}{5620}% + \TestShr{73054202}{36527101}% + \TestShr{2147483646}{1073741823}% + \TestShr{-1}{0}% + \TestShr{-2}{-1}% + \TestShr{-3}{-1}% + \TestShr{-11241}{-5620}% +\end{qstest} + +\begin{qstest}{mul}{mul} + \TestMul{0}{0}{0}% + \TestMul{1}{0}{0}% + \TestMul{0}{1}{0}% + \TestMul{1}{1}{1}% + \TestMul{3}{1}{3}% + \TestMul{1}{-3}{-3}% + \TestMul{-4}{-5}{20}% + \TestMul{3}{7}{21}% + \TestMul{7}{3}{21}% + \TestMul{3}{-7}{-21}% + \TestMul{7}{-3}{-21}% + \TestMul{-3}{7}{-21}% + \TestMul{-7}{3}{-21}% + \TestMul{-3}{-7}{21}% + \TestMul{-7}{-3}{21}% + \TestMul{12}{11}{132}% + \TestMul{999}{333}{332667}% + \TestMul{1000}{4321}{4321000}% + \TestMul{12345}{173955}{2147474475}% + \TestMul{1073741823}{2}{2147483646}% + \TestMul{2}{1073741823}{2147483646}% + \TestMul{-1073741823}{2}{-2147483646}% + \TestMul{2}{-1073741823}{-2147483646}% + \TestMul{2+3}{5+7}{60}% + \TestMul{2147483647}{2147483647/2147483647}{2147483647}% +\end{qstest} + +\begin{qstest}{sqr}{sqr} + \TestSqr{0}{0}% + \TestSqr{1}{1}% + \TestSqr{2}{4}% + \TestSqr{3}{9}% + \TestSqr{4}{16}% + \TestSqr{9}{81}% + \TestSqr{10}{100}% + \TestSqr{46340}{2147395600}% + \TestSqr{-1}{1}% + \TestSqr{-2}{4}% + \TestSqr{-46340}{2147395600}% +\end{qstest} + +\begin{qstest}{pow}{pow} + \TestPow{-2}{0}{1}% + \TestPow{-1}{0}{1}% + \TestPow{0}{0}{1}% + \TestPow{1}{0}{1}% + \TestPow{2}{0}{1}% + \TestPow{3}{0}{1}% + \TestPow{-2}{1}{-2}% + \TestPow{-1}{1}{-1}% + \TestPow{1}{1}{1}% + \TestPow{2}{1}{2}% + \TestPow{3}{1}{3}% + \TestPow{-2}{2}{4}% + \TestPow{-1}{2}{1}% + \TestPow{0}{2}{0}% + \TestPow{1}{2}{1}% + \TestPow{2}{2}{4}% + \TestPow{3}{2}{9}% + \TestPow{0}{1}{0}% + \TestPow{1}{-2}{1}% + \TestPow{1}{-1}{1}% + \TestPow{-1}{-2}{1}% + \TestPow{-1}{-1}{-1}% + \TestPow{-1}{3}{-1}% + \TestPow{-1}{4}{1}% + \TestPow{-2}{-1}{0}% + \TestPow{-2}{-2}{0}% + \TestPow{2}{3}{8}% + \TestPow{2}{4}{16}% + \TestPow{2}{5}{32}% + \TestPow{2}{6}{64}% + \TestPow{2}{7}{128}% + \TestPow{2}{8}{256}% + \TestPow{2}{9}{512}% + \TestPow{2}{10}{1024}% + \TestPow{-2}{3}{-8}% + \TestPow{-2}{4}{16}% + \TestPow{-2}{5}{-32}% + \TestPow{-2}{6}{64}% + \TestPow{-2}{7}{-128}% + \TestPow{-2}{8}{256}% + \TestPow{-2}{9}{-512}% + \TestPow{-2}{10}{1024}% + \TestPow{3}{3}{27}% + \TestPow{3}{4}{81}% + \TestPow{3}{5}{243}% + \TestPow{-3}{3}{-27}% + \TestPow{-3}{4}{81}% + \TestPow{-3}{5}{-243}% + \TestPow{2}{30}{1073741824}% + \TestPow{-3}{19}{-1162261467}% + \TestPow{5}{13}{1220703125}% + \TestPow{-7}{11}{-1977326743}% +\end{qstest} + +\begin{qstest}{div}{div} + \TestDiv{1}{1}{1}% + \TestDiv{2}{1}{2}% + \TestDiv{-2}{1}{-2}% + \TestDiv{2}{-1}{-2}% + \TestDiv{-2}{-1}{2}% + \TestDiv{15}{2}{7}% + \TestDiv{-16}{2}{-8}% + \TestDiv{1}{2}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{-2}{3}{0}% + \TestDiv{2}{-3}{0}% + \TestDiv{-2}{-3}{0}% + \TestDiv{13}{3}{4}% + \TestDiv{-13}{-3}{4}% + \TestDiv{-13}{3}{-4}% + \TestDiv{-6}{5}{-1}% + \TestDiv{-5}{5}{-1}% + \TestDiv{-4}{5}{0}% + \TestDiv{-3}{5}{0}% + \TestDiv{-2}{5}{0}% + \TestDiv{-1}{5}{0}% + \TestDiv{0}{5}{0}% + \TestDiv{1}{5}{0}% + \TestDiv{2}{5}{0}% + \TestDiv{3}{5}{0}% + \TestDiv{4}{5}{0}% + \TestDiv{5}{5}{1}% + \TestDiv{6}{5}{1}% + \TestDiv{-5}{4}{-1}% + \TestDiv{-4}{4}{-1}% + \TestDiv{-3}{4}{0}% + \TestDiv{-2}{4}{0}% + \TestDiv{-1}{4}{0}% + \TestDiv{0}{4}{0}% + \TestDiv{1}{4}{0}% + \TestDiv{2}{4}{0}% + \TestDiv{3}{4}{0}% + \TestDiv{4}{4}{1}% + \TestDiv{5}{4}{1}% + \TestDiv{12345}{678}{18}% + \TestDiv{32372}{5952}{5}% + \TestDiv{284271294}{18162}{15651}% + \TestDiv{217652429}{12561}{17327}% + \TestDiv{462028434}{5439}{84947}% + \TestDiv{2147483647}{1000}{2147483}% + \TestDiv{2147483647}{-1000}{-2147483}% + \TestDiv{-2147483647}{1000}{-2147483}% + \TestDiv{-2147483647}{-1000}{2147483}% +\end{qstest} + +\begin{qstest}{mod}{mod} + \TestMod{-6}{5}{4}% + \TestMod{-5}{5}{0}% + \TestMod{-4}{5}{1}% + \TestMod{-3}{5}{2}% + \TestMod{-2}{5}{3}% + \TestMod{-1}{5}{4}% + \TestMod{0}{5}{0}% + \TestMod{1}{5}{1}% + \TestMod{2}{5}{2}% + \TestMod{3}{5}{3}% + \TestMod{4}{5}{4}% + \TestMod{5}{5}{0}% + \TestMod{6}{5}{1}% + \TestMod{-5}{4}{3}% + \TestMod{-4}{4}{0}% + \TestMod{-3}{4}{1}% + \TestMod{-2}{4}{2}% + \TestMod{-1}{4}{3}% + \TestMod{0}{4}{0}% + \TestMod{1}{4}{1}% + \TestMod{2}{4}{2}% + \TestMod{3}{4}{3}% + \TestMod{4}{4}{0}% + \TestMod{5}{4}{1}% + \TestMod{-6}{-5}{-1}% + \TestMod{-5}{-5}{0}% + \TestMod{-4}{-5}{-4}% + \TestMod{-3}{-5}{-3}% + \TestMod{-2}{-5}{-2}% + \TestMod{-1}{-5}{-1}% + \TestMod{0}{-5}{0}% + \TestMod{1}{-5}{-4}% + \TestMod{2}{-5}{-3}% + \TestMod{3}{-5}{-2}% + \TestMod{4}{-5}{-1}% + \TestMod{5}{-5}{0}% + \TestMod{6}{-5}{-4}% + \TestMod{-5}{-4}{-1}% + \TestMod{-4}{-4}{0}% + \TestMod{-3}{-4}{-3}% + \TestMod{-2}{-4}{-2}% + \TestMod{-1}{-4}{-1}% + \TestMod{0}{-4}{0}% + \TestMod{1}{-4}{-3}% + \TestMod{2}{-4}{-2}% + \TestMod{3}{-4}{-1}% + \TestMod{4}{-4}{0}% + \TestMod{5}{-4}{-3}% + \TestMod{2147483647}{1000}{647}% + \TestMod{2147483647}{-1000}{-353}% + \TestMod{-2147483647}{1000}{353}% + \TestMod{-2147483647}{-1000}{-647}% + \TestMod{ 0 }{ 4 }{0}% + \TestMod{ 1 }{ 4 }{1}% + \TestMod{ -1 }{ 4 }{3}% + \TestMod{ 0 }{ -4 }{0}% + \TestMod{ 1 }{ -4 }{-3}% + \TestMod{ -1 }{ -4 }{-1}% + \TestMod{1+2}{1+3}{3}% + \TestMod{1-2}{1+3}{3}% + \TestMod{1-2}{1-4}{-1}% + \TestMod{1+2}{1-4}{0}% + \TestMod{1+2}{1-5}{-1}% +\end{qstest} + +\newcommand*{\TestError}[2]{% + \begingroup + \expandafter\def\csname IntCalcError:#1\endcsname{}% + \Expect*{#2}{0}% + \expandafter\def\csname IntCalcError:#1\endcsname{ERROR}% + \Expect*{#2}{0ERROR }% + \endgroup +} +\begin{qstest}{error}{error} + \TestError{FacNegative}{\intcalcFac{-1}}% + \TestError{FacNegative}{\intcalcFac{-2147483647}}% + \TestError{FacOverflow}{\intcalcFac{13}}% + \TestError{FacOverflow}{\intcalcFac{2147483647}}% + \TestError{DivisionByZero}{\intcalcPow{0}{-1}}% + \TestError{DivisionByZero}{\intcalcDiv{1}{0}}% + \TestError{DivisionByZero}{\intcalcMod{1}{0}}% + \TestError{DivisionByZero}{\IntCalcDiv1!0!}% + \TestError{DivisionByZero}{\IntCalcMod1!0!}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `intcalc-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test3.tex new file mode 100644 index 00000000000..4874311d1f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test3.tex @@ -0,0 +1,746 @@ +%% +%% This is file `intcalc-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% intcalc.dtx (with options: `test2,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 intcalc.dtx +%% and the derived files +%% intcalc.sty, intcalc.pdf, intcalc.ins, intcalc.drv, +%% intcalc-test1.tex, intcalc-test2.tex, intcalc-test3.tex, +%% intcalc-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\let\SavedNumexpr\numexpr +\let\numexpr\UNDEFINED +\makeatletter +\chardef\InCa@TestMode=1 % +\makeatother +\usepackage{intcalc}[2007/09/27] +\let\numexpr\SavedNumexpr +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newcommand*{\TestSpaceAtEnd}[1]{% + \let\SavedNumexpr\numexpr + \let\numexpr\UNDEFINED + \edef\resultA{#1}% + \edef\resultB{#1 }% + \let\numexpr\SavedNumexpr + \Expect*{\resultA\space}*{\resultB}% +} +\newcommand*{\TestResult}[2]{% + \let\SavedNumexpr\numexpr + \let\numexpr\UNDEFINED + \edef\result{#1}% + \let\numexpr\SavedNumexpr + \Expect*{\result}{#2}% +} +\newcommand*{\TestResultTwoExpansions}[2]{% + \begingroup + \let\numexpr\UNDEFINED + \expandafter\expandafter\expandafter + \endgroup + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter{#1}{#2}% +} +\newcount\TestCount +\newcommand*{\TestArg}[1]{#1} +\newcommand*{\TestTeXDivide}[2]{% + \TestCount=\TestArg{#1}\relax + \divide\TestCount by \TestArg{#2}\relax + \Expect*{\intcalcDiv{#1}{#2}}*{\the\TestCount}% +} +\newcommand*{\Test}[2]{% + \TestResult{#1}{#2}% + \TestResultTwoExpansions{#1}{#2}% + \TestSpaceAtEnd{#1}% +} +\newcommand*{\TestExch}[2]{\Test{#2}{#1}} +\newcommand*{\TestInv}[2]{% + \Test{\intcalcInv{#1}}{#2}% +} +\newcommand*{\TestNum}[2]{% + \Test{\intcalcNum{#1}}{#2}% +} +\newcommand*{\TestAbs}[2]{% + \Test{\intcalcAbs{#1}}{#2}% +} +\newcommand*{\TestSgn}[2]{% + \Test{\intcalcSgn{#1}}{#2}% +} +\newcommand*{\TestMin}[3]{% + \Test{\intcalcMin{#1}{#2}}{#3}% +} +\newcommand*{\TestMax}[3]{% + \Test{\intcalcMax{#1}{#2}}{#3}% +} +\newcommand*{\TestCmp}[3]{% + \Test{\intcalcCmp{#1}{#2}}{#3}% +} +\newcommand*{\TestInc}[2]{% + \Test{\intcalcInc{#1}}{#2}% + \ifnum\intcalcNum{#1}>-1 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcInc\intcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestDec}[2]{% + \Test{\intcalcDec{#1}}{#2}% + \ifnum\intcalcNum{#1}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcDec\intcalcNum{#1}!% + }{#2}% + }% + \x + \fi +} +\newcommand*{\TestAdd}[3]{% + \Test{\intcalcAdd{#1}{#2}}{#3}% + \ifnum\intcalcNum{#1}>0 % + \ifnum\intcalcNum{#2}> 0 % + \ifnum\intcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcAdd + \intcalcNum{#1}!\intcalcNum{#2}!% + }{#3}% + }% + \x + \else + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcAdd + \intcalcNum{#2}!\intcalcNum{#1}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestSub}[3]{% + \Test{\intcalcSub{#1}{#2}}{#3}% + \ifnum\intcalcNum{#1}>0 % + \ifnum\intcalcNum{#2}> 0 % + \ifnum\intcalcCmp{#1}{#2}>0 % + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcSub + \intcalcNum{#1}!\intcalcNum{#2}!% + }{#3}% + }% + \x + \fi + \fi + \fi +} +\newcommand*{\TestShl}[2]{% + \Test{\intcalcShl{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcShl\intcalcAbs{#1}!% + }{\intcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestShr}[2]{% + \Test{\intcalcShr{#1}}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcShr\intcalcAbs{#1}!% + }{\intcalcAbs{#2}}% + }% + \x +} +\newcommand*{\TestMul}[3]{% + \Test{\intcalcMul{#1}{#2}}{#3}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcMul\intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% + \x +} +\newcommand*{\TestSqr}[2]{% + \Test{\intcalcSqr{#1}}{#2}% +} +\newcommand*{\TestFac}[2]{% + \expandafter\TestExch\expandafter{\the\numexpr#2}{\intcalcFac{#1}}% +} +\newcommand*{\TestPow}[3]{% + \Test{\intcalcPow{#1}{#2}}{#3}% +} +\newcommand*{\TestDiv}[3]{% + \Test{\intcalcDiv{#1}{#2}}{#3}% + \TestTeXDivide{#1}{#2}% + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcDiv\intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% +} +\newcommand*{\TestMod}[3]{% + \Test{\intcalcMod{#1}{#2}}{#3}% + \ifcase\ifcase\intcalcSgn{#1} 0% + \or + \ifcase\intcalcSgn{#2} 1% + \or 0% + \else 1% + \fi + \else + \ifcase\intcalcSgn{#2} 1% + \or 1% + \else 0% + \fi + \fi\relax + \edef\x{% + \noexpand\Test{% + \noexpand\IntCalcMod + \intcalcAbs{#1}!\intcalcAbs{#2}!% + }{\intcalcAbs{#3}}% + }% + \x + \fi +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter + +\begin{qstest}{num}{num}% + \TestNum{0}{0}% + \TestNum{1}{1}% + \TestNum{-1}{-1}% + \TestNum{10}{10}% + \TestNum{-10}{-10}% + \TestNum{2147483647}{2147483647}% + \TestNum{-2147483647}{-2147483647}% + \TestNum{ 0 }{0}% + \TestNum{ 1 }{1}% + \TestNum{--1}{1}% + \TestNum{ - + - + 4 }{4}% + \TestNum{\z@}{0}% + \TestNum{\@ne}{1}% + \TestNum{\m@ne}{-1}% +\end{qstest} + +\begin{qstest}{inv}{inv}% + \TestInv{0}{0}% + \TestInv{1}{-1}% + \TestInv{-1}{1}% + \TestInv{10}{-10}% + \TestInv{-10}{10}% + \TestInv{2147483647}{-2147483647}% + \TestInv{-2147483647}{2147483647}% + \TestInv{ 0 }{0}% + \TestInv{ 1 }{-1}% + \TestInv{--1}{-1}% + \TestInv{\z@}{0}% + \TestInv{\@ne}{-1}% + \TestInv{\m@ne}{1}% +\end{qstest} + +\begin{qstest}{abs}{abs}% + \TestAbs{0}{0}% + \TestAbs{1}{1}% + \TestAbs{-1}{1}% + \TestAbs{10}{10}% + \TestAbs{-10}{10}% + \TestAbs{2147483647}{2147483647}% + \TestAbs{-2147483647}{2147483647}% + \TestAbs{ 0 }{0}% + \TestAbs{ 1 }{1}% + \TestAbs{--1}{1}% + \TestAbs{\z@}{0}% + \TestAbs{\@ne}{1}% + \TestAbs{\m@ne}{1}% +\end{qstest} + +\begin{qstest}{sign}{sign}% + \TestSgn{0}{0}% + \TestSgn{1}{1}% + \TestSgn{-1}{-1}% + \TestSgn{10}{1}% + \TestSgn{-10}{-1}% + \TestSgn{2147483647}{1}% + \TestSgn{-2147483647}{-1}% + \TestSgn{ 0 }{0}% + \TestSgn{ 2 }{1}% + \TestSgn{ -2 }{-1}% + \TestSgn{--2}{1}% + \TestSgn{\z@}{0}% + \TestSgn{\@ne}{1}% + \TestSgn{\m@ne}{-1}% +\end{qstest} + +\begin{qstest}{min}{min}% + \TestMin{0}{1}{0}% + \TestMin{1}{0}{0}% + \TestMin{-10}{-20}{-20}% + \TestMin{ 1 }{ 2 }{1}% + \TestMin{ 2 }{ 1 }{1}% + \TestMin{1}{1}{1}% + \TestMin{\z@}{\@ne}{0}% + \TestMin{\@ne}{\m@ne}{-1}% +\end{qstest} + +\begin{qstest}{max}{max}% + \TestMax{0}{1}{1}% + \TestMax{1}{0}{1}% + \TestMax{-10}{-20}{-10}% + \TestMax{ 1 }{ 2 }{2}% + \TestMax{ 2 }{ 1 }{2}% + \TestMax{1}{1}{1}% + \TestMax{\z@}{\@ne}{1}% + \TestMax{\@ne}{\m@ne}{1}% +\end{qstest} + +\begin{qstest}{cmp}{cmp}% + \TestCmp{0}{0}{0}% + \TestCmp{-21}{17}{-1}% + \TestCmp{3}{4}{-1}% + \TestCmp{-10}{-10}{0}% + \TestCmp{-10}{-11}{1}% + \TestCmp{100}{5}{1}% + \TestCmp{2147483647}{-2147483647}{1}% + \TestCmp{-2147483647}{2147483647}{-1}% + \TestCmp{2147483647}{2147483647}{0}% + \TestCmp{\z@}{\@ne}{-1}% + \TestCmp{\@ne}{\m@ne}{1}% + \TestCmp{ 4 }{ 5 }{-1}% + \TestCmp{ -3 }{ -7 }{1}% +\end{qstest} + +\begin{qstest}{fac}{fac} + \TestFac{0}{1}% + \TestFac{1}{1}% + \TestFac{2}{2}% + \TestFac{3}{2*3}% + \TestFac{4}{2*3*4}% + \TestFac{5}{2*3*4*5}% + \TestFac{6}{2*3*4*5*6}% + \TestFac{7}{2*3*4*5*6*7}% + \TestFac{8}{2*3*4*5*6*7*8}% + \TestFac{9}{2*3*4*5*6*7*8*9}% + \TestFac{10}{2*3*4*5*6*7*8*9*10}% + \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% + \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% +\end{qstest} + +\begin{qstest}{inc}{inc}% + \TestInc{0}{1}% + \TestInc{1}{2}% + \TestInc{-1}{0}% + \TestInc{10}{11}% + \TestInc{-10}{-9}% + \TestInc{999}{1000}% + \TestInc{-1000}{-999}% + \TestInc{129}{130}% + \TestInc{2147483646}{2147483647}% + \TestInc{-2147483647}{-2147483646}% +\end{qstest} + +\begin{qstest}{dec}{dec}% + \TestDec{0}{-1}% + \TestDec{1}{0}% + \TestDec{-1}{-2}% + \TestDec{10}{9}% + \TestDec{-10}{-11}% + \TestDec{1000}{999}% + \TestDec{-999}{-1000}% + \TestDec{130}{129}% + \TestDec{2147483647}{2147483646}% + \TestDec{-2147483646}{-2147483647}% +\end{qstest} + +\begin{qstest}{add}{add}% + \TestAdd{0}{0}{0}% + \TestAdd{1}{0}{1}% + \TestAdd{0}{1}{1}% + \TestAdd{1}{2}{3}% + \TestAdd{-1}{-1}{-2}% + \TestAdd{2147483646}{1}{2147483647}% + \TestAdd{-2147483647}{2147483647}{0}% + \TestAdd{20}{-5}{15}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{-4}{1}{-3}% + \TestAdd{-1}{4}{3}% + \TestAdd{4}{-1}{3}% + \TestAdd{1}{-4}{-3}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{ -4 }{ 1 }{-3}% + \TestAdd{ -1 }{ 4 }{3}% + \TestAdd{ 4 }{ -1 }{3}% + \TestAdd{ 1 }{ -4 }{-3}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{876543210}{111111111}{987654321}% + \TestAdd{999999999}{2}{1000000001}% +\end{qstest} + +\begin{qstest}{sub}{sub} + \TestSub{0}{0}{0}% + \TestSub{1}{0}{1}% + \TestSub{1}{2}{-1}% + \TestSub{-1}{-1}{0}% + \TestSub{2147483646}{-1}{2147483647}% + \TestSub{-2147483647}{-2147483647}{0}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{-4}{1}{-5}% + \TestSub{-1}{4}{-5}% + \TestSub{4}{-1}{5}% + \TestSub{1}{-4}{5}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{ -4 }{ 1 }{-5}% + \TestSub{ -1 }{ 4 }{-5}% + \TestSub{ 4 }{ -1 }{5}% + \TestSub{ 1 }{ -4 }{5}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{1000000000}{2}{999999998}% + \TestSub{987654321}{111111111}{876543210}% +\end{qstest} + +\begin{qstest}{shl}{shl} + \TestShl{0}{0}% + \TestShl{1}{2}% + \TestShl{5621}{11242}% + \TestShl{1073741823}{2147483646}% + \TestShl{-1}{-2}% + \TestShl{-5621}{-11242}% +\end{qstest} + +\begin{qstest}{shr}{shr} + \TestShr{0}{0}% + \TestShr{1}{0}% + \TestShr{2}{1}% + \TestShr{3}{1}% + \TestShr{4}{2}% + \TestShr{5}{2}% + \TestShr{6}{3}% + \TestShr{7}{3}% + \TestShr{8}{4}% + \TestShr{9}{4}% + \TestShr{10}{5}% + \TestShr{11}{5}% + \TestShr{12}{6}% + \TestShr{13}{6}% + \TestShr{14}{7}% + \TestShr{15}{7}% + \TestShr{16}{8}% + \TestShr{17}{8}% + \TestShr{18}{9}% + \TestShr{19}{9}% + \TestShr{20}{10}% + \TestShr{21}{10}% + \TestShr{22}{11}% + \TestShr{11241}{5620}% + \TestShr{73054202}{36527101}% + \TestShr{2147483646}{1073741823}% + \TestShr{-1}{0}% + \TestShr{-2}{-1}% + \TestShr{-3}{-1}% + \TestShr{-11241}{-5620}% +\end{qstest} + +\begin{qstest}{mul}{mul} + \TestMul{0}{0}{0}% + \TestMul{1}{0}{0}% + \TestMul{0}{1}{0}% + \TestMul{1}{1}{1}% + \TestMul{3}{1}{3}% + \TestMul{1}{-3}{-3}% + \TestMul{-4}{-5}{20}% + \TestMul{3}{7}{21}% + \TestMul{7}{3}{21}% + \TestMul{3}{-7}{-21}% + \TestMul{7}{-3}{-21}% + \TestMul{-3}{7}{-21}% + \TestMul{-7}{3}{-21}% + \TestMul{-3}{-7}{21}% + \TestMul{-7}{-3}{21}% + \TestMul{12}{11}{132}% + \TestMul{999}{333}{332667}% + \TestMul{1000}{4321}{4321000}% + \TestMul{12345}{173955}{2147474475}% + \TestMul{1073741823}{2}{2147483646}% + \TestMul{2}{1073741823}{2147483646}% + \TestMul{-1073741823}{2}{-2147483646}% + \TestMul{2}{-1073741823}{-2147483646}% +\end{qstest} + +\begin{qstest}{sqr}{sqr} + \TestSqr{0}{0}% + \TestSqr{1}{1}% + \TestSqr{2}{4}% + \TestSqr{3}{9}% + \TestSqr{4}{16}% + \TestSqr{9}{81}% + \TestSqr{10}{100}% + \TestSqr{46340}{2147395600}% + \TestSqr{-1}{1}% + \TestSqr{-2}{4}% + \TestSqr{-46340}{2147395600}% +\end{qstest} + +\begin{qstest}{pow}{pow} + \TestPow{-2}{0}{1}% + \TestPow{-1}{0}{1}% + \TestPow{0}{0}{1}% + \TestPow{1}{0}{1}% + \TestPow{2}{0}{1}% + \TestPow{3}{0}{1}% + \TestPow{-2}{1}{-2}% + \TestPow{-1}{1}{-1}% + \TestPow{1}{1}{1}% + \TestPow{2}{1}{2}% + \TestPow{3}{1}{3}% + \TestPow{-2}{2}{4}% + \TestPow{-1}{2}{1}% + \TestPow{0}{2}{0}% + \TestPow{1}{2}{1}% + \TestPow{2}{2}{4}% + \TestPow{3}{2}{9}% + \TestPow{0}{1}{0}% + \TestPow{1}{-2}{1}% + \TestPow{1}{-1}{1}% + \TestPow{-1}{-2}{1}% + \TestPow{-1}{-1}{-1}% + \TestPow{-1}{3}{-1}% + \TestPow{-1}{4}{1}% + \TestPow{-2}{-1}{0}% + \TestPow{-2}{-2}{0}% + \TestPow{2}{3}{8}% + \TestPow{2}{4}{16}% + \TestPow{2}{5}{32}% + \TestPow{2}{6}{64}% + \TestPow{2}{7}{128}% + \TestPow{2}{8}{256}% + \TestPow{2}{9}{512}% + \TestPow{2}{10}{1024}% + \TestPow{-2}{3}{-8}% + \TestPow{-2}{4}{16}% + \TestPow{-2}{5}{-32}% + \TestPow{-2}{6}{64}% + \TestPow{-2}{7}{-128}% + \TestPow{-2}{8}{256}% + \TestPow{-2}{9}{-512}% + \TestPow{-2}{10}{1024}% + \TestPow{3}{3}{27}% + \TestPow{3}{4}{81}% + \TestPow{3}{5}{243}% + \TestPow{-3}{3}{-27}% + \TestPow{-3}{4}{81}% + \TestPow{-3}{5}{-243}% + \TestPow{2}{30}{1073741824}% + \TestPow{-3}{19}{-1162261467}% + \TestPow{5}{13}{1220703125}% + \TestPow{-7}{11}{-1977326743}% +\end{qstest} + +\begin{qstest}{div}{div} + \TestDiv{1}{1}{1}% + \TestDiv{2}{1}{2}% + \TestDiv{-2}{1}{-2}% + \TestDiv{2}{-1}{-2}% + \TestDiv{-2}{-1}{2}% + \TestDiv{15}{2}{7}% + \TestDiv{-16}{2}{-8}% + \TestDiv{1}{2}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{-2}{3}{0}% + \TestDiv{2}{-3}{0}% + \TestDiv{-2}{-3}{0}% + \TestDiv{13}{3}{4}% + \TestDiv{-13}{-3}{4}% + \TestDiv{-13}{3}{-4}% + \TestDiv{-6}{5}{-1}% + \TestDiv{-5}{5}{-1}% + \TestDiv{-4}{5}{0}% + \TestDiv{-3}{5}{0}% + \TestDiv{-2}{5}{0}% + \TestDiv{-1}{5}{0}% + \TestDiv{0}{5}{0}% + \TestDiv{1}{5}{0}% + \TestDiv{2}{5}{0}% + \TestDiv{3}{5}{0}% + \TestDiv{4}{5}{0}% + \TestDiv{5}{5}{1}% + \TestDiv{6}{5}{1}% + \TestDiv{-5}{4}{-1}% + \TestDiv{-4}{4}{-1}% + \TestDiv{-3}{4}{0}% + \TestDiv{-2}{4}{0}% + \TestDiv{-1}{4}{0}% + \TestDiv{0}{4}{0}% + \TestDiv{1}{4}{0}% + \TestDiv{2}{4}{0}% + \TestDiv{3}{4}{0}% + \TestDiv{4}{4}{1}% + \TestDiv{5}{4}{1}% + \TestDiv{12345}{678}{18}% + \TestDiv{32372}{5952}{5}% + \TestDiv{284271294}{18162}{15651}% + \TestDiv{217652429}{12561}{17327}% + \TestDiv{462028434}{5439}{84947}% + \TestDiv{2147483647}{1000}{2147483}% + \TestDiv{2147483647}{-1000}{-2147483}% + \TestDiv{-2147483647}{1000}{-2147483}% + \TestDiv{-2147483647}{-1000}{2147483}% +\end{qstest} + +\begin{qstest}{mod}{mod} + \TestMod{-6}{5}{4}% + \TestMod{-5}{5}{0}% + \TestMod{-4}{5}{1}% + \TestMod{-3}{5}{2}% + \TestMod{-2}{5}{3}% + \TestMod{-1}{5}{4}% + \TestMod{0}{5}{0}% + \TestMod{1}{5}{1}% + \TestMod{2}{5}{2}% + \TestMod{3}{5}{3}% + \TestMod{4}{5}{4}% + \TestMod{5}{5}{0}% + \TestMod{6}{5}{1}% + \TestMod{-5}{4}{3}% + \TestMod{-4}{4}{0}% + \TestMod{-3}{4}{1}% + \TestMod{-2}{4}{2}% + \TestMod{-1}{4}{3}% + \TestMod{0}{4}{0}% + \TestMod{1}{4}{1}% + \TestMod{2}{4}{2}% + \TestMod{3}{4}{3}% + \TestMod{4}{4}{0}% + \TestMod{5}{4}{1}% + \TestMod{-6}{-5}{-1}% + \TestMod{-5}{-5}{0}% + \TestMod{-4}{-5}{-4}% + \TestMod{-3}{-5}{-3}% + \TestMod{-2}{-5}{-2}% + \TestMod{-1}{-5}{-1}% + \TestMod{0}{-5}{0}% + \TestMod{1}{-5}{-4}% + \TestMod{2}{-5}{-3}% + \TestMod{3}{-5}{-2}% + \TestMod{4}{-5}{-1}% + \TestMod{5}{-5}{0}% + \TestMod{6}{-5}{-4}% + \TestMod{-5}{-4}{-1}% + \TestMod{-4}{-4}{0}% + \TestMod{-3}{-4}{-3}% + \TestMod{-2}{-4}{-2}% + \TestMod{-1}{-4}{-1}% + \TestMod{0}{-4}{0}% + \TestMod{1}{-4}{-3}% + \TestMod{2}{-4}{-2}% + \TestMod{3}{-4}{-1}% + \TestMod{4}{-4}{0}% + \TestMod{5}{-4}{-3}% + \TestMod{2147483647}{1000}{647}% + \TestMod{2147483647}{-1000}{-353}% + \TestMod{-2147483647}{1000}{353}% + \TestMod{-2147483647}{-1000}{-647}% + \TestMod{ 0 }{ 4 }{0}% + \TestMod{ 1 }{ 4 }{1}% + \TestMod{ -1 }{ 4 }{3}% + \TestMod{ 0 }{ -4 }{0}% + \TestMod{ 1 }{ -4 }{-3}% + \TestMod{ -1 }{ -4 }{-1}% +\end{qstest} + +\newcommand*{\TestError}[2]{% + \begingroup + \expandafter\def\csname IntCalcError:#1\endcsname{}% + \Expect*{#2}{0}% + \expandafter\def\csname IntCalcError:#1\endcsname{ERROR}% + \Expect*{#2}{0ERROR }% + \endgroup +} +\begin{qstest}{error}{error} + \TestError{FacNegative}{\intcalcFac{-1}}% + \TestError{FacNegative}{\intcalcFac{-2147483647}}% + \TestError{FacOverflow}{\intcalcFac{13}}% + \TestError{FacOverflow}{\intcalcFac{2147483647}}% + \TestError{DivisionByZero}{\intcalcPow{0}{-1}}% + \TestError{DivisionByZero}{\intcalcDiv{1}{0}}% + \TestError{DivisionByZero}{\intcalcMod{1}{0}}% + \TestError{DivisionByZero}{\IntCalcDiv1!0!}% + \TestError{DivisionByZero}{\IntCalcMod1!0!}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `intcalc-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test4.tex new file mode 100644 index 00000000000..021744f16dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/intcalc-test4.tex @@ -0,0 +1,561 @@ +%% +%% This is file `intcalc-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% intcalc.dtx (with options: `test4,etex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 intcalc.dtx +%% and the derived files +%% intcalc.sty, intcalc.pdf, intcalc.ins, intcalc.drv, +%% intcalc-test1.tex, intcalc-test2.tex, intcalc-test3.tex, +%% intcalc-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\chardef\InCa@TestMode=1 % +\makeatother +\usepackage{intcalc}[2007/09/27] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newcommand*{\TestDo}[2]{% + \ifcase\numexpr#2\relax + \else + \edef\temp{\intcalcMod{#1}{#2}}% + \Expect*{% + \the\numexpr + \intcalcMul{% + \intcalcDiv{\intcalcAbs{#1}}{\intcalcAbs{#2}}% + }{\intcalcAbs{#2}}% + +\intcalcMod{\intcalcAbs{#1}}{\intcalcAbs{#2}}\relax + }*{\the\numexpr\intcalcAbs{#1}\relax}% + \fi +} +\newcommand*{\TestOne}[2]{% + \TestDo{#1}{#1}% +} +\newcommand*{\TestTwo}[3]{% + \TestDo{#1}{#2}% + \TestDo{#2}{#1}% +} +\let\TestNum\TestOne +\let\TestInv\TestOne +\let\TestAbs\TestOne +\let\TestSgn\TestOne +\let\TestMin\TestTwo +\let\TestMax\TestTwo +\let\TestCmp\TestTwo +\let\TestInc\TestOne +\let\TestDec\TestOne +\let\TestAdd\TestTwo +\let\TestSub\TestTwo +\let\TestShl\TestOne +\let\TestShr\TestOne +\let\TestMul\TestTwo +\let\TestSqr\TestOne +\def\TestFac#1#2{} +\let\TestPow\TestTwo +\let\TestDiv\TestTwo +\let\TestMod\TestTwo +\makeatletter + +\begin{qstest}{num}{num}% + \TestNum{0}{0}% + \TestNum{1}{1}% + \TestNum{-1}{-1}% + \TestNum{10}{10}% + \TestNum{-10}{-10}% + \TestNum{2147483647}{2147483647}% + \TestNum{-2147483647}{-2147483647}% + \TestNum{ 0 }{0}% + \TestNum{ 1 }{1}% + \TestNum{--1}{1}% + \TestNum{ - + - + 4 }{4}% + \TestNum{\z@}{0}% + \TestNum{\@ne}{1}% + \TestNum{\m@ne}{-1}% + \TestNum{-10+30}{20}% + \TestNum{10-30}{-20}% +\end{qstest} + +\begin{qstest}{inv}{inv}% + \TestInv{0}{0}% + \TestInv{1}{-1}% + \TestInv{-1}{1}% + \TestInv{10}{-10}% + \TestInv{-10}{10}% + \TestInv{2147483647}{-2147483647}% + \TestInv{-2147483647}{2147483647}% + \TestInv{ 0 }{0}% + \TestInv{ 1 }{-1}% + \TestInv{--1}{-1}% + \TestInv{\z@}{0}% + \TestInv{\@ne}{-1}% + \TestInv{\m@ne}{1}% + \TestInv{-10+30}{-20}% + \TestInv{10-30}{20}% +\end{qstest} + +\begin{qstest}{abs}{abs}% + \TestAbs{0}{0}% + \TestAbs{1}{1}% + \TestAbs{-1}{1}% + \TestAbs{10}{10}% + \TestAbs{-10}{10}% + \TestAbs{2147483647}{2147483647}% + \TestAbs{-2147483647}{2147483647}% + \TestAbs{ 0 }{0}% + \TestAbs{ 1 }{1}% + \TestAbs{--1}{1}% + \TestAbs{\z@}{0}% + \TestAbs{\@ne}{1}% + \TestAbs{\m@ne}{1}% + \TestAbs{-10+30}{20}% + \TestAbs{10-30}{20}% +\end{qstest} + +\begin{qstest}{sign}{sign}% + \TestSgn{0}{0}% + \TestSgn{1}{1}% + \TestSgn{-1}{-1}% + \TestSgn{10}{1}% + \TestSgn{-10}{-1}% + \TestSgn{2147483647}{1}% + \TestSgn{-2147483647}{-1}% + \TestSgn{ 0 }{0}% + \TestSgn{ 2 }{1}% + \TestSgn{ -2 }{-1}% + \TestSgn{--2}{1}% + \TestSgn{\z@}{0}% + \TestSgn{\@ne}{1}% + \TestSgn{\m@ne}{-1}% + \TestSgn{-10+30}{1}% + \TestSgn{10-30}{-1}% +\end{qstest} + +\begin{qstest}{min}{min}% + \TestMin{0}{1}{0}% + \TestMin{1}{0}{0}% + \TestMin{-10}{-20}{-20}% + \TestMin{ 1 }{ 2 }{1}% + \TestMin{ 2 }{ 1 }{1}% + \TestMin{1}{1}{1}% + \TestMin{\z@}{\@ne}{0}% + \TestMin{\@ne}{\m@ne}{-1}% + \TestMin{1+2}{3+4}{3}% +\end{qstest} + +\begin{qstest}{max}{max}% + \TestMax{0}{1}{1}% + \TestMax{1}{0}{1}% + \TestMax{-10}{-20}{-10}% + \TestMax{ 1 }{ 2 }{2}% + \TestMax{ 2 }{ 1 }{2}% + \TestMax{1}{1}{1}% + \TestMax{\z@}{\@ne}{1}% + \TestMax{\@ne}{\m@ne}{1}% + \TestMax{1+2}{3+4}{7}% +\end{qstest} + +\begin{qstest}{cmp}{cmp}% + \TestCmp{0}{0}{0}% + \TestCmp{-21}{17}{-1}% + \TestCmp{3}{4}{-1}% + \TestCmp{-10}{-10}{0}% + \TestCmp{-10}{-11}{1}% + \TestCmp{100}{5}{1}% + \TestCmp{2147483647}{-2147483647}{1}% + \TestCmp{-2147483647}{2147483647}{-1}% + \TestCmp{2147483647}{2147483647}{0}% + \TestCmp{\z@}{\@ne}{-1}% + \TestCmp{\@ne}{\m@ne}{1}% + \TestCmp{ 4 }{ 5 }{-1}% + \TestCmp{ -3 }{ -7 }{1}% + \TestCmp{1+2}{3+4}{-1}% +\end{qstest} + +\begin{qstest}{fac}{fac} + \TestFac{0}{1}% + \TestFac{1}{1}% + \TestFac{2}{2}% + \TestFac{3}{2*3}% + \TestFac{4}{2*3*4}% + \TestFac{5}{2*3*4*5}% + \TestFac{6}{2*3*4*5*6}% + \TestFac{7}{2*3*4*5*6*7}% + \TestFac{8}{2*3*4*5*6*7*8}% + \TestFac{9}{2*3*4*5*6*7*8*9}% + \TestFac{10}{2*3*4*5*6*7*8*9*10}% + \TestFac{11}{2*3*4*5*6*7*8*9*10*11}% + \TestFac{12}{2*3*4*5*6*7*8*9*10*11*12}% +\end{qstest} + +\begin{qstest}{inc}{inc}% + \TestInc{0}{1}% + \TestInc{1}{2}% + \TestInc{-1}{0}% + \TestInc{10}{11}% + \TestInc{-10}{-9}% + \TestInc{999}{1000}% + \TestInc{-1000}{-999}% + \TestInc{129}{130}% + \TestInc{2147483646}{2147483647}% + \TestInc{-2147483647}{-2147483646}% +\end{qstest} + +\begin{qstest}{dec}{dec}% + \TestDec{0}{-1}% + \TestDec{1}{0}% + \TestDec{-1}{-2}% + \TestDec{10}{9}% + \TestDec{-10}{-11}% + \TestDec{1000}{999}% + \TestDec{-999}{-1000}% + \TestDec{130}{129}% + \TestDec{2147483647}{2147483646}% + \TestDec{-2147483646}{-2147483647}% +\end{qstest} + +\begin{qstest}{add}{add}% + \TestAdd{0}{0}{0}% + \TestAdd{1}{0}{1}% + \TestAdd{0}{1}{1}% + \TestAdd{1}{2}{3}% + \TestAdd{-1}{-1}{-2}% + \TestAdd{2147483646}{1}{2147483647}% + \TestAdd{-2147483647}{2147483647}{0}% + \TestAdd{20}{-5}{15}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{-4}{1}{-3}% + \TestAdd{-1}{4}{3}% + \TestAdd{4}{-1}{3}% + \TestAdd{1}{-4}{-3}% + \TestAdd{-4}{-1}{-5}% + \TestAdd{-1}{-4}{-5}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{ -4 }{ 1 }{-3}% + \TestAdd{ -1 }{ 4 }{3}% + \TestAdd{ 4 }{ -1 }{3}% + \TestAdd{ 1 }{ -4 }{-3}% + \TestAdd{ -4 }{ -1 }{-5}% + \TestAdd{ -1 }{ -4 }{-5}% + \TestAdd{876543210}{111111111}{987654321}% + \TestAdd{999999999}{2}{1000000001}% + \TestAdd{100}{50+150}{300}% + \TestAdd{2147483647}{10-2147483647}{10}% +\end{qstest} + +\begin{qstest}{sub}{sub} + \TestSub{0}{0}{0}% + \TestSub{1}{0}{1}% + \TestSub{1}{2}{-1}% + \TestSub{-1}{-1}{0}% + \TestSub{2147483646}{-1}{2147483647}% + \TestSub{-2147483647}{-2147483647}{0}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{-4}{1}{-5}% + \TestSub{-1}{4}{-5}% + \TestSub{4}{-1}{5}% + \TestSub{1}{-4}{5}% + \TestSub{-4}{-1}{-3}% + \TestSub{-1}{-4}{3}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{ -4 }{ 1 }{-5}% + \TestSub{ -1 }{ 4 }{-5}% + \TestSub{ 4 }{ -1 }{5}% + \TestSub{ 1 }{ -4 }{5}% + \TestSub{ -4 }{ -1 }{-3}% + \TestSub{ -1 }{ -4 }{3}% + \TestSub{1000000000}{2}{999999998}% + \TestSub{987654321}{111111111}{876543210}% + \TestSub{100}{50+150}{-100}% + \TestSub{2147483647}{-10+2147483647}{10}% +\end{qstest} + +\begin{qstest}{shl}{shl} + \TestShl{0}{0}% + \TestShl{1}{2}% + \TestShl{5621}{11242}% + \TestShl{1073741823}{2147483646}% + \TestShl{-1}{-2}% + \TestShl{-5621}{-11242}% +\end{qstest} + +\begin{qstest}{shr}{shr} + \TestShr{0}{0}% + \TestShr{1}{0}% + \TestShr{2}{1}% + \TestShr{3}{1}% + \TestShr{4}{2}% + \TestShr{5}{2}% + \TestShr{6}{3}% + \TestShr{7}{3}% + \TestShr{8}{4}% + \TestShr{9}{4}% + \TestShr{10}{5}% + \TestShr{11}{5}% + \TestShr{12}{6}% + \TestShr{13}{6}% + \TestShr{14}{7}% + \TestShr{15}{7}% + \TestShr{16}{8}% + \TestShr{17}{8}% + \TestShr{18}{9}% + \TestShr{19}{9}% + \TestShr{20}{10}% + \TestShr{21}{10}% + \TestShr{22}{11}% + \TestShr{11241}{5620}% + \TestShr{73054202}{36527101}% + \TestShr{2147483646}{1073741823}% + \TestShr{-1}{0}% + \TestShr{-2}{-1}% + \TestShr{-3}{-1}% + \TestShr{-11241}{-5620}% +\end{qstest} + +\begin{qstest}{mul}{mul} + \TestMul{0}{0}{0}% + \TestMul{1}{0}{0}% + \TestMul{0}{1}{0}% + \TestMul{1}{1}{1}% + \TestMul{3}{1}{3}% + \TestMul{1}{-3}{-3}% + \TestMul{-4}{-5}{20}% + \TestMul{3}{7}{21}% + \TestMul{7}{3}{21}% + \TestMul{3}{-7}{-21}% + \TestMul{7}{-3}{-21}% + \TestMul{-3}{7}{-21}% + \TestMul{-7}{3}{-21}% + \TestMul{-3}{-7}{21}% + \TestMul{-7}{-3}{21}% + \TestMul{12}{11}{132}% + \TestMul{999}{333}{332667}% + \TestMul{1000}{4321}{4321000}% + \TestMul{12345}{173955}{2147474475}% + \TestMul{1073741823}{2}{2147483646}% + \TestMul{2}{1073741823}{2147483646}% + \TestMul{-1073741823}{2}{-2147483646}% + \TestMul{2}{-1073741823}{-2147483646}% + \TestMul{2+3}{5+7}{60}% + \TestMul{2147483647}{2147483647/2147483647}{2147483647}% +\end{qstest} + +\begin{qstest}{sqr}{sqr} + \TestSqr{0}{0}% + \TestSqr{1}{1}% + \TestSqr{2}{4}% + \TestSqr{3}{9}% + \TestSqr{4}{16}% + \TestSqr{9}{81}% + \TestSqr{10}{100}% + \TestSqr{46340}{2147395600}% + \TestSqr{-1}{1}% + \TestSqr{-2}{4}% + \TestSqr{-46340}{2147395600}% +\end{qstest} + +\begin{qstest}{pow}{pow} + \TestPow{-2}{0}{1}% + \TestPow{-1}{0}{1}% + \TestPow{0}{0}{1}% + \TestPow{1}{0}{1}% + \TestPow{2}{0}{1}% + \TestPow{3}{0}{1}% + \TestPow{-2}{1}{-2}% + \TestPow{-1}{1}{-1}% + \TestPow{1}{1}{1}% + \TestPow{2}{1}{2}% + \TestPow{3}{1}{3}% + \TestPow{-2}{2}{4}% + \TestPow{-1}{2}{1}% + \TestPow{0}{2}{0}% + \TestPow{1}{2}{1}% + \TestPow{2}{2}{4}% + \TestPow{3}{2}{9}% + \TestPow{0}{1}{0}% + \TestPow{1}{-2}{1}% + \TestPow{1}{-1}{1}% + \TestPow{-1}{-2}{1}% + \TestPow{-1}{-1}{-1}% + \TestPow{-1}{3}{-1}% + \TestPow{-1}{4}{1}% + \TestPow{-2}{-1}{0}% + \TestPow{-2}{-2}{0}% + \TestPow{2}{3}{8}% + \TestPow{2}{4}{16}% + \TestPow{2}{5}{32}% + \TestPow{2}{6}{64}% + \TestPow{2}{7}{128}% + \TestPow{2}{8}{256}% + \TestPow{2}{9}{512}% + \TestPow{2}{10}{1024}% + \TestPow{-2}{3}{-8}% + \TestPow{-2}{4}{16}% + \TestPow{-2}{5}{-32}% + \TestPow{-2}{6}{64}% + \TestPow{-2}{7}{-128}% + \TestPow{-2}{8}{256}% + \TestPow{-2}{9}{-512}% + \TestPow{-2}{10}{1024}% + \TestPow{3}{3}{27}% + \TestPow{3}{4}{81}% + \TestPow{3}{5}{243}% + \TestPow{-3}{3}{-27}% + \TestPow{-3}{4}{81}% + \TestPow{-3}{5}{-243}% + \TestPow{2}{30}{1073741824}% + \TestPow{-3}{19}{-1162261467}% + \TestPow{5}{13}{1220703125}% + \TestPow{-7}{11}{-1977326743}% +\end{qstest} + +\begin{qstest}{div}{div} + \TestDiv{1}{1}{1}% + \TestDiv{2}{1}{2}% + \TestDiv{-2}{1}{-2}% + \TestDiv{2}{-1}{-2}% + \TestDiv{-2}{-1}{2}% + \TestDiv{15}{2}{7}% + \TestDiv{-16}{2}{-8}% + \TestDiv{1}{2}{0}% + \TestDiv{1}{3}{0}% + \TestDiv{2}{3}{0}% + \TestDiv{-2}{3}{0}% + \TestDiv{2}{-3}{0}% + \TestDiv{-2}{-3}{0}% + \TestDiv{13}{3}{4}% + \TestDiv{-13}{-3}{4}% + \TestDiv{-13}{3}{-4}% + \TestDiv{-6}{5}{-1}% + \TestDiv{-5}{5}{-1}% + \TestDiv{-4}{5}{0}% + \TestDiv{-3}{5}{0}% + \TestDiv{-2}{5}{0}% + \TestDiv{-1}{5}{0}% + \TestDiv{0}{5}{0}% + \TestDiv{1}{5}{0}% + \TestDiv{2}{5}{0}% + \TestDiv{3}{5}{0}% + \TestDiv{4}{5}{0}% + \TestDiv{5}{5}{1}% + \TestDiv{6}{5}{1}% + \TestDiv{-5}{4}{-1}% + \TestDiv{-4}{4}{-1}% + \TestDiv{-3}{4}{0}% + \TestDiv{-2}{4}{0}% + \TestDiv{-1}{4}{0}% + \TestDiv{0}{4}{0}% + \TestDiv{1}{4}{0}% + \TestDiv{2}{4}{0}% + \TestDiv{3}{4}{0}% + \TestDiv{4}{4}{1}% + \TestDiv{5}{4}{1}% + \TestDiv{12345}{678}{18}% + \TestDiv{32372}{5952}{5}% + \TestDiv{284271294}{18162}{15651}% + \TestDiv{217652429}{12561}{17327}% + \TestDiv{462028434}{5439}{84947}% + \TestDiv{2147483647}{1000}{2147483}% + \TestDiv{2147483647}{-1000}{-2147483}% + \TestDiv{-2147483647}{1000}{-2147483}% + \TestDiv{-2147483647}{-1000}{2147483}% +\end{qstest} + +\begin{qstest}{mod}{mod} + \TestMod{-6}{5}{4}% + \TestMod{-5}{5}{0}% + \TestMod{-4}{5}{1}% + \TestMod{-3}{5}{2}% + \TestMod{-2}{5}{3}% + \TestMod{-1}{5}{4}% + \TestMod{0}{5}{0}% + \TestMod{1}{5}{1}% + \TestMod{2}{5}{2}% + \TestMod{3}{5}{3}% + \TestMod{4}{5}{4}% + \TestMod{5}{5}{0}% + \TestMod{6}{5}{1}% + \TestMod{-5}{4}{3}% + \TestMod{-4}{4}{0}% + \TestMod{-3}{4}{1}% + \TestMod{-2}{4}{2}% + \TestMod{-1}{4}{3}% + \TestMod{0}{4}{0}% + \TestMod{1}{4}{1}% + \TestMod{2}{4}{2}% + \TestMod{3}{4}{3}% + \TestMod{4}{4}{0}% + \TestMod{5}{4}{1}% + \TestMod{-6}{-5}{-1}% + \TestMod{-5}{-5}{0}% + \TestMod{-4}{-5}{-4}% + \TestMod{-3}{-5}{-3}% + \TestMod{-2}{-5}{-2}% + \TestMod{-1}{-5}{-1}% + \TestMod{0}{-5}{0}% + \TestMod{1}{-5}{-4}% + \TestMod{2}{-5}{-3}% + \TestMod{3}{-5}{-2}% + \TestMod{4}{-5}{-1}% + \TestMod{5}{-5}{0}% + \TestMod{6}{-5}{-4}% + \TestMod{-5}{-4}{-1}% + \TestMod{-4}{-4}{0}% + \TestMod{-3}{-4}{-3}% + \TestMod{-2}{-4}{-2}% + \TestMod{-1}{-4}{-1}% + \TestMod{0}{-4}{0}% + \TestMod{1}{-4}{-3}% + \TestMod{2}{-4}{-2}% + \TestMod{3}{-4}{-1}% + \TestMod{4}{-4}{0}% + \TestMod{5}{-4}{-3}% + \TestMod{2147483647}{1000}{647}% + \TestMod{2147483647}{-1000}{-353}% + \TestMod{-2147483647}{1000}{353}% + \TestMod{-2147483647}{-1000}{-647}% + \TestMod{ 0 }{ 4 }{0}% + \TestMod{ 1 }{ 4 }{1}% + \TestMod{ -1 }{ 4 }{3}% + \TestMod{ 0 }{ -4 }{0}% + \TestMod{ 1 }{ -4 }{-3}% + \TestMod{ -1 }{ -4 }{-1}% + \TestMod{1+2}{1+3}{3}% + \TestMod{1-2}{1+3}{3}% + \TestMod{1-2}{1-4}{-1}% + \TestMod{1+2}{1-4}{0}% + \TestMod{1+2}{1-5}{-1}% +\end{qstest} + + +\begin{document} +\end{document} +\endinput +%% +%% End of file `intcalc-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test1.tex new file mode 100644 index 00000000000..ffc4acdda7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test1.tex @@ -0,0 +1,79 @@ +%% +%% This is file `kvoptions-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% kvoptions.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2004, 2006, 2007 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 kvoptions.dtx +%% and the derived files +%% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv, +%% kvoptions-patch.sty, example-mycolorsetup.sty, +%% kvoptions-test1.tex, kvoptions-test2.tex. +%% +%% No we don't need the option 'color'. +%% With color support option 'emphcolor' will dynamically +%% change the color of \emph statements. +\input miniltx.tex\relax +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input kvoptions.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `kvoptions-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test2.tex new file mode 100644 index 00000000000..1e3f3eae309 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/kvoptions-test2.tex @@ -0,0 +1,80 @@ +%% +%% This is file `kvoptions-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% kvoptions.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2004, 2006, 2007 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 kvoptions.dtx +%% and the derived files +%% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv, +%% kvoptions-patch.sty, example-mycolorsetup.sty, +%% kvoptions-test1.tex, kvoptions-test2.tex. +%% +%% No we don't need the option 'color'. +%% With color support option 'emphcolor' will dynamically +%% change the color of \emph statements. +\NeedsTeXFormat{LaTeX2e} +\makeatletter +\catcode`\@=11 % +\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#1{% + \RangeCatcodeInvalid{0}{47}% + \RangeCatcodeInvalid{58}{64}% + \RangeCatcodeInvalid{91}{96}% + \RangeCatcodeInvalid{123}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + #1\relax + \RestoreCatcodes +} +\Test{\RequirePackage{kvoptions-patch}}% +\Test{\RequirePackage{kvoptions}}% +\csname @@end\endcsname +\endinput +%% +%% End of file `kvoptions-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test1.tex new file mode 100644 index 00000000000..14225a1cd0b --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `kvsetkeys-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% kvsetkeys.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 kvsetkeys.dtx +%% and the derived files +%% kvsetkeys.sty, kvsetkeys.pdf, kvsetkeys.ins, kvsetkeys.drv, +%% kvsetkeys-example.tex, kvsetkeys-test1.tex, +%% kvsetkeys-test2.tex, kvsetkeys-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input kvsetkeys.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `kvsetkeys-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test2.tex new file mode 100644 index 00000000000..739944bab57 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test2.tex @@ -0,0 +1,264 @@ +%% +%% This is file `kvsetkeys-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% kvsetkeys.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 kvsetkeys.dtx +%% and the derived files +%% kvsetkeys.sty, kvsetkeys.pdf, kvsetkeys.ins, kvsetkeys.drv, +%% kvsetkeys-example.tex, kvsetkeys-test1.tex, +%% kvsetkeys-test2.tex, kvsetkeys-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\makeatletter +\chardef\KVS@TestMode=1 % +\makeatother +\usepackage{kvsetkeys}[2007/09/29] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter +\def\@makeactive#1{% + \catcode`#1=13\relax +} +\@makeactive\, +\def,{\errmessage{COMMA}} +\@makeother\, +\@makeactive\= +\def={\errmessage{EQUALS}} +\@makeother\= + +\begin{qstest}{normalize}{normalize,active-chars,space-removal}% + \def\Test#1#2{% + \@makeother\,% + \@makeother\=% + \scantokens{\toks@={#2}}% + \edef\Result{\the\toks@}% + \@makeother\,% + \@makeother\=% + \@Test{#1}% + \@makeactive\,% + \@Test{#1}% + \@makeactive\=% + \@Test{#1}% + \@makeother\,% + \@Test{#1}% + \@makeother\=% + }% + \def\@Test#1{% + \scantokens{\kv@normalize{#1}}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter + {\expandafter\kv@list\expandafter}\expandafter{\Result}% + \Expect*{\ifx\kv@list\Result true\else false\fi}{true}% + }% + \Test{}{,}% + \Test{,}{,}% + \Test{,,}{,}% + \Test{,,,}{,}% + \Test{ , }{,}% + \Test{{a}}{,{a},}% + \Test{,{a}}{,{a},}% + \Test{{a},}{,{a},}% + \Test{{a},{b}}{,{a},{b},}% + \Test{{b}={c},{}=,{}={},{d}=}{,{b}={c},{}=,{}={},{d}=,}% + \Test{{}}{,{},}% + \Test{{},{},{}}{,{},{},{},}% + \Test{=}{,=,}% + \Test{=,=,=}{,=,=,=,}% + \def\TestSet#1{% + \Test{#1#1}{,}% + \Test{#1#1,#1#1}{,}% + \Test{#1#1,#1#1,#1#1}{,}% + \Test{#1#1#1#1#1}{,}% + \Test{{a}#1#1=#1#1{b}}{,{a}={b},}% + }% + \TestSet{ }% + \begingroup + \let\saved@normalize\kv@normalize + \def\kv@normalize#1{% + \saved@normalize{#1}% + \@onelevel@sanitize\kv@list + \@onelevel@sanitize\Result + }% + \Test{#,#=#,{#}={#},{#}=,{#}}{,#,#=#,{#}={#},{#}=,{#},}% + \endgroup + \begingroup + \def\Test#1#2{% + \edef\Result{#2}% + \@Test{#1}% + }% + \Test{{ a = b }}{,{ a = b },}% + \@makeactive\,% + \Test{{,}}{\string,{\noexpand,}\string,}% + \@makeother\,% + \@makeactive\=% + \Test{a={=}}{,a\string={\noexpand=},}% + \endgroup + \Test{a=b}{,a=b,}% + \Test{a={b}}{,a={b},}% + \Test{a ={b}}{,a={b},}% + \Test{a= {b}}{,a={b},}% + \Test{a = {b}}{,a={b},}% + \Test{a = {b} ,}{,a={b},}% + \Test{a}{,a,}% + \Test{ a}{,a,}% + \Test{a }{,a,}% + \Test{ a }{,a,}% + \Test{, a ,}{,a,}% + \Test{, a b ,}{,a b,}% + \Test{,a ,}{,a,}% + \Test{ a =}{,a=,}% + \Test{ a = }{,a=,}% + \Test{a =}{,a=,}% + \Test{{a} =}{,{a}=,}% + \Test{{a}= {}}{,{a}={},}% + \Test{, a = {}}{,a={},}% + \Test{a,,b}{,a,b,}% + \Test{a=\fi}{,a=\fi,}% + \Test{a=\iffalse}{,a=\iffalse,}% + \Test{a=\iffalse,b=\fi}{,a=\iffalse,b=\fi,}% +\end{qstest} + +\begin{qstest}{parse}{parse,brace-removal} + \def\Processor#1#2{% + \expandafter\Expect\expandafter{\kv@key}{#1}% + \toks@{#2}% + \edef\x{\the\toks@}% + \ifx\kv@value\relax + \Expect*{\the\toks@}{}% + \def\Value{<>}% + \else + \edef\Value{[\the\toks@]}% + \@onelevel@sanitize\Value + \fi + \toks@{#1}% + \ifx\Result\@empty + \edef\Result{[\the\toks@]=\Value}% + \else + \edef\Result{\Result,[\the\toks@]=\Value}% + \fi + \@onelevel@sanitize\Result + }% + \def\Test#1#2{% + \let\Result\@empty + \kv@parse{#1}\Processor + \Expect*{\Result}{#2}% + }% + \Test{}{}% + \Test{{}}{}% + \Test{{{}}}{[]=<>}% + \Test{{{{}}}}{[{}]=<>}% + \Test{a}{[a]=<>}% + \Test{{a}}{[a]=<>}% + \Test{{a}}{[a]=<>}% + \Test{{{a}}}{[a]=<>}% + \Test{{{{a}}}}{[{a}]=<>}% + \Test{a=}{[a]=[]}% + \Test{{a}=}{[a]=[]}% + \Test{{{a}}=}{[{a}]=[]}% + \Test{a={}}{[a]=[]}% + \Test{{a}={{}}}{[a]=[{}]}% + \Test{a=b}{[a]=[b]}% + \Test{a=\fi}{[a]=[\fi]}% + \Test{a=\iffalse}{[a]=[\iffalse]}% + \Test{a=\iffalse,b=\fi}{[a]=[\iffalse],[b]=[\fi]}% + \Test{{ a = b }}{[ a ]=[ b ]}% + \Test{{{ a = b }}}{[ a = b ]=<>}% +\end{qstest} + +\begin{qstest}{comma}{comma,parse} + \def\Processor#1{% + \expandafter\Expect\expandafter{\comma@entry}{#1}% + \toks@{#1}% + \ifx\Result\@empty + \edef\Result{[\the\toks@]}% + \else + \edef\Result{\Result,[\the\toks@]}% + \fi + \@onelevel@sanitize\Result + }% + \def\Test#1#2{% + \let\Result\@empty + \comma@parse{#1}\Processor + \Expect*{\Result}{#2}% + }% +\tracingmacros=1 + \Test{}{}% + \Test{{}}{}% + \Test{{{}}}{[{}]}% + \Test{a}{[a]}% + \Test{{a}}{[a]}% + \Test{{{a}}}{[{a}]}% + \Test{a=}{[a=]}% + \Test{a\fi}{[a\fi]}% + \Test{a\iffalse}{[a\iffalse]}% + \Test{\iffalse,\fi}{[\iffalse],[\fi]}% + \Test{ a , b , c }{[a],[b],[c]}% + \Test{ { } ,{ }, { }, { } , { } }{[ ],[ ],[ ],[ ],[ ]}% + \Test{ {{}} ,{{}}, {{}}, {{}} , {{}} }{[{}],[{}],[{}],[{}],[{}]}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `kvsetkeys-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test3.tex new file mode 100644 index 00000000000..fcf53c96479 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/kvsetkeys-test3.tex @@ -0,0 +1,267 @@ +%% +%% This is file `kvsetkeys-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% kvsetkeys.dtx (with options: `test2,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006, 2007 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 kvsetkeys.dtx +%% and the derived files +%% kvsetkeys.sty, kvsetkeys.pdf, kvsetkeys.ins, kvsetkeys.drv, +%% kvsetkeys-example.tex, kvsetkeys-test1.tex, +%% kvsetkeys-test2.tex, kvsetkeys-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\let\SavedUnexpanded\unexpanded +\let\unexpanded\UNDEFINED +\makeatletter +\chardef\KVS@TestMode=1 % +\makeatother +\usepackage{kvsetkeys}[2007/09/29] +\let\unexpanded\SavedUnexpanded +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfresettimer\endcsname\relax +\else + \makeatletter + \newcount\SummaryTime + \newcount\TestTime + \SummaryTime=\z@ + \newcommand*{\PrintTime}[2]{% + \typeout{% + [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]% + }% + }% + \newcommand*{\StartTime}[1]{% + \renewcommand*{\TimeDescription}{#1}% + \pdfresettimer + }% + \newcommand*{\TimeDescription}{}% + \newcommand*{\StopTime}{% + \TestTime=\pdfelapsedtime + \global\advance\SummaryTime\TestTime + \PrintTime\TimeDescription\TestTime + }% + \let\saved@qstest\qstest + \let\saved@endqstest\endqstest + \def\qstest#1#2{% + \saved@qstest{#1}{#2}% + \StartTime{#1}% + }% + \def\endqstest{% + \StopTime + \saved@endqstest + }% + \AtEndDocument{% + \PrintTime{summary}\SummaryTime + }% + \makeatother +\fi +\makeatletter +\def\@makeactive#1{% + \catcode`#1=13\relax +} +\@makeactive\, +\def,{\errmessage{COMMA}} +\@makeother\, +\@makeactive\= +\def={\errmessage{EQUALS}} +\@makeother\= + +\begin{qstest}{normalize}{normalize,active-chars,space-removal}% + \def\Test#1#2{% + \@makeother\,% + \@makeother\=% + \scantokens{\toks@={#2}}% + \edef\Result{\the\toks@}% + \@makeother\,% + \@makeother\=% + \@Test{#1}% + \@makeactive\,% + \@Test{#1}% + \@makeactive\=% + \@Test{#1}% + \@makeother\,% + \@Test{#1}% + \@makeother\=% + }% + \def\@Test#1{% + \scantokens{\kv@normalize{#1}}% + \expandafter\expandafter\expandafter\Expect + \expandafter\expandafter\expandafter + {\expandafter\kv@list\expandafter}\expandafter{\Result}% + \Expect*{\ifx\kv@list\Result true\else false\fi}{true}% + }% + \Test{}{,}% + \Test{,}{,}% + \Test{,,}{,}% + \Test{,,,}{,}% + \Test{ , }{,}% + \Test{{a}}{,{a},}% + \Test{,{a}}{,{a},}% + \Test{{a},}{,{a},}% + \Test{{a},{b}}{,{a},{b},}% + \Test{{b}={c},{}=,{}={},{d}=}{,{b}={c},{}=,{}={},{d}=,}% + \Test{{}}{,{},}% + \Test{{},{},{}}{,{},{},{},}% + \Test{=}{,=,}% + \Test{=,=,=}{,=,=,=,}% + \def\TestSet#1{% + \Test{#1#1}{,}% + \Test{#1#1,#1#1}{,}% + \Test{#1#1,#1#1,#1#1}{,}% + \Test{#1#1#1#1#1}{,}% + \Test{{a}#1#1=#1#1{b}}{,{a}={b},}% + }% + \TestSet{ }% + \begingroup + \let\saved@normalize\kv@normalize + \def\kv@normalize#1{% + \saved@normalize{#1}% + \@onelevel@sanitize\kv@list + \@onelevel@sanitize\Result + }% + \Test{#,#=#,{#}={#},{#}=,{#}}{,#,#=#,{#}={#},{#}=,{#},}% + \endgroup + \begingroup + \def\Test#1#2{% + \edef\Result{#2}% + \@Test{#1}% + }% + \Test{{ a = b }}{,{ a = b },}% + \@makeactive\,% + \Test{{,}}{\string,{\noexpand,}\string,}% + \@makeother\,% + \@makeactive\=% + \Test{a={=}}{,a\string={\noexpand=},}% + \endgroup + \Test{a=b}{,a=b,}% + \Test{a={b}}{,a={b},}% + \Test{a ={b}}{,a={b},}% + \Test{a= {b}}{,a={b},}% + \Test{a = {b}}{,a={b},}% + \Test{a = {b} ,}{,a={b},}% + \Test{a}{,a,}% + \Test{ a}{,a,}% + \Test{a }{,a,}% + \Test{ a }{,a,}% + \Test{, a ,}{,a,}% + \Test{, a b ,}{,a b,}% + \Test{,a ,}{,a,}% + \Test{ a =}{,a=,}% + \Test{ a = }{,a=,}% + \Test{a =}{,a=,}% + \Test{{a} =}{,{a}=,}% + \Test{{a}= {}}{,{a}={},}% + \Test{, a = {}}{,a={},}% + \Test{a,,b}{,a,b,}% + \Test{a=\fi}{,a=\fi,}% + \Test{a=\iffalse}{,a=\iffalse,}% + \Test{a=\iffalse,b=\fi}{,a=\iffalse,b=\fi,}% +\end{qstest} + +\begin{qstest}{parse}{parse,brace-removal} + \def\Processor#1#2{% + \expandafter\Expect\expandafter{\kv@key}{#1}% + \toks@{#2}% + \edef\x{\the\toks@}% + \ifx\kv@value\relax + \Expect*{\the\toks@}{}% + \def\Value{<>}% + \else + \edef\Value{[\the\toks@]}% + \@onelevel@sanitize\Value + \fi + \toks@{#1}% + \ifx\Result\@empty + \edef\Result{[\the\toks@]=\Value}% + \else + \edef\Result{\Result,[\the\toks@]=\Value}% + \fi + \@onelevel@sanitize\Result + }% + \def\Test#1#2{% + \let\Result\@empty + \kv@parse{#1}\Processor + \Expect*{\Result}{#2}% + }% + \Test{}{}% + \Test{{}}{}% + \Test{{{}}}{[]=<>}% + \Test{{{{}}}}{[{}]=<>}% + \Test{a}{[a]=<>}% + \Test{{a}}{[a]=<>}% + \Test{{a}}{[a]=<>}% + \Test{{{a}}}{[a]=<>}% + \Test{{{{a}}}}{[{a}]=<>}% + \Test{a=}{[a]=[]}% + \Test{{a}=}{[a]=[]}% + \Test{{{a}}=}{[{a}]=[]}% + \Test{a={}}{[a]=[]}% + \Test{{a}={{}}}{[a]=[{}]}% + \Test{a=b}{[a]=[b]}% + \Test{a=\fi}{[a]=[\fi]}% + \Test{a=\iffalse}{[a]=[\iffalse]}% + \Test{a=\iffalse,b=\fi}{[a]=[\iffalse],[b]=[\fi]}% + \Test{{ a = b }}{[ a ]=[ b ]}% + \Test{{{ a = b }}}{[ a = b ]=<>}% +\end{qstest} + +\begin{qstest}{comma}{comma,parse} + \def\Processor#1{% + \expandafter\Expect\expandafter{\comma@entry}{#1}% + \toks@{#1}% + \ifx\Result\@empty + \edef\Result{[\the\toks@]}% + \else + \edef\Result{\Result,[\the\toks@]}% + \fi + \@onelevel@sanitize\Result + }% + \def\Test#1#2{% + \let\Result\@empty + \comma@parse{#1}\Processor + \Expect*{\Result}{#2}% + }% +\tracingmacros=1 + \Test{}{}% + \Test{{}}{}% + \Test{{{}}}{[{}]}% + \Test{a}{[a]}% + \Test{{a}}{[a]}% + \Test{{{a}}}{[{a}]}% + \Test{a=}{[a=]}% + \Test{a\fi}{[a\fi]}% + \Test{a\iffalse}{[a\iffalse]}% + \Test{\iffalse,\fi}{[\iffalse],[\fi]}% + \Test{ a , b , c }{[a],[b],[c]}% + \Test{ { } ,{ }, { }, { } , { } }{[ ],[ ],[ ],[ ],[ ]}% + \Test{ {{}} ,{{}}, {{}}, {{}} , {{}} }{[{}],[{}],[{}],[{}],[{}]}% +\end{qstest} + +\begin{document} +\end{document} +\endinput +%% +%% End of file `kvsetkeys-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test1.tex new file mode 100644 index 00000000000..009a172b75d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test1.tex @@ -0,0 +1,77 @@ +%% +%% This is file `listingsutf8-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listingsutf8.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 listingsutf8.dtx +%% and the derived files +%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv, +%% listingsutf8-test1.tex, listingsutf8-test2.tex, +%% listingsutf8-test3.tex, listingsutf8-test4.tex, +%% listingsutf8-test5.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{listingsutf8}[2007/10/22]\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `listingsutf8-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test2.tex new file mode 100644 index 00000000000..9c063c43c93 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test2.tex @@ -0,0 +1,66 @@ +%% +%% This is file `listingsutf8-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listingsutf8.dtx (with options: `test2,utf8') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 listingsutf8.dtx +%% and the derived files +%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv, +%% listingsutf8-test1.tex, listingsutf8-test2.tex, +%% listingsutf8-test3.tex, listingsutf8-test4.tex, +%% listingsutf8-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{filecontents} +\def\do#1{% + \ifx#1\^% + \else + \noexpand\do\noexpand#1% + \fi +} +\expandafter\let\expandafter\dospecials\expandafter\empty +\expandafter\edef\expandafter\dospecials\expandafter{\dospecials} +\begin{filecontents*}{ExampleUTF8.java} +public class ExampleUTF8 { + public static String testString = + "Umlauts: " + + "^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f"; + public static void main(String[] args) { + System.out.println(testString); + } +} +\end{filecontents*} +\usepackage{listingsutf8}[2007/10/22] +\def\Text{% + Umlauts: % + ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f% +} +\begin{document} +\lstinputlisting[% + language=Java,% + inputencoding=utf8/latin1,% +]{ExampleUTF8.java} +\end{document} +\endinput +%% +%% End of file `listingsutf8-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test3.tex new file mode 100644 index 00000000000..5e56c610dbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test3.tex @@ -0,0 +1,34 @@ +%% +%% This is file `listingsutf8-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listingsutf8.dtx (with options: `test3,utf8x') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 listingsutf8.dtx +%% and the derived files +%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv, +%% listingsutf8-test1.tex, listingsutf8-test2.tex, +%% listingsutf8-test3.tex, listingsutf8-test4.tex, +%% listingsutf8-test5.tex. +%% +\endinput +%% +%% End of file `listingsutf8-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test4.tex new file mode 100644 index 00000000000..a10cddd78f7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test4.tex @@ -0,0 +1,34 @@ +%% +%% This is file `listingsutf8-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listingsutf8.dtx (with options: `test4,utf8,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 listingsutf8.dtx +%% and the derived files +%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv, +%% listingsutf8-test1.tex, listingsutf8-test2.tex, +%% listingsutf8-test3.tex, listingsutf8-test4.tex, +%% listingsutf8-test5.tex. +%% +\endinput +%% +%% End of file `listingsutf8-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test5.tex new file mode 100644 index 00000000000..20b6887a650 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/listingsutf8-test5.tex @@ -0,0 +1,34 @@ +%% +%% This is file `listingsutf8-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listingsutf8.dtx (with options: `test5,utf8x,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 listingsutf8.dtx +%% and the derived files +%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv, +%% listingsutf8-test1.tex, listingsutf8-test2.tex, +%% listingsutf8-test3.tex, listingsutf8-test4.tex, +%% listingsutf8-test5.tex. +%% +\endinput +%% +%% End of file `listingsutf8-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test1.tex new file mode 100644 index 00000000000..531c7b9114f --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test1.tex @@ -0,0 +1,73 @@ +%% +%% This is file `pdfcol-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcol.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcol.dtx +%% and the derived files +%% pdfcol.sty, pdfcol.pdf, pdfcol.ins, pdfcol.drv, +%% pdfcol-test1.tex, pdfcol-test2.tex, pdfcol-test3.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input pdfcol.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `pdfcol-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test2.tex new file mode 100644 index 00000000000..98a4e6e52f1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test2.tex @@ -0,0 +1,53 @@ +%% +%% This is file `pdfcol-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcol.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcol.dtx +%% and the derived files +%% pdfcol.sty, pdfcol.pdf, pdfcol.ins, pdfcol.drv, +%% pdfcol-test1.tex, pdfcol-test2.tex, pdfcol-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\usepackage{pdfcol}[2007/09/09] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\begin{document} + \begin{qstest}{pdfcol}{}% + \makeatletter + \Expect*{\ifpdfcolAvailable true\else false\fi}{false}% + \setbox0=\hbox{% + \pdfcolInitStack{test}% + \pdfcolSwitchStack{test}% + \pdfcolSetCurrent{test}% + \pdfcolSetCurrent{}% + }% + \Expect*{\the\wd0}{0.0pt}% + \Expect*{\pdfcolIfStackExists{dummy}{true}{false}}{false}% + \end{qstest}% +\end{document} +\endinput +%% +%% End of file `pdfcol-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test3.tex new file mode 100644 index 00000000000..027ad453882 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcol-test3.tex @@ -0,0 +1,60 @@ +%% +%% This is file `pdfcol-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcol.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcol.dtx +%% and the derived files +%% pdfcol.sty, pdfcol.pdf, pdfcol.ins, pdfcol.drv, +%% pdfcol-test1.tex, pdfcol-test2.tex, pdfcol-test3.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{article} +\usepackage{pdfcol}[2007/09/09] +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\begin{document} + \begin{qstest}{pdfcol}{}% + \makeatletter + \Expect*{\ifpdfcolAvailable true\else false\fi}{true}% + \Expect*{\number\@pdfcolorstack}{0}% + \setbox0=\hbox{% + \pdfcolInitStack{test}% + \Expect*{\number\pdfcol@Stack@test}{1}% + \Expect*{\number\@pdfcolorstack}{0}% + \pdfcolSwitchStack{test}% + \Expect*{\number\@pdfcolorstack}{1}% + \pdfcolSetCurrent{test}% + \pdfcolSetCurrent{}% + }% + \Expect*{\the\wd0}{0.0pt}% + \Expect*{\number\@pdfcolorstack}{0}% + \Expect*{\number\pdfcol@Stack@test}{1}% + \Expect*{\pdfcolIfStackExists{test}{true}{false}}{true}% + \Expect*{\pdfcolIfStackExists{dummy}{true}{false}}{false}% + \end{qstest}% +\end{document} +\endinput +%% +%% End of file `pdfcol-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolfoot-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolfoot-test1.tex new file mode 100644 index 00000000000..5ea5fc5e585 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolfoot-test1.tex @@ -0,0 +1,52 @@ +%% +%% This is file `pdfcolfoot-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcolfoot.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcolfoot.dtx +%% and the derived files +%% pdfcolfoot.sty, pdfcolfoot.pdf, pdfcolfoot.ins, pdfcolfoot.drv, +%% pdfcolfoot-test1.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\AtEndDocument{% + \typeout{}% + \typeout{**************************************}% + \typeout{*** \space Check the PDF file manually! \space ***}% + \typeout{**************************************}% + \typeout{}% +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfcompresslevel\endcsname\relax +\else + \pdfcompresslevel=0 % +\fi +\documentclass[12pt,a5paper]{article} +\usepackage{pdfcolfoot}[2007/09/09] +\dimen\footins=\baselineskip % for testing +\begin{document} + Black\footnote{Black \textcolor{blue}{Blue\\Blue} Black} % + \textcolor{red}{Red\newpage Red} Black% +\end{document} +\endinput +%% +%% End of file `pdfcolfoot-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparallel-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparallel-test1.tex new file mode 100644 index 00000000000..d15d2454c5d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparallel-test1.tex @@ -0,0 +1,79 @@ +%% +%% This is file `pdfcolparallel-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcolparallel.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcolparallel.dtx +%% and the derived files +%% pdfcolparallel.sty, pdfcolparallel.pdf, pdfcolparallel.ins, pdfcolparallel.drv, +%% pdfcolparallel-test1.tex. +%% +\AtEndDocument{% + \typeout{}% + \typeout{**************************************}% + \typeout{*** \space Check the PDF file manually! \space ***}% + \typeout{**************************************}% + \typeout{}% +} +\documentclass{article} +\usepackage{xcolor} +\usepackage{pdfcolparallel}[2007/09/09] + +\begin{document} + \color{green}% + Green% + \begin{Parallel}{0.47\textwidth}{0.47\textwidth}% + \ParallelLText{% + \textcolor{red}{% + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll.% + }% + }% + \ParallelRText{% + \textcolor{blue}{% + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll.% + }% + }% + \end{Parallel}% + Green% + \begin{Parallel}[p]{\textwidth}{\textwidth}% + \ParallelLText{% + \textcolor{red}{% + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Foo bar bla bla bla.% + }% + }% + \ParallelRText{% + \textcolor{blue}{% + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Ein Absatz, der sich ueber zwei Zeilen erstrecken soll. % + Foo bar bla bla bla.% + }% + }% + \end{Parallel}% + Green% +\end{document} +\endinput +%% +%% End of file `pdfcolparallel-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparcolumns-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparcolumns-test1.tex new file mode 100644 index 00000000000..531fe69027e --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfcolparcolumns-test1.tex @@ -0,0 +1,73 @@ +%% +%% This is file `pdfcolparcolumns-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfcolparcolumns.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfcolparcolumns.dtx +%% and the derived files +%% pdfcolparcolumns.sty, pdfcolparcolumns.pdf, pdfcolparcolumns.ins, pdfcolparcolumns.drv, +%% pdfcolparcolumns-test1.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\AtEndDocument{% + \typeout{}% + \typeout{**************************************}% + \typeout{*** \space Check the PDF file manually! \space ***}% + \typeout{**************************************}% + \typeout{}% +} +\documentclass{article} +\usepackage{xcolor} +\usepackage{pdfcolparcolumns} + +\newcommand{\instruct}[1]{% + \noindent + \footnotesize + \textcolor{red}{#1}% +} + +\begin{document} + \begin{parcolumns}[colwidths={1=2.3in,2=2.3in},sloppy]{2}% + \colchunk[1]{% + \instruct{Et non dicitur versus} % + Fidelium anim\ae\ % + \instruct{% + sed immediate subiungitur antiphona finalis % + beat\ae\ Mari\ae\ Virginis% + } % + 100.% + }% + \colchunk[2]{% + \instruct{% + And the verse % + \textcolor{black}{May the souls of the faithful} % + is not said, but the final antiphon of the % + Blessed Virgin Mary, % + \textcolor{black}{100,} % + is immediately joined.% + }% + }% + \end{parcolumns}% +\end{document} +\endinput +%% +%% End of file `pdfcolparcolumns-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test1.tex new file mode 100644 index 00000000000..ff1f9fc9d3a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `pdfescape-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfescape.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfescape.dtx +%% and the derived files +%% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv, +%% pdfescape-test1.tex, pdfescape-test2.tex, +%% pdfescape-test3.tex, pdfescape-test4.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input pdfescape.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `pdfescape-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test2.tex new file mode 100644 index 00000000000..2f5df20991b --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test2.tex @@ -0,0 +1,387 @@ +%% +%% This is file `pdfescape-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfescape.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfescape.dtx +%% and the derived files +%% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv, +%% pdfescape-test1.tex, pdfescape-test2.tex, +%% pdfescape-test3.tex, pdfescape-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\makeatletter +\ProvidesFile{pdfescape-test1.tex}% + [2007/09/09 v1.6 Test with \string\pdfescape... commands]% +\@ifundefined{pdfescapehex}{% + \PackageError{pdfescape-test1}{% + Missing \string\pdfescape... commands% + }{Test aborted.}% + \stop +}{} +\RequirePackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\newcommand*{\ExpectVar}[2]{% + \ifx#1#2% + \else + \begingroup + \@onelevel@sanitize#1% + \@onelevel@sanitize#2% + \typeout{[#1] <> [#2]}% hash-ok + \endgroup + \fi + \Expect*{\ifx#1#2true\else false\fi}{true}% +} + +\makeatletter +\begingroup + \gdef\AllBytes{}% + \count@=0 % + \catcode0=12 % + \@whilenum\count@<256 \do{% + \lccode0=\count@ + \ifnum\count@=32 % + \xdef\AllBytes{\AllBytes\space}% + \else + \lowercase{% + \xdef\AllBytes{\AllBytes^^@}% + }% + \fi + \advance\count@ by 1 % + }% +\endgroup +\newcommand*{\AllBytesHex}{% + 000102030405060708090A0B0C0D0E0F% + 101112131415161718191A1B1C1D1E1F% + 202122232425262728292A2B2C2D2E2F% + 303132333435363738393A3B3C3D3E3F% + 404142434445464748494A4B4C4D4E4F% + 505152535455565758595A5B5C5D5E5F% + 606162636465666768696A6B6C6D6E6F% + 707172737475767778797A7B7C7D7E7F% + 808182838485868788898A8B8C8D8E8F% + 909192939495969798999A9B9C9D9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAF% + B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF% + D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF% + F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\@onelevel@sanitize\AllBytesHex +\expandafter\lowercase\expandafter{% + \expandafter\newcommand\expandafter*\expandafter\AllBytesHexLC + \expandafter{\AllBytesHex}% +} +\newcommand*{\AllBytesName}{} +\begingroup + \catcode`\#=12 % + \xdef\AllBytesName{% + #01#02#03#04#05#06#07#08#09#0A#0B#0C#0D#0E#0F% + #10#11#12#13#14#15#16#17#18#19#1A#1B#1C#1D#1E#1F% + #20!"#23$#25&'#28#29*+,-.#2F% + 0123456789:;#3C=#3E?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ#5B\@backslashchar#5D^_% + `abcdefghijklmno% + pqrstuvwxyz#7B|#7D\string~#7F% + #80#81#82#83#84#85#86#87#88#89#8A#8B#8C#8D#8E#8F% + #90#91#92#93#94#95#96#97#98#99#9A#9B#9C#9D#9E#9F% + #A0#A1#A2#A3#A4#A5#A6#A7#A8#A9#AA#AB#AC#AD#AE#AF% + #B0#B1#B2#B3#B4#B5#B6#B7#B8#B9#BA#BB#BC#BD#BE#BF% + #C0#C1#C2#C3#C4#C5#C6#C7#C8#C9#CA#CB#CC#CD#CE#CF% + #D0#D1#D2#D3#D4#D5#D6#D7#D8#D9#DA#DB#DC#DD#DE#DF% + #E0#E1#E2#E3#E4#E5#E6#E7#E8#E9#EA#EB#EC#ED#EE#EF% + #F0#F1#F2#F3#F4#F5#F6#F7#F8#F9#FA#FB#FC#FD#FE#FF% + }% +\endgroup +\@onelevel@sanitize\AllBytesName + +\newcommand*{\AllBytesString}{} +\begingroup + \def\|{|}% + \edef\%{\@percentchar}% + \catcode`\|=0 % + \catcode`\#=12 % + \catcode`\~=12 % + \catcode`\\=12 % + |xdef|AllBytesString{% + \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017% + \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037% + \040!"#$|%&'\(\)*+,-./% + 0123456789:;<=>?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ[\\]^_% + `abcdefghijklmno% + pqrstuvwxyz{||}~\177% + \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217% + \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237% + \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257% + \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277% + \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317% + \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337% + \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357% + \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377% + }% +|endgroup +\@onelevel@sanitize\AllBytesString + +\RequirePackage{pdfescape} + +\begin{qstest}{all-hex}{\AllBytes, escapehex} + \EdefEscapeHex\x{\AllBytes}% + \Expect*{\x}*{\AllBytesHex}% + \ExpectVar\x\AllBytesHex +\end{qstest} + +\begin{qstest}{all-unhex}{\AllBytesHex, unescapehex} + \EdefUnescapeHex\x{\AllBytesHex}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{all-unhex-lc}{\AllBytesHexLC, unescapehex, lowercase} + \EdefUnescapeHex\x{\AllBytesHexLC}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{unhex-incomplete}{unescapehex, incomplete} + \EdefUnescapeHex\x{4}% + \Expect*{\x}{@}% +\end{qstest} + +\begin{qstest}{unhex-space}{unescapehex, space} + \EdefUnescapeHex\x{20}% + \Expect*{\x}{ }% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-spaces}{unescapehex, spaces} + \EdefUnescapeHex\x{204020204120}% + \def\y#1{% + \edef\z{#1\string @#1#1\string A#1}% + }\y{ }% + \Expect*{\x}*{\z}% + \ExpectVar\x\z +\end{qstest} + +\begin{qstest}{unhex-hash}{unescapehex, hash} + \catcode`\#=12 % + \EdefUnescapeHex\x{#20}% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-invalid}{unescapehex, invalid} + \def\test#1#2{% + \EdefUnescapeHex\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \edef\x{\pdfunescapehex{4X}}% + \edef\y{\string @}% + \ifx\x\y + \else + \def~{\space}% + \typeout{************************************}% + \typeout{* Your pdfTeX contains bug 777.~~~~*}% + \typeout{* This test is redefined as dummy, *}% + \typeout{* because it triggers the bug.~~~~~*}% + \typeout{************************************}% + \def\test#1#2{}% + \fi + \test{X}{}% + \test{XY}{}% + \test{XYZ}{}% + \test{A}{^^a0}% + \test{AX}{^^a0}% + \test{XA}{^^a0}% + \test{XXAXX}{^^a0}% +\end{qstest} + +\begin{qstest}{all-name}{\AllBytes, escapename} + \EdefEscapeName\x{\AllBytes}% + \Expect*{\x}*{\AllBytesName}% + \ExpectVar\x\AllBytesName +\end{qstest} + +\begin{qstest}{all-string}{\AllBytes, escapestring} + \EdefEscapeString\x{\AllBytes}% + \Expect*{\x}*{\AllBytesString}% + \ExpectVar\x\AllBytesString +\end{qstest} + +\begin{qstest}{uchexdigit}{unescape, uppercase hex digit} + \catcode`\@=11 % + \catcode0=12 % + \def\test#1#2{% + \uccode0=#1\relax + \uppercase{% + \def\x{^^@}% + }% + \Expect*{% + \ifcase\expandafter\PE@TestUcHexDigit\x + true% + \else + false% + \fi + }{#2}% + }% + \def\range#1#2#3{% + \count0=#1\relax + \loop + \ifnum\count0<#2\relax + \test{\count0}{#3}% + \advance\count0 by 1 % + \repeat + }% + \range{0}{47}{false}% + \range{48}{57}{true}% + \range{58}{64}{false}% + \range{65}{70}{true}% + \range{71}{255}{false}% +\end{qstest} + +\begin{qstest}{unescapename}{unescapename} + \def\test#1#2{% + \EdefUnescapeName\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode`\#=12 % + \catcode0=12 % + \test{}{}% + \test{x}{x}% + \test{xy}{xy}% + \test{#}{#}% + \test{##}{##}% + \test{###}{###}% + \test{####}{####}% + \test{#x}{#x}% + \test{#xy}{#xy}% + \test{#1}{#1}% + \test{#40}{@}% + \test{#400}{@0}% + \test{#4x0}{#4x0}% + \test{#ab}{^^ab}% + \test{#00}{^^@}% + \test{x#40y#40z}{x@y@z}% + \test{#40#40#40#40}{@@@@}% + \test{a#x}{a#x}% + \test{a#xy}{a#xy}% + \test{a#1}{a#1}% + \test{a#40}{a@}% + \test{a#400}{a@0}% + \test{#20}{ }% + \test{a#20}{a }% + \test{a#20b}{a b}% + \test{a#20#20#20b}{a \space\space b}% +\end{qstest} + +\begin{qstest}{unescapestring}{unescapestring} + \def\test#1#2{% + \EdefUnescapeString\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode0=12 % + \def\DefChar#1#2{% + \begingroup + \uccode0=#2\relax + \uppercase{\endgroup + \def#1{^^@}% + }% + }% + \DefChar\nul{0}% + \DefChar\one{1}% + \DefChar\bel{8}% + \DefChar\tab{9}% + \DefChar\lf{10}% + \DefChar\ff{12}% + \DefChar\cr{13}% + \DefChar\\{92}% + \test{}{}% + \test{a}{a}% + \test{\\}{}% + \test{\\\\}{\\}% + \test{\\\\y}{\\y}% + \test{\\000}{\nul}% + \test{\\b}{\bel}% + \test{\\t}{\tab}% + \test{\\n}{\lf}% + \test{\\f}{\ff}% + \test{\\r}{\cr}% + \test{\\(}{(}% + \test{\\)}{)}% + \test{\\040}{ }% + \test{\\100}{@}% + \test{\\40}{ }% + \test{\\1}{\one}% + \test{\\01}{\one}% + \test{\\001}{\one}% + \test{\\18}{\one8}% + \test{\\018}{\one8}% + \test{\\0018}{\one8}% + \test{x\\}{x}% + \test{x\\\\}{x\\}% + \test{x\\\\y}{x\\y}% + \test{x\\000}{x\nul}% + \test{x\\b}{x\bel}% + \test{x\\t}{x\tab}% + \test{x\\n}{x\lf}% + \test{x\\f}{x\ff}% + \test{x\\r}{x\cr}% + \test{x\\(}{x(}% + \test{x\\)}{x)}% + \test{x\\040}{x }% + \test{x\\100}{x@}% + \test{x\\40}{x }% + \test{x\\1}{x\one}% + \test{x\\01}{x\one}% + \test{x\\001}{x\one}% + \test{x\\18}{x\one8}% + \test{x\\018}{x\one8}% + \test{x\\0018}{x\one8}% + \test{\\b\\t\\n\\f\\r\\(\\)\\\\\\000\\040}{% + \bel\tab\lf\ff\cr()\\\nul\space + }% + \test{\\\lf}{}% + \test{x\\\lf}{x}% + \test{\cr}{\lf}% + \test{\cr\lf}{\lf}% + \test{\lf}{\lf}% + \test{\lf\cr}{\lf\lf}% + \test{x\cr}{x\lf}% + \test{x\cr\lf}{x\lf}% + \test{x\lf}{x\lf}% + \test{x\lf\cr}{x\lf\lf}% + \test{x\\\cr\lf y\cr}{xy\lf}% +\end{qstest} +\stop +\endinput +%% +%% End of file `pdfescape-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test3.tex new file mode 100644 index 00000000000..3559f6d91ce --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test3.tex @@ -0,0 +1,379 @@ +%% +%% This is file `pdfescape-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfescape.dtx (with options: `test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfescape.dtx +%% and the derived files +%% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv, +%% pdfescape-test1.tex, pdfescape-test2.tex, +%% pdfescape-test3.tex, pdfescape-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\makeatletter +\ProvidesFile{pdfescape-test2.tex}% + [2007/09/09 v1.6 Test without \string\pdfescape..., with e-TeX]% +\let\pdfescapehex\@undefined +\let\pdfunescapehex\@undefined +\let\pdfescapename\@undefined +\let\pdfescapestring\@undefined +\@ifundefined{numexpr}{% + \PackageError{pdfescape-test2}{% + Missing \eTeX + }{Test aborted.}% + \stop +}{} +\RequirePackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\newcommand*{\ExpectVar}[2]{% + \ifx#1#2% + \else + \begingroup + \@onelevel@sanitize#1% + \@onelevel@sanitize#2% + \typeout{[#1] <> [#2]}% hash-ok + \endgroup + \fi + \Expect*{\ifx#1#2true\else false\fi}{true}% +} + +\makeatletter +\begingroup + \gdef\AllBytes{}% + \count@=0 % + \catcode0=12 % + \@whilenum\count@<256 \do{% + \lccode0=\count@ + \ifnum\count@=32 % + \xdef\AllBytes{\AllBytes\space}% + \else + \lowercase{% + \xdef\AllBytes{\AllBytes^^@}% + }% + \fi + \advance\count@ by 1 % + }% +\endgroup +\newcommand*{\AllBytesHex}{% + 000102030405060708090A0B0C0D0E0F% + 101112131415161718191A1B1C1D1E1F% + 202122232425262728292A2B2C2D2E2F% + 303132333435363738393A3B3C3D3E3F% + 404142434445464748494A4B4C4D4E4F% + 505152535455565758595A5B5C5D5E5F% + 606162636465666768696A6B6C6D6E6F% + 707172737475767778797A7B7C7D7E7F% + 808182838485868788898A8B8C8D8E8F% + 909192939495969798999A9B9C9D9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAF% + B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF% + D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF% + F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\@onelevel@sanitize\AllBytesHex +\expandafter\lowercase\expandafter{% + \expandafter\newcommand\expandafter*\expandafter\AllBytesHexLC + \expandafter{\AllBytesHex}% +} +\newcommand*{\AllBytesName}{} +\begingroup + \catcode`\#=12 % + \xdef\AllBytesName{% + #01#02#03#04#05#06#07#08#09#0A#0B#0C#0D#0E#0F% + #10#11#12#13#14#15#16#17#18#19#1A#1B#1C#1D#1E#1F% + #20!"#23$#25&'#28#29*+,-.#2F% + 0123456789:;#3C=#3E?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ#5B\@backslashchar#5D^_% + `abcdefghijklmno% + pqrstuvwxyz#7B|#7D\string~#7F% + #80#81#82#83#84#85#86#87#88#89#8A#8B#8C#8D#8E#8F% + #90#91#92#93#94#95#96#97#98#99#9A#9B#9C#9D#9E#9F% + #A0#A1#A2#A3#A4#A5#A6#A7#A8#A9#AA#AB#AC#AD#AE#AF% + #B0#B1#B2#B3#B4#B5#B6#B7#B8#B9#BA#BB#BC#BD#BE#BF% + #C0#C1#C2#C3#C4#C5#C6#C7#C8#C9#CA#CB#CC#CD#CE#CF% + #D0#D1#D2#D3#D4#D5#D6#D7#D8#D9#DA#DB#DC#DD#DE#DF% + #E0#E1#E2#E3#E4#E5#E6#E7#E8#E9#EA#EB#EC#ED#EE#EF% + #F0#F1#F2#F3#F4#F5#F6#F7#F8#F9#FA#FB#FC#FD#FE#FF% + }% +\endgroup +\@onelevel@sanitize\AllBytesName + +\newcommand*{\AllBytesString}{} +\begingroup + \def\|{|}% + \edef\%{\@percentchar}% + \catcode`\|=0 % + \catcode`\#=12 % + \catcode`\~=12 % + \catcode`\\=12 % + |xdef|AllBytesString{% + \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017% + \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037% + \040!"#$|%&'\(\)*+,-./% + 0123456789:;<=>?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ[\\]^_% + `abcdefghijklmno% + pqrstuvwxyz{||}~\177% + \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217% + \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237% + \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257% + \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277% + \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317% + \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337% + \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357% + \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377% + }% +|endgroup +\@onelevel@sanitize\AllBytesString + +\RequirePackage{pdfescape} + +\begin{qstest}{all-hex}{\AllBytes, escapehex} + \EdefEscapeHex\x{\AllBytes}% + \Expect*{\x}*{\AllBytesHex}% + \ExpectVar\x\AllBytesHex +\end{qstest} + +\begin{qstest}{all-unhex}{\AllBytesHex, unescapehex} + \EdefUnescapeHex\x{\AllBytesHex}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{all-unhex-lc}{\AllBytesHexLC, unescapehex, lowercase} + \EdefUnescapeHex\x{\AllBytesHexLC}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{unhex-incomplete}{unescapehex, incomplete} + \EdefUnescapeHex\x{4}% + \Expect*{\x}{@}% +\end{qstest} + +\begin{qstest}{unhex-space}{unescapehex, space} + \EdefUnescapeHex\x{20}% + \Expect*{\x}{ }% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-spaces}{unescapehex, spaces} + \EdefUnescapeHex\x{204020204120}% + \def\y#1{% + \edef\z{#1\string @#1#1\string A#1}% + }\y{ }% + \Expect*{\x}*{\z}% + \ExpectVar\x\z +\end{qstest} + +\begin{qstest}{unhex-hash}{unescapehex, hash} + \catcode`\#=12 % + \EdefUnescapeHex\x{#20}% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-invalid}{unescapehex, invalid} + \def\test#1#2{% + \EdefUnescapeHex\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \test{X}{}% + \test{XY}{}% + \test{XYZ}{}% + \test{A}{^^a0}% + \test{AX}{^^a0}% + \test{XA}{^^a0}% + \test{XXAXX}{^^a0}% +\end{qstest} + +\begin{qstest}{all-name}{\AllBytes, escapename} + \EdefEscapeName\x{\AllBytes}% + \Expect*{\x}*{\AllBytesName}% + \ExpectVar\x\AllBytesName +\end{qstest} + +\begin{qstest}{all-string}{\AllBytes, escapestring} + \EdefEscapeString\x{\AllBytes}% + \Expect*{\x}*{\AllBytesString}% + \ExpectVar\x\AllBytesString +\end{qstest} + +\begin{qstest}{uchexdigit}{unescape, uppercase hex digit} + \catcode`\@=11 % + \catcode0=12 % + \def\test#1#2{% + \uccode0=#1\relax + \uppercase{% + \def\x{^^@}% + }% + \Expect*{% + \ifcase\expandafter\PE@TestUcHexDigit\x + true% + \else + false% + \fi + }{#2}% + }% + \def\range#1#2#3{% + \count0=#1\relax + \loop + \ifnum\count0<#2\relax + \test{\count0}{#3}% + \advance\count0 by 1 % + \repeat + }% + \range{0}{47}{false}% + \range{48}{57}{true}% + \range{58}{64}{false}% + \range{65}{70}{true}% + \range{71}{255}{false}% +\end{qstest} + +\begin{qstest}{unescapename}{unescapename} + \def\test#1#2{% + \EdefUnescapeName\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode`\#=12 % + \catcode0=12 % + \test{}{}% + \test{x}{x}% + \test{xy}{xy}% + \test{#}{#}% + \test{##}{##}% + \test{###}{###}% + \test{####}{####}% + \test{#x}{#x}% + \test{#xy}{#xy}% + \test{#1}{#1}% + \test{#40}{@}% + \test{#400}{@0}% + \test{#4x0}{#4x0}% + \test{#ab}{^^ab}% + \test{#00}{^^@}% + \test{x#40y#40z}{x@y@z}% + \test{#40#40#40#40}{@@@@}% + \test{a#x}{a#x}% + \test{a#xy}{a#xy}% + \test{a#1}{a#1}% + \test{a#40}{a@}% + \test{a#400}{a@0}% + \test{#20}{ }% + \test{a#20}{a }% + \test{a#20b}{a b}% + \test{a#20#20#20b}{a \space\space b}% +\end{qstest} + +\begin{qstest}{unescapestring}{unescapestring} + \def\test#1#2{% + \EdefUnescapeString\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode0=12 % + \def\DefChar#1#2{% + \begingroup + \uccode0=#2\relax + \uppercase{\endgroup + \def#1{^^@}% + }% + }% + \DefChar\nul{0}% + \DefChar\one{1}% + \DefChar\bel{8}% + \DefChar\tab{9}% + \DefChar\lf{10}% + \DefChar\ff{12}% + \DefChar\cr{13}% + \DefChar\\{92}% + \test{}{}% + \test{a}{a}% + \test{\\}{}% + \test{\\\\}{\\}% + \test{\\\\y}{\\y}% + \test{\\000}{\nul}% + \test{\\b}{\bel}% + \test{\\t}{\tab}% + \test{\\n}{\lf}% + \test{\\f}{\ff}% + \test{\\r}{\cr}% + \test{\\(}{(}% + \test{\\)}{)}% + \test{\\040}{ }% + \test{\\100}{@}% + \test{\\40}{ }% + \test{\\1}{\one}% + \test{\\01}{\one}% + \test{\\001}{\one}% + \test{\\18}{\one8}% + \test{\\018}{\one8}% + \test{\\0018}{\one8}% + \test{x\\}{x}% + \test{x\\\\}{x\\}% + \test{x\\\\y}{x\\y}% + \test{x\\000}{x\nul}% + \test{x\\b}{x\bel}% + \test{x\\t}{x\tab}% + \test{x\\n}{x\lf}% + \test{x\\f}{x\ff}% + \test{x\\r}{x\cr}% + \test{x\\(}{x(}% + \test{x\\)}{x)}% + \test{x\\040}{x }% + \test{x\\100}{x@}% + \test{x\\40}{x }% + \test{x\\1}{x\one}% + \test{x\\01}{x\one}% + \test{x\\001}{x\one}% + \test{x\\18}{x\one8}% + \test{x\\018}{x\one8}% + \test{x\\0018}{x\one8}% + \test{\\b\\t\\n\\f\\r\\(\\)\\\\\\000\\040}{% + \bel\tab\lf\ff\cr()\\\nul\space + }% + \test{\\\lf}{}% + \test{x\\\lf}{x}% + \test{\cr}{\lf}% + \test{\cr\lf}{\lf}% + \test{\lf}{\lf}% + \test{\lf\cr}{\lf\lf}% + \test{x\cr}{x\lf}% + \test{x\cr\lf}{x\lf}% + \test{x\lf}{x\lf}% + \test{x\lf\cr}{x\lf\lf}% + \test{x\\\cr\lf y\cr}{xy\lf}% +\end{qstest} +\stop +\endinput +%% +%% End of file `pdfescape-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test4.tex new file mode 100644 index 00000000000..6043b54bb89 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdfescape-test4.tex @@ -0,0 +1,379 @@ +%% +%% This is file `pdfescape-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdfescape.dtx (with options: `test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 pdfescape.dtx +%% and the derived files +%% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv, +%% pdfescape-test1.tex, pdfescape-test2.tex, +%% pdfescape-test3.tex, pdfescape-test4.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\makeatletter +\ProvidesFile{pdfescape-test3.tex}% + [2007/09/09 v1.6 Test without \string\pdfescape... and e-TeX]% +\let\pdfescapehex\@undefined +\let\pdfunescapehex\@undefined +\let\pdfescapename\@undefined +\let\pdfescapestring\@undefined +\RequirePackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\newcommand*{\ExpectVar}[2]{% + \ifx#1#2% + \else + \begingroup + \@onelevel@sanitize#1% + \@onelevel@sanitize#2% + \typeout{[#1] <> [#2]}% hash-ok + \endgroup + \fi + \Expect*{\ifx#1#2true\else false\fi}{true}% +} + +\makeatletter +\begingroup + \gdef\AllBytes{}% + \count@=0 % + \catcode0=12 % + \@whilenum\count@<256 \do{% + \lccode0=\count@ + \ifnum\count@=32 % + \xdef\AllBytes{\AllBytes\space}% + \else + \lowercase{% + \xdef\AllBytes{\AllBytes^^@}% + }% + \fi + \advance\count@ by 1 % + }% +\endgroup +\newcommand*{\AllBytesHex}{% + 000102030405060708090A0B0C0D0E0F% + 101112131415161718191A1B1C1D1E1F% + 202122232425262728292A2B2C2D2E2F% + 303132333435363738393A3B3C3D3E3F% + 404142434445464748494A4B4C4D4E4F% + 505152535455565758595A5B5C5D5E5F% + 606162636465666768696A6B6C6D6E6F% + 707172737475767778797A7B7C7D7E7F% + 808182838485868788898A8B8C8D8E8F% + 909192939495969798999A9B9C9D9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAF% + B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF% + D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF% + F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\@onelevel@sanitize\AllBytesHex +\expandafter\lowercase\expandafter{% + \expandafter\newcommand\expandafter*\expandafter\AllBytesHexLC + \expandafter{\AllBytesHex}% +} +\newcommand*{\AllBytesName}{} +\begingroup + \catcode`\#=12 % + \xdef\AllBytesName{% + #01#02#03#04#05#06#07#08#09#0A#0B#0C#0D#0E#0F% + #10#11#12#13#14#15#16#17#18#19#1A#1B#1C#1D#1E#1F% + #20!"#23$#25&'#28#29*+,-.#2F% + 0123456789:;#3C=#3E?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ#5B\@backslashchar#5D^_% + `abcdefghijklmno% + pqrstuvwxyz#7B|#7D\string~#7F% + #80#81#82#83#84#85#86#87#88#89#8A#8B#8C#8D#8E#8F% + #90#91#92#93#94#95#96#97#98#99#9A#9B#9C#9D#9E#9F% + #A0#A1#A2#A3#A4#A5#A6#A7#A8#A9#AA#AB#AC#AD#AE#AF% + #B0#B1#B2#B3#B4#B5#B6#B7#B8#B9#BA#BB#BC#BD#BE#BF% + #C0#C1#C2#C3#C4#C5#C6#C7#C8#C9#CA#CB#CC#CD#CE#CF% + #D0#D1#D2#D3#D4#D5#D6#D7#D8#D9#DA#DB#DC#DD#DE#DF% + #E0#E1#E2#E3#E4#E5#E6#E7#E8#E9#EA#EB#EC#ED#EE#EF% + #F0#F1#F2#F3#F4#F5#F6#F7#F8#F9#FA#FB#FC#FD#FE#FF% + }% +\endgroup +\@onelevel@sanitize\AllBytesName + +\newcommand*{\AllBytesString}{} +\begingroup + \def\|{|}% + \edef\%{\@percentchar}% + \catcode`\|=0 % + \catcode`\#=12 % + \catcode`\~=12 % + \catcode`\\=12 % + |xdef|AllBytesString{% + \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017% + \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037% + \040!"#$|%&'\(\)*+,-./% + 0123456789:;<=>?% + @ABCDEFGHIJKLMNO% + PQRSTUVWXYZ[\\]^_% + `abcdefghijklmno% + pqrstuvwxyz{||}~\177% + \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217% + \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237% + \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257% + \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277% + \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317% + \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337% + \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357% + \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377% + }% +|endgroup +\@onelevel@sanitize\AllBytesString + +\let\org@detokenize\detokenize +\let\detokenize\@undefined +\let\org@numexpr\numexpr +\let\numexpr\@undefined +\RequirePackage{pdfescape} +\let\detokenize\org@detokenize +\let\numexpr\org@numexpr + +\begin{qstest}{all-hex}{\AllBytes, escapehex} + \EdefEscapeHex\x{\AllBytes}% + \Expect*{\x}*{\AllBytesHex}% + \ExpectVar\x\AllBytesHex +\end{qstest} + +\begin{qstest}{all-unhex}{\AllBytesHex, unescapehex} + \EdefUnescapeHex\x{\AllBytesHex}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{all-unhex-lc}{\AllBytesHexLC, unescapehex, lowercase} + \EdefUnescapeHex\x{\AllBytesHexLC}% + \Expect*{\x}*{\AllBytes}% + \ExpectVar\x\AllBytes +\end{qstest} + +\begin{qstest}{unhex-incomplete}{unescapehex, incomplete} + \EdefUnescapeHex\x{4}% + \Expect*{\x}{@}% +\end{qstest} + +\begin{qstest}{unhex-space}{unescapehex, space} + \EdefUnescapeHex\x{20}% + \Expect*{\x}{ }% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-spaces}{unescapehex, spaces} + \EdefUnescapeHex\x{204020204120}% + \def\y#1{% + \edef\z{#1\string @#1#1\string A#1}% + }\y{ }% + \Expect*{\x}*{\z}% + \ExpectVar\x\z +\end{qstest} + +\begin{qstest}{unhex-hash}{unescapehex, hash} + \catcode`\#=12 % + \EdefUnescapeHex\x{#20}% + \ExpectVar\x\space +\end{qstest} + +\begin{qstest}{unhex-invalid}{unescapehex, invalid} + \def\test#1#2{% + \EdefUnescapeHex\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \test{X}{}% + \test{XY}{}% + \test{XYZ}{}% + \test{A}{^^a0}% + \test{AX}{^^a0}% + \test{XA}{^^a0}% + \test{XXAXX}{^^a0}% +\end{qstest} + +\begin{qstest}{all-name}{\AllBytes, escapename} + \EdefEscapeName\x{\AllBytes}% + \Expect*{\x}*{\AllBytesName}% + \ExpectVar\x\AllBytesName +\end{qstest} + +\begin{qstest}{all-string}{\AllBytes, escapestring} + \EdefEscapeString\x{\AllBytes}% + \Expect*{\x}*{\AllBytesString}% + \ExpectVar\x\AllBytesString +\end{qstest} + +\begin{qstest}{uchexdigit}{unescape, uppercase hex digit} + \catcode`\@=11 % + \catcode0=12 % + \def\test#1#2{% + \uccode0=#1\relax + \uppercase{% + \def\x{^^@}% + }% + \Expect*{% + \ifcase\expandafter\PE@TestUcHexDigit\x + true% + \else + false% + \fi + }{#2}% + }% + \def\range#1#2#3{% + \count0=#1\relax + \loop + \ifnum\count0<#2\relax + \test{\count0}{#3}% + \advance\count0 by 1 % + \repeat + }% + \range{0}{47}{false}% + \range{48}{57}{true}% + \range{58}{64}{false}% + \range{65}{70}{true}% + \range{71}{255}{false}% +\end{qstest} + +\begin{qstest}{unescapename}{unescapename} + \def\test#1#2{% + \EdefUnescapeName\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode`\#=12 % + \catcode0=12 % + \test{}{}% + \test{x}{x}% + \test{xy}{xy}% + \test{#}{#}% + \test{##}{##}% + \test{###}{###}% + \test{####}{####}% + \test{#x}{#x}% + \test{#xy}{#xy}% + \test{#1}{#1}% + \test{#40}{@}% + \test{#400}{@0}% + \test{#4x0}{#4x0}% + \test{#ab}{^^ab}% + \test{#00}{^^@}% + \test{x#40y#40z}{x@y@z}% + \test{#40#40#40#40}{@@@@}% + \test{a#x}{a#x}% + \test{a#xy}{a#xy}% + \test{a#1}{a#1}% + \test{a#40}{a@}% + \test{a#400}{a@0}% + \test{#20}{ }% + \test{a#20}{a }% + \test{a#20b}{a b}% + \test{a#20#20#20b}{a \space\space b}% +\end{qstest} + +\begin{qstest}{unescapestring}{unescapestring} + \def\test#1#2{% + \EdefUnescapeString\x{#1}% + \edef\y{#2}% + \@onelevel@sanitize\y + \ExpectVar\x\y + }% + \catcode0=12 % + \def\DefChar#1#2{% + \begingroup + \uccode0=#2\relax + \uppercase{\endgroup + \def#1{^^@}% + }% + }% + \DefChar\nul{0}% + \DefChar\one{1}% + \DefChar\bel{8}% + \DefChar\tab{9}% + \DefChar\lf{10}% + \DefChar\ff{12}% + \DefChar\cr{13}% + \DefChar\\{92}% + \test{}{}% + \test{a}{a}% + \test{\\}{}% + \test{\\\\}{\\}% + \test{\\\\y}{\\y}% + \test{\\000}{\nul}% + \test{\\b}{\bel}% + \test{\\t}{\tab}% + \test{\\n}{\lf}% + \test{\\f}{\ff}% + \test{\\r}{\cr}% + \test{\\(}{(}% + \test{\\)}{)}% + \test{\\040}{ }% + \test{\\100}{@}% + \test{\\40}{ }% + \test{\\1}{\one}% + \test{\\01}{\one}% + \test{\\001}{\one}% + \test{\\18}{\one8}% + \test{\\018}{\one8}% + \test{\\0018}{\one8}% + \test{x\\}{x}% + \test{x\\\\}{x\\}% + \test{x\\\\y}{x\\y}% + \test{x\\000}{x\nul}% + \test{x\\b}{x\bel}% + \test{x\\t}{x\tab}% + \test{x\\n}{x\lf}% + \test{x\\f}{x\ff}% + \test{x\\r}{x\cr}% + \test{x\\(}{x(}% + \test{x\\)}{x)}% + \test{x\\040}{x }% + \test{x\\100}{x@}% + \test{x\\40}{x }% + \test{x\\1}{x\one}% + \test{x\\01}{x\one}% + \test{x\\001}{x\one}% + \test{x\\18}{x\one8}% + \test{x\\018}{x\one8}% + \test{x\\0018}{x\one8}% + \test{\\b\\t\\n\\f\\r\\(\\)\\\\\\000\\040}{% + \bel\tab\lf\ff\cr()\\\nul\space + }% + \test{\\\lf}{}% + \test{x\\\lf}{x}% + \test{\cr}{\lf}% + \test{\cr\lf}{\lf}% + \test{\lf}{\lf}% + \test{\lf\cr}{\lf\lf}% + \test{x\cr}{x\lf}% + \test{x\cr\lf}{x\lf}% + \test{x\lf}{x\lf}% + \test{x\lf\cr}{x\lf\lf}% + \test{x\\\cr\lf y\cr}{xy\lf}% +\end{qstest} +\stop +\endinput +%% +%% End of file `pdfescape-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test1.tex new file mode 100644 index 00000000000..cb448b037d3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test1.tex @@ -0,0 +1,56 @@ +%% +%% This is file `pdflscape-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test0,test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\usepackage{ifpdf} +\ifpdf + \def\ExpectDriver{pdftex}% +\fi +\usepackage{ifxetex}% +\ifxetex + \def\ExpectDriver{dvipdfm}% +\fi +\usepackage{pdflscape}[2007/10/21] +\begin{document} +\begin{qstest}{driver}{driver} + \makeatletter + \Expect*{\PLS@driver}*{\ExpectDriver}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `pdflscape-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test2.tex new file mode 100644 index 00000000000..bbda2741de8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test2.tex @@ -0,0 +1,49 @@ +%% +%% This is file `pdflscape-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test0,test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\def\ExpectDriver{pdftex} +\usepackage[pdftex]{pdflscape}[2007/10/21] +\begin{document} +\begin{qstest}{driver}{driver} + \makeatletter + \Expect*{\PLS@driver}*{\ExpectDriver}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `pdflscape-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test3.tex new file mode 100644 index 00000000000..19301acc4d1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test3.tex @@ -0,0 +1,49 @@ +%% +%% This is file `pdflscape-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test0,test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\def\ExpectDriver{dvipdfm} +\usepackage[dvipdfmx]{pdflscape}[2007/10/21] +\begin{document} +\begin{qstest}{driver}{driver} + \makeatletter + \Expect*{\PLS@driver}*{\ExpectDriver}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `pdflscape-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test4.tex new file mode 100644 index 00000000000..570b6191a30 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test4.tex @@ -0,0 +1,50 @@ +%% +%% This is file `pdflscape-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test0,test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\def\ExpectDriver{dvips} +\usepackage[dvipsone]{graphics} +\usepackage{pdflscape}[2007/10/21] +\begin{document} +\begin{qstest}{driver}{driver} + \makeatletter + \Expect*{\PLS@driver}*{\ExpectDriver}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `pdflscape-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test5.tex new file mode 100644 index 00000000000..95ab5cc5735 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test5.tex @@ -0,0 +1,86 @@ +%% +%% This is file `pdflscape-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test5') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\usepackage{pdflscape}[2007/10/21] +\begin{document} +\begin{qstest}{checkangle}{checkangle} + \makeatletter + \def\Result{% + \def\ResultString{\the\count@}% + }% + \def\PackageError#1#2#3{% + \def\Result{% + \def\ResultString{error}% + }% + }% + \def\Test#1#2{% + \begingroup + \PLS@CheckAngle{#1}% + \Result + \Expect*{\ResultString}{#2}% + \endgroup + }% + \Test{0}{0}% + \Test{90}{90}% + \Test{180}{180}% + \Test{270}{270}% + \Test{360}{0}% + \Test{450}{90}% + \Test{540}{180}% + \Test{630}{270}% + \Test{720}{0}% + \Test{3600}{0}% + \Test{3690}{90}% + \Test{-90}{270}% + \Test{-180}{180}% + \Test{-270}{-90}% + \Test{-360}{0}% + \Test{-450}{270}% + \Test{540}{180}% + \Test{-630}{90}% + \Test{-720}{0}% + \Test{-3600}{0}% + \Test{-3690}{270}% + \Test{1}{error}% + \Test{-1}{error}% + \Test{123}{error}% +\end{qstest} +\end{document} +\endinput +%% +%% End of file `pdflscape-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.tex b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.tex new file mode 100644 index 00000000000..68b88109378 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.tex @@ -0,0 +1,57 @@ +%% +%% This is file `pdflscape-test6.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `test6') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001, 2004, 2006, 2007 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 pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape-test1.tex, pdflscape-test2.tex, +%% pdflscape-test3.tex, pdflscape-test4.tex, +%% pdflscape-test5.tex, pdflscape-test6.tex, +%% pdflscape-test6.txt, ExtractRotate.java. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage{pdflscape}[2007/10/21] +\begin{document} +\section{Portrait page} +\begin{landscape} +\section{Landscape page} +Foo bar foo bar foo bar foo bar foo bar +foo bar foo bar foo bar foo bar foo bar. +\end{landscape} +\section{Portrait Section} +Foo bar +\begin{landscape} +\section{Again Landscape Section} +\newpage +\section{Second Page of Landscape Section} +\end{landscape} +\section{Second Last Portrait Page} +\newpage +\section{Last Portrait Page} +\end{document} +\endinput +%% +%% End of file `pdflscape-test6.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.txt b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.txt new file mode 100644 index 00000000000..7056f3a9085 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/pdflscape-test6.txt @@ -0,0 +1,7 @@ +/Page 1 /Rotate 0 +/Page 2 /Rotate 90 +/Page 3 /Rotate 0 +/Page 4 /Rotate 90 +/Page 5 /Rotate 90 +/Page 6 /Rotate 0 +/Page 7 /Rotate 0 diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test1.tex new file mode 100644 index 00000000000..1f952da54e2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test1.tex @@ -0,0 +1,90 @@ +%% +%% This is file `selinput-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% selinput.dtx (with options: `test,test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 selinput.dtx +%% and the derived files +%% selinput.sty, selinput.pdf, selinput.ins, selinput.drv, +%% selinput-test1.tex, selinput-test2.tex, selinput-test3.tex, +%% selinput-test4.tex, selinput-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{textcomp} +\usepackage{qstest} +\makeatletter +\let\BeginDocumentText\@empty +\def\TestEncoding#1#2{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \Expect*{\inputencodingname}{#1}% + \g@addto@macro\BeginDocumentText{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \textbf{\SIE@Encoding:} % + \kvsetkeys{test}{#2}\par + }% +} +\def\TestKey#1#2{% + \define@key{test}{#1}{% + \sbox0{##1}% + \sbox2{#2}% + \Expect*{wd:\the\wd0, ht:\the\ht0, dp:\the\dp0}% + *{wd:\the\wd2, ht:\the\ht2, dp:\the\dp2}% + [#1=##1] % hash-ok + }% +} +\RequirePackage{keyval} +\TestKey{adieresis}{\"a} +\TestKey{germandbls}{\ss} +\TestKey{Euro}{\texteuro} +\makeatother +\usepackage[ + warning,% +]{selinput} +\inputencoding{ascii} +\begin{qstest}{preamble}{} + \TestEncoding{x-iso-8859-15}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^a4,% + }% + \TestEncoding{x-cp1252}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^80,% + }% + \TestEncoding{utf8}{% + adieresis=^^c3^^a4,% + germandbls=^^c3^^9f,% + Euro=^^e2^^82^^ac, + }% +\end{qstest} +\begin{document} +\begin{qstest}{document}{} + \BeginDocumentText +\end{qstest} +\end{document} +\endinput +%% +%% End of file `selinput-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test2.tex new file mode 100644 index 00000000000..de58844bd09 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test2.tex @@ -0,0 +1,90 @@ +%% +%% This is file `selinput-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% selinput.dtx (with options: `test,test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 selinput.dtx +%% and the derived files +%% selinput.sty, selinput.pdf, selinput.ins, selinput.drv, +%% selinput-test1.tex, selinput-test2.tex, selinput-test3.tex, +%% selinput-test4.tex, selinput-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{textcomp} +\usepackage{qstest} +\makeatletter +\let\BeginDocumentText\@empty +\def\TestEncoding#1#2{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \Expect*{\inputencodingname}{#1}% + \g@addto@macro\BeginDocumentText{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \textbf{\SIE@Encoding:} % + \kvsetkeys{test}{#2}\par + }% +} +\def\TestKey#1#2{% + \define@key{test}{#1}{% + \sbox0{##1}% + \sbox2{#2}% + \Expect*{wd:\the\wd0, ht:\the\ht0, dp:\the\dp0}% + *{wd:\the\wd2, ht:\the\ht2, dp:\the\dp2}% + [#1=##1] % hash-ok + }% +} +\RequirePackage{keyval} +\TestKey{adieresis}{\"a} +\TestKey{germandbls}{\ss} +\TestKey{Euro}{\texteuro} +\makeatother +\usepackage[ + warning,% + utf8=utf-8, +]{selinput} +\inputencoding{utf-8} +\begin{qstest}{preamble}{} + \TestEncoding{x-iso-8859-15}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^a4,% + }% + \TestEncoding{x-cp1252}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^80,% + }% + \TestEncoding{utf-8}{% + adieresis=^^c3^^a4,% + germandbls=^^c3^^9f,% + }% +\end{qstest} +\begin{document} +\begin{qstest}{document}{} + \BeginDocumentText +\end{qstest} +\end{document} +\endinput +%% +%% End of file `selinput-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test3.tex new file mode 100644 index 00000000000..897643f9927 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test3.tex @@ -0,0 +1,94 @@ +%% +%% This is file `selinput-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% selinput.dtx (with options: `test,test3') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 selinput.dtx +%% and the derived files +%% selinput.sty, selinput.pdf, selinput.ins, selinput.drv, +%% selinput-test1.tex, selinput-test2.tex, selinput-test3.tex, +%% selinput-test4.tex, selinput-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{textcomp} +\usepackage{qstest} +\makeatletter +\let\BeginDocumentText\@empty +\def\TestEncoding#1#2{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \Expect*{\inputencodingname}{#1}% + \g@addto@macro\BeginDocumentText{% + \SelectInputMappings{#2}% + \Expect*{\SIE@Encoding}{#1}% + \textbf{\SIE@Encoding:} % + \kvsetkeys{test}{#2}\par + }% +} +\def\TestKey#1#2{% + \define@key{test}{#1}{% + \sbox0{##1}% + \sbox2{#2}% + \Expect*{wd:\the\wd0, ht:\the\ht0, dp:\the\dp0}% + *{wd:\the\wd2, ht:\the\ht2, dp:\the\dp2}% + [#1=##1] % hash-ok + }% +} +\RequirePackage{keyval} +\TestKey{adieresis}{\"a} +\TestKey{germandbls}{\ss} +\TestKey{Euro}{\texteuro} +\makeatother +\usepackage[ + warning,% + ucs, +]{selinput} +\inputencoding{ascii} +\usepackage{ucs} +\begin{qstest}{preamble}{} + \TestEncoding{x-iso-8859-15}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^a4,% + }% + \TestEncoding{x-cp1252}{% + adieresis=^^e4,% + germandbls=^^df,% + Euro=^^80,% + }% + \TestEncoding{utf8x}{% + adieresis=^^c3^^a4,% + germandbls=^^c3^^9f,% + Euro=^^e2^^82^^ac, + }% +\end{qstest} +\let\ifUnicodeOptiongraphics\iffalse +\begin{document} +\begin{qstest}{document}{} +\makeatletter + \BeginDocumentText +\end{qstest} +\end{document} +\endinput +%% +%% End of file `selinput-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test4.tex new file mode 100644 index 00000000000..94561b045b5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test4.tex @@ -0,0 +1,51 @@ +%% +%% This is file `selinput-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% selinput.dtx (with options: `test,test4') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 selinput.dtx +%% and the derived files +%% selinput.sty, selinput.pdf, selinput.ins, selinput.drv, +%% selinput-test1.tex, selinput-test2.tex, selinput-test3.tex, +%% selinput-test4.tex, selinput-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{textcomp} +\usepackage{qstest} +\usepackage[warning,ucs]{selinput} +\SelectInputMappings{ + adieresis=^^c3^^a4,% + germandbls=^^c3^^9f,% + Euro=^^e2^^82^^ac,% +} +\begin{qstest}{encoding}{} + \Expect*{\inputencodingname}{utf8x}% +\end{qstest} +\begin{document} + adieresis=^^c3^^a4, % + germandbls=^^c3^^9f, % + Euro=^^e2^^82^^ac% +\end{document} +\endinput +%% +%% End of file `selinput-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test5.tex new file mode 100644 index 00000000000..aa41dcc6d43 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/selinput-test5.tex @@ -0,0 +1,51 @@ +%% +%% This is file `selinput-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% selinput.dtx (with options: `test,test5') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 selinput.dtx +%% and the derived files +%% selinput.sty, selinput.pdf, selinput.ins, selinput.drv, +%% selinput-test1.tex, selinput-test2.tex, selinput-test3.tex, +%% selinput-test4.tex, selinput-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{minimal} +\usepackage{textcomp} +\usepackage{qstest} +\usepackage[warning,ucs]{selinput} +\SelectInputMappings{ + adieresis={\"a},% + germandbls={{\ss}},% + Euro=\texteuro{},% +} +\begin{qstest}{encoding}{} + \Expect*{\inputencodingname}{ascii}% +\end{qstest} +\begin{document} + adieresis={\"a}, % + germandbls={{\ss}}, % + Euro=\texteuro{}% +\end{document} +\endinput +%% +%% End of file `selinput-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test1.tex new file mode 100644 index 00000000000..92b27d356ce --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test1.tex @@ -0,0 +1,75 @@ +%% +%% This is file `setouterhbox-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% setouterhbox.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005, 2006, 2007 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 setouterhbox.dtx +%% and the derived files +%% setouterhbox.sty, setouterhbox.pdf, setouterhbox.ins, setouterhbox.drv, +%% setouterhbox-example.tex, setouterhbox-test1.tex, +%% setouterhbox-test2.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input setouterhbox.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `setouterhbox-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test2.tex new file mode 100644 index 00000000000..47caba209f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/setouterhbox-test2.tex @@ -0,0 +1,63 @@ +%% +%% This is file `setouterhbox-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% setouterhbox.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005, 2006, 2007 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 setouterhbox.dtx +%% and the derived files +%% setouterhbox.sty, setouterhbox.pdf, setouterhbox.ins, setouterhbox.drv, +%% setouterhbox-example.tex, setouterhbox-test1.tex, +%% setouterhbox-test2.tex. +%% +\nofiles +\documentclass[a5paper]{article} +\usepackage{url}[2005/06/27] +\usepackage{setouterhbox} + +\newsavebox{\testbox} + +\setlength{\parindent}{0pt} +\setlength{\parskip}{2em} + +\begin{document} +\raggedright + +\url{http://this.is.a.very.long.host.name/followed/% +by/a/very_long_long_long_path.html}% + +\sbox\testbox{% + \url{http://this.is.a.very.long.host.name/followed/% + by/a/very_long_long_long_path.html}% +}% +\unhbox\testbox + +\begin{setouterhbox}{\testbox}% + \url{http://this.is.a.very.long.host.name/followed/% + by/a/very_long_long_long_path.html}% +\end{setouterhbox} +\unhbox\testbox + +\end{document} +\endinput +%% +%% End of file `setouterhbox-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test1.tex new file mode 100644 index 00000000000..573d15a8b42 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `soulutf8-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% soulutf8.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 soulutf8.dtx +%% and the derived files +%% soulutf8.sty, soulutf8.pdf, soulutf8.ins, soulutf8.drv, +%% soulutf8-test1.tex, soulutf8-test2.tex, soulutf8-test3.tex, +%% soulutf8-test4.tex, soulutf8-test5.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input soulutf8.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `soulutf8-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test2.tex new file mode 100644 index 00000000000..d43dc88aa01 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test2.tex @@ -0,0 +1,365 @@ +%% +%% This is file `soulutf8-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% soulutf8.dtx (with options: `test2,utf8') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 soulutf8.dtx +%% and the derived files +%% soulutf8.sty, soulutf8.pdf, soulutf8.ins, soulutf8.drv, +%% soulutf8-test1.tex, soulutf8-test2.tex, soulutf8-test3.tex, +%% soulutf8-test4.tex, soulutf8-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{textcomp} +\usepackage[ngerman]{babel} +\expandafter\def\csname ver@hypdestopt.sty\endcsname{} +\usepackage[unicode]{hyperref} +\usepackage{bookmark} +\usepackage{color} +\usepackage{soul}[2003/11/17] +\makeatletter +\newcommand*{\@ifDefined}[1]{% + \@ifundefined{#1}{% + \@latex@error{% + \expandafter\noexpand\csname#1\endcsname undefined% + }\@ehc + }% +} +\newcommand*{\SaveOrg}[1]{% + \@ifdefinable{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname ORG@SOUL@#1\expandafter\endcsname + \csname SOUL@#1\endcsname + }% + }% +} +\newcommand*{\RestoreOrg}[1]{% + \@ifDefined{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname SOUL@#1\expandafter\endcsname + \csname ORG@SOUL@#1\endcsname + }% + }% +} +\makeatother +\SaveOrg{eval} +\SaveOrg{splittoken} +\SaveOrg{flushcomma} +\SaveOrg{flushapo} +\SaveOrg{grave} +\SaveOrg{addgroup} +\SaveOrg{addmath} +\SaveOrg{addprotect} +\SaveOrg{addtoken} +\usepackage{soulutf8}[2007/09/09] +\usepackage[utf8]{inputenc} +\DeclareUnicodeCharacter{00A0}{\nobreakspace} +\makeatletter +\DeclareRobustCommand*{\an}{% + \def\SOUL@preamble{$^{^P}$}% + \def\SOUL@everyspace##1{##1\texttt{\char`\ }\linebreak[2]}% + \def\SOUL@postamble{$^{^E}$}% + \def\SOUL@everyhyphen{$^{^-}$\linebreak[1]}% + \def\SOUL@everyexhyphen##1{##1$^{^=}$}% + \def\SOUL@everysyllable{$^{^S}$}% + \def\SOUL@everytoken{\the\SOUL@token$^{^T}$}% + \def\SOUL@everylowerthan{$^{^L}$}% + \SOUL@ +} +\DeclareRobustCommand*{\sy}{% + \SOUL@setup + \def\SOUL@preamble{% + \lefthyphenmin=\z@ + \righthyphenmin=\z@ + }% + \def\SOUL@everyspace##1{##1\space}% + \def\SOUL@everysyllable{\the\SOUL@syllable}% + \def\SOUL@everyhyphen{% + \discretionary{% + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{% + \hbox{\kern1pt$\cdot$}% + }% + }% + \def\SOUL@everyexhyphen##1{% + \SOUL@setkern\SOUL@hyphkern + \hbox{##1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% + }% + \SOUL@ +} +\DeclareRobustCommand*{\soulH}{% + \def\SOUL@preamble{% + \gdef\SOULH{}% + \soulHadd{[}% + }% + \def\SOUL@everyspace##1{% + \soulHadd{Sp}% + }% + \def\SOUL@postamble{% + \soulHadd{]}% + }% + \def\SOUL@everyhyphen{% + \soulHadd{Hy}% + }% + \def\SOUL@everyexhyphen##1{% + \soulHadd{Exhy}% + }% + \def\SOUL@everysyllable{% + \soulHadd{Sy}% + }% + \def\SOUL@everytoken{% + \soulHadd{T}% + }% + \def\SOUL@everylowerthan{% + \soulHadd{<}% + }% + \SOUL@ +} +\newcommand*{\soulHadd}[1]{% + #1% + \expandafter\gdef\expandafter\soulHstring\expandafter{% + \soulHstring + #1% + }% +} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newsavebox\boxA +\newsavebox\boxB +\newsavebox\boxC +\newcommand*{\TestDriver}[4]{% + \subsection{Driver #1}% + \@PackageInfo{soulutf8-test}{* Driver #1}% + \expandafter\let\expandafter\testdriver\csname #1\endcsname + \def\teststringA{#3}% + \def\teststringB{#4}% + \begin{qstest}{string-#2-driver-#1}{string,#2,driver,#1}% + \@PackageInfo{soulutf8-test}{* Version: soulutf8}% + \global\let\soulHstring\@empty + \setbox0=\hbox{\expandafter\testdriver\expandafter{\teststringA}}% + \let\HstringA\soulHstring + \SetTestVBox{\boxA}{\teststringA}% + % + \@PackageInfo{soulutf8-test}{* Version: soul + patch}% + \global\let\soulHstring\@empty + \RestoreOrg{eval}% + \setbox2=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringB\soulHstring + \SetTestVBox{\boxB}{\teststringB}% + % + \@PackageInfo{soulutf8-test}{* Version: original soul}% + \global\let\soulHstring\@empty + \RestoreOrg{splittoken}% + \RestoreOrg{flushcomma}% + \RestoreOrg{flushapo}% + \RestoreOrg{grave}% + \RestoreOrg{addgroup}% + \RestoreOrg{addmath}% + \RestoreOrg{addprotect}% + \RestoreOrg{addtoken}% + \setbox4=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringC\soulHstring + \SetTestVBox{\boxC}{\teststringB}% + % + \TestInfo{0}{soulutf8}% + \TestInfo{2}{soul + patch}% + \TestInfo{4}{original soul}% + \TestInfoVBox + \showboxdepth=\maxdimen + \showboxbreadth=\maxdimen + \tracingonline=\@ne + \Expect*{\HstringA}*{\HstringB}% + \Expect*{\HstringA}*{\HstringC}% + \Expect*{\the\wd0}*{\the\wd2}% + \ifdim\wd0=\wd2 % + \else + \showbox0 % + \showbox2 % + \fi + \Expect*{\the\ht0}*{\the\ht2}% + \Expect*{\the\dp0}*{\the\dp2}% + \Expect*{\the\wd\boxB}*{\the\wd\boxA}% + \Expect*{\the\wd\boxC}*{\the\wd\boxA}% + \Expect*{\the\ht\boxB}*{\the\ht\boxA}% + \ifdim\ht\boxB=\ht\boxA + \else + \showbox\boxA + \showbox\boxB + \fi + \Expect*{\the\ht\boxC}*{\the\ht\boxA}% + \Expect*{\the\dp\boxB}*{\the\dp\boxA}% + \Expect*{\the\dp\boxC}*{\the\dp\boxA}% + \end{qstest}% +} +\newcommand*{\SetTestVBox}[2]{% + \setbox#1=\vbox{% + \hsize=0pt\relax + \hfuzz=100mm\relax + \expandafter\testdriver\expandafter{#2}% + }% +} +\newcommand*{\TestInfo}[2]{% + \par + \noindent + \copy#1\relax + \hfill + \begingroup + \small + \ifdim\wd0=\wd2\relax + \ifdim\wd0=\wd4\relax + \else + \ifnum#1=2 % + \raisebox{.5\baselineskip}[0pt][0pt]{% + \llap{$\}$ }% + \rlap{width = \the\wd#1\relax\space$\{$}% + \phantom{width = 999.99999pt}% + \qquad + }% + \else + \ifnum#1=4 % + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \qquad + \fi + \fi + \fi + \else + \begingroup + \bfseries + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \endgroup + \qquad + \fi + \rlap{(#2)}% + \phantom{(original soul)}% + \endgroup + \par +} +\newcommand*{\TestInfoVBox}{% + \par + \noindent + \mbox{\vrule\relax\space\copy\boxA}% + \ifdim\ht\boxA=\ht\boxB + \else + \hfill + \begingroup + \small + \rlap{(soulutf8)}% + \phantom{(soulutf8)}% + \endgroup + \par + \noindent + \mbox{\vrule\relax\space\copy\boxB}% + \hfill + \begingroup + \small + \rlap{(soul)}% + \phantom{(soulutf8)}% + \endgroup + \fi + \par +} +\makeatletter +\newcommand*{\Test}[3]{% + \clearpage + \begingroup + \def\linebreak{\textbackslash linebreak }% + \def\\{\textbackslash\textbackslash}% + \def\soulomit##1{% + \textbackslash soulomit\textbraceleft##1\textbraceright + }% + \def\mbox##1{% + \textbackslash mbox\textbraceleft##1\textbraceright + }% + \def\abc{\textbackslash abc }% + \def\texttt##1{% + \textbackslash texttt\textbraceleft##1\textbraceright + }% + \def\c##1{% + \textbackslash c\textbraceleft##1\textbraceright + }% + \csname protected@edef\endcsname\x{\endgroup + \noexpand\section{String #1: #2}% + }% + \x + \TestDriver{so}{#1}{#2}{#3}% + \TestDriver{caps}{#1}{#2}{#3}% + \TestDriver{ul}{#1}{#2}{#3}% + \TestDriver{st}{#1}{#2}{#3}% + \TestDriver{hl}{#1}{#2}{#3}% + \TestDriver{an}{#1}{#2}{#3}% + \TestDriver{sy}{#1}{#2}{#3}% + \TestDriver{soulH}{#1}{#2}{#3}% +} +\makeatother +\begin{document} + \Test A{}{}% + \Test B{Hello World}{Hello World}% + \Test C{% + Umlauts: ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f% + }{% + Umlauts: \"A\"O\"U\"a\"o\"u\ss + }% + \Test D{Euro: ^^e2^^82^^ac}{Euro: \texteuro}% + \Test E{Stra^^c3^^9fe}{Stra\ss e}% + \Test F{R^^c3^^b6mer}{R\"omer}% + \Test G{A^^e2^^80^^93B^^e2^^80^^94C}{A--B---C}% + \Test H{X^^c2^^a0Y}{X~Y}% + \Test I{A^^c5^^a4}{A\v T}% + \Test J{A,B,,C,,,D,,,,E}{A,B,,C,,,D,,,,E}% + \Test K{A'B''C'''D''''E}{A'B''C'''D''''E}% + \Test L{A`B``C```D````E}{A`B``C```D````E}% + \Test M{A$x$B}{A$x$B}% + \Test N{A\mbox{abc}B}{A\mbox{abc}B}% + \Test O{,,TA''}{,,TA''}% + \Test P{{!`}Hola{?`}}{{!`}Hola{?`}}% + \Test Q{re-sent\slash x}{re-sent\slash x}% + \Test R{new\\line}{new\\line}% + \Test S{foo\linebreak bar}{foo\linebreak bar}% + \Test T{Virchow{sche}}{Virchow{sche}}% + \Test U{A\soulomit{foo}B}{A\soulomit{foo}B}% + \Test V{A\texttt{xyz}B}{A\texttt{xyz}B}% + \Test W{ffi}{ffi}% + \Test X{f{}f{}i}{f{}f{}i}% + \Test Y{f\mbox{}f\mbox{}i}{f\mbox{}f\mbox{}i}% + \Test Z{\c{\"a}}{{\c{\"a}}}% + \let\abcx\UNDEFINED + \def\abc{% + \begingroup + \def\abcx{x}% + \abcx + \endgroup + }% + \Test{AA}{[{x\abc x}]}{[{xxx}]}% +\end{document} +\endinput +%% +%% End of file `soulutf8-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test3.tex b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test3.tex new file mode 100644 index 00000000000..d6d33ae9a73 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test3.tex @@ -0,0 +1,377 @@ +%% +%% This is file `soulutf8-test3.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% soulutf8.dtx (with options: `test3,utf8x') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 soulutf8.dtx +%% and the derived files +%% soulutf8.sty, soulutf8.pdf, soulutf8.ins, soulutf8.drv, +%% soulutf8-test1.tex, soulutf8-test2.tex, soulutf8-test3.tex, +%% soulutf8-test4.tex, soulutf8-test5.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{textcomp} +\usepackage[ngerman]{babel} +\expandafter\def\csname ver@hypdestopt.sty\endcsname{} +\usepackage[unicode]{hyperref} +\usepackage{bookmark} +\usepackage{color} +\usepackage{soul}[2003/11/17] +\makeatletter +\newcommand*{\@ifDefined}[1]{% + \@ifundefined{#1}{% + \@latex@error{% + \expandafter\noexpand\csname#1\endcsname undefined% + }\@ehc + }% +} +\newcommand*{\SaveOrg}[1]{% + \@ifdefinable{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname ORG@SOUL@#1\expandafter\endcsname + \csname SOUL@#1\endcsname + }% + }% +} +\newcommand*{\RestoreOrg}[1]{% + \@ifDefined{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname SOUL@#1\expandafter\endcsname + \csname ORG@SOUL@#1\endcsname + }% + }% +} +\makeatother +\SaveOrg{eval} +\SaveOrg{splittoken} +\SaveOrg{flushcomma} +\SaveOrg{flushapo} +\SaveOrg{grave} +\SaveOrg{addgroup} +\SaveOrg{addmath} +\SaveOrg{addprotect} +\SaveOrg{addtoken} +\usepackage{soulutf8}[2007/09/09] +\let\origshow\show +\usepackage[utf8x]{inputenc} +\AtBeginDocument{% + \let\show\origshow +} +\makeatletter +\DeclareRobustCommand*{\an}{% + \def\SOUL@preamble{$^{^P}$}% + \def\SOUL@everyspace##1{##1\texttt{\char`\ }\linebreak[2]}% + \def\SOUL@postamble{$^{^E}$}% + \def\SOUL@everyhyphen{$^{^-}$\linebreak[1]}% + \def\SOUL@everyexhyphen##1{##1$^{^=}$}% + \def\SOUL@everysyllable{$^{^S}$}% + \def\SOUL@everytoken{\the\SOUL@token$^{^T}$}% + \def\SOUL@everylowerthan{$^{^L}$}% + \SOUL@ +} +\DeclareRobustCommand*{\sy}{% + \SOUL@setup + \def\SOUL@preamble{% + \lefthyphenmin=\z@ + \righthyphenmin=\z@ + }% + \def\SOUL@everyspace##1{##1\space}% + \def\SOUL@everysyllable{\the\SOUL@syllable}% + \def\SOUL@everyhyphen{% + \discretionary{% + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{% + \hbox{\kern1pt$\cdot$}% + }% + }% + \def\SOUL@everyexhyphen##1{% + \SOUL@setkern\SOUL@hyphkern + \hbox{##1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% + }% + \SOUL@ +} +\DeclareRobustCommand*{\soulH}{% + \def\SOUL@preamble{% + \gdef\SOULH{}% + \soulHadd{[}% + }% + \def\SOUL@everyspace##1{% + \soulHadd{Sp}% + }% + \def\SOUL@postamble{% + \soulHadd{]}% + }% + \def\SOUL@everyhyphen{% + \soulHadd{Hy}% + }% + \def\SOUL@everyexhyphen##1{% + \soulHadd{Exhy}% + }% + \def\SOUL@everysyllable{% + \soulHadd{Sy}% + }% + \def\SOUL@everytoken{% + \soulHadd{T}% + }% + \def\SOUL@everylowerthan{% + \soulHadd{<}% + }% + \SOUL@ +} +\newcommand*{\soulHadd}[1]{% + #1% + \expandafter\gdef\expandafter\soulHstring\expandafter{% + \soulHstring + #1% + }% +} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newsavebox\boxA +\newsavebox\boxB +\newsavebox\boxC +\newcommand*{\TestDriver}[4]{% + \subsection{Driver #1}% + \@PackageInfo{soulutf8-test}{* Driver #1}% + \expandafter\let\expandafter\testdriver\csname #1\endcsname + \def\teststringA{#3}% + \def\teststringB{#4}% + \begin{qstest}{string-#2-driver-#1}{string,#2,driver,#1}% + \@PackageInfo{soulutf8-test}{* Version: soulutf8}% + \global\let\soulHstring\@empty + \setbox0=\hbox{\expandafter\testdriver\expandafter{\teststringA}}% + \let\HstringA\soulHstring + \SetTestVBox{\boxA}{\teststringA}% + % + \@PackageInfo{soulutf8-test}{* Version: soul + patch}% + \global\let\soulHstring\@empty + \RestoreOrg{eval}% + \setbox2=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringB\soulHstring + \SetTestVBox{\boxB}{\teststringB}% + % + \@PackageInfo{soulutf8-test}{* Version: original soul}% + \global\let\soulHstring\@empty + \RestoreOrg{splittoken}% + \RestoreOrg{flushcomma}% + \RestoreOrg{flushapo}% + \RestoreOrg{grave}% + \RestoreOrg{addgroup}% + \RestoreOrg{addmath}% + \RestoreOrg{addprotect}% + \RestoreOrg{addtoken}% + \setbox4=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringC\soulHstring + \SetTestVBox{\boxC}{\teststringB}% + % + \TestInfo{0}{soulutf8}% + \TestInfo{2}{soul + patch}% + \TestInfo{4}{original soul}% + \TestInfoVBox + \showboxdepth=\maxdimen + \showboxbreadth=\maxdimen + \tracingonline=\@ne + \Expect*{\HstringA}*{\HstringB}% + \Expect*{\HstringA}*{\HstringC}% + \Expect*{\the\wd0}*{\the\wd2}% + \ifdim\wd0=\wd2 % + \else + \showbox0 % + \showbox2 % + \fi + \Expect*{\the\ht0}*{\the\ht2}% + \Expect*{\the\dp0}*{\the\dp2}% + \Expect*{\the\wd\boxB}*{\the\wd\boxA}% + \Expect*{\the\wd\boxC}*{\the\wd\boxA}% + \Expect*{\the\ht\boxB}*{\the\ht\boxA}% + \ifdim\ht\boxB=\ht\boxA + \else + \showbox\boxA + \showbox\boxB + \fi + \Expect*{\the\ht\boxC}*{\the\ht\boxA}% + \Expect*{\the\dp\boxB}*{\the\dp\boxA}% + \Expect*{\the\dp\boxC}*{\the\dp\boxA}% + \end{qstest}% +} +\newcommand*{\SetTestVBox}[2]{% + \setbox#1=\vbox{% + \hsize=0pt\relax + \hfuzz=100mm\relax + \expandafter\testdriver\expandafter{#2}% + }% +} +\newcommand*{\TestInfo}[2]{% + \par + \noindent + \copy#1\relax + \hfill + \begingroup + \small + \ifdim\wd0=\wd2\relax + \ifdim\wd0=\wd4\relax + \else + \ifnum#1=2 % + \raisebox{.5\baselineskip}[0pt][0pt]{% + \llap{$\}$ }% + \rlap{width = \the\wd#1\relax\space$\{$}% + \phantom{width = 999.99999pt}% + \qquad + }% + \else + \ifnum#1=4 % + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \qquad + \fi + \fi + \fi + \else + \begingroup + \bfseries + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \endgroup + \qquad + \fi + \rlap{(#2)}% + \phantom{(original soul)}% + \endgroup + \par +} +\newcommand*{\TestInfoVBox}{% + \par + \noindent + \mbox{\vrule\relax\space\copy\boxA}% + \ifdim\ht\boxA=\ht\boxB + \else + \hfill + \begingroup + \small + \rlap{(soulutf8)}% + \phantom{(soulutf8)}% + \endgroup + \par + \noindent + \mbox{\vrule\relax\space\copy\boxB}% + \hfill + \begingroup + \small + \rlap{(soul)}% + \phantom{(soulutf8)}% + \endgroup + \fi + \par +} +\makeatletter +\newcommand*{\Test}[3]{% + \clearpage + \begingroup + \def\linebreak{\textbackslash linebreak }% + \def\\{\textbackslash\textbackslash}% + \def\soulomit##1{% + \textbackslash soulomit\textbraceleft##1\textbraceright + }% + \def\mbox##1{% + \textbackslash mbox\textbraceleft##1\textbraceright + }% + \def\abc{\textbackslash abc }% + \def\texttt##1{% + \textbackslash texttt\textbraceleft##1\textbraceright + }% + \def\c##1{% + \textbackslash c\textbraceleft##1\textbraceright + }% + \count@=128 % + \loop + \ifnum\count@<256 % + \lccode`\~=\count@ + \lowercase{% + \def~{\noexpand~}% + }% + \advance\count@\@ne + \repeat + \csname protected@edef\endcsname\x{\endgroup + \noexpand\section{String #1: #2}% + }% + \x + \TestDriver{so}{#1}{#2}{#3}% + \TestDriver{caps}{#1}{#2}{#3}% + \TestDriver{ul}{#1}{#2}{#3}% + \TestDriver{st}{#1}{#2}{#3}% + \TestDriver{hl}{#1}{#2}{#3}% + \TestDriver{an}{#1}{#2}{#3}% + \TestDriver{sy}{#1}{#2}{#3}% + \TestDriver{soulH}{#1}{#2}{#3}% +} +\makeatother +\begin{document} + \Test A{}{}% + \Test B{Hello World}{Hello World}% + \Test C{% + Umlauts: ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f% + }{% + Umlauts: \"A\"O\"U\"a\"o\"u\ss + }% + \Test D{Euro: ^^e2^^82^^ac}{Euro: \texteuro}% + \Test E{Stra^^c3^^9fe}{Stra\ss e}% + \Test F{R^^c3^^b6mer}{R\"omer}% + \Test G{A^^e2^^80^^93B^^e2^^80^^94C}{A--B---C}% + \Test H{X^^c2^^a0Y}{X~Y}% + \Test I{A^^c5^^a4}{A\v T}% + \Test J{A,B,,C,,,D,,,,E}{A,B,,C,,,D,,,,E}% + \Test K{A'B''C'''D''''E}{A'B''C'''D''''E}% + \Test L{A`B``C```D````E}{A`B``C```D````E}% + \Test M{A$x$B}{A$x$B}% + \Test N{A\mbox{abc}B}{A\mbox{abc}B}% + \Test O{,,TA''}{,,TA''}% + \Test P{{!`}Hola{?`}}{{!`}Hola{?`}}% + \Test Q{re-sent\slash x}{re-sent\slash x}% + \Test R{new\\line}{new\\line}% + \Test S{foo\linebreak bar}{foo\linebreak bar}% + \Test T{Virchow{sche}}{Virchow{sche}}% + \Test U{A\soulomit{foo}B}{A\soulomit{foo}B}% + \Test V{A\texttt{xyz}B}{A\texttt{xyz}B}% + \Test W{ffi}{ffi}% + \Test X{f{}f{}i}{f{}f{}i}% + \Test Y{f\mbox{}f\mbox{}i}{f\mbox{}f\mbox{}i}% + \Test Z{\c{\"a}}{{\c{\"a}}}% + \let\abcx\UNDEFINED + \def\abc{% + \begingroup + \def\abcx{x}% + \abcx + \endgroup + }% + \Test{AA}{[{x\abc x}]}{[{xxx}]}% +\end{document} +\endinput +%% +%% End of file `soulutf8-test3.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test4.tex b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test4.tex new file mode 100644 index 00000000000..0550357500b --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test4.tex @@ -0,0 +1,358 @@ +%% +%% This is file `soulutf8-test4.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% soulutf8.dtx (with options: `test4,utf8,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 soulutf8.dtx +%% and the derived files +%% soulutf8.sty, soulutf8.pdf, soulutf8.ins, soulutf8.drv, +%% soulutf8-test1.tex, soulutf8-test2.tex, soulutf8-test3.tex, +%% soulutf8-test4.tex, soulutf8-test5.tex. +%% +\let\unexpanded\UNDEFINED +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{textcomp} +\usepackage[ngerman]{babel} +\expandafter\def\csname ver@hypdestopt.sty\endcsname{} +\usepackage[unicode]{hyperref} +\usepackage{bookmark} +\usepackage{color} +\usepackage{soul}[2003/11/17] +\makeatletter +\newcommand*{\@ifDefined}[1]{% + \@ifundefined{#1}{% + \@latex@error{% + \expandafter\noexpand\csname#1\endcsname undefined% + }\@ehc + }% +} +\newcommand*{\SaveOrg}[1]{% + \@ifdefinable{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname ORG@SOUL@#1\expandafter\endcsname + \csname SOUL@#1\endcsname + }% + }% +} +\newcommand*{\RestoreOrg}[1]{% + \@ifDefined{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname SOUL@#1\expandafter\endcsname + \csname ORG@SOUL@#1\endcsname + }% + }% +} +\makeatother +\SaveOrg{eval} +\SaveOrg{splittoken} +\SaveOrg{flushcomma} +\SaveOrg{flushapo} +\SaveOrg{grave} +\SaveOrg{addgroup} +\SaveOrg{addmath} +\SaveOrg{addprotect} +\SaveOrg{addtoken} +\usepackage{soulutf8}[2007/09/09] +\usepackage[utf8]{inputenc} +\DeclareUnicodeCharacter{00A0}{\nobreakspace} +\makeatletter +\DeclareRobustCommand*{\an}{% + \def\SOUL@preamble{$^{^P}$}% + \def\SOUL@everyspace##1{##1\texttt{\char`\ }\linebreak[2]}% + \def\SOUL@postamble{$^{^E}$}% + \def\SOUL@everyhyphen{$^{^-}$\linebreak[1]}% + \def\SOUL@everyexhyphen##1{##1$^{^=}$}% + \def\SOUL@everysyllable{$^{^S}$}% + \def\SOUL@everytoken{\the\SOUL@token$^{^T}$}% + \def\SOUL@everylowerthan{$^{^L}$}% + \SOUL@ +} +\DeclareRobustCommand*{\sy}{% + \SOUL@setup + \def\SOUL@preamble{% + \lefthyphenmin=\z@ + \righthyphenmin=\z@ + }% + \def\SOUL@everyspace##1{##1\space}% + \def\SOUL@everysyllable{\the\SOUL@syllable}% + \def\SOUL@everyhyphen{% + \discretionary{% + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{% + \hbox{\kern1pt$\cdot$}% + }% + }% + \def\SOUL@everyexhyphen##1{% + \SOUL@setkern\SOUL@hyphkern + \hbox{##1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% + }% + \SOUL@ +} +\DeclareRobustCommand*{\soulH}{% + \def\SOUL@preamble{% + \gdef\SOULH{}% + \soulHadd{[}% + }% + \def\SOUL@everyspace##1{% + \soulHadd{Sp}% + }% + \def\SOUL@postamble{% + \soulHadd{]}% + }% + \def\SOUL@everyhyphen{% + \soulHadd{Hy}% + }% + \def\SOUL@everyexhyphen##1{% + \soulHadd{Exhy}% + }% + \def\SOUL@everysyllable{% + \soulHadd{Sy}% + }% + \def\SOUL@everytoken{% + \soulHadd{T}% + }% + \def\SOUL@everylowerthan{% + \soulHadd{<}% + }% + \SOUL@ +} +\newcommand*{\soulHadd}[1]{% + #1% + \expandafter\gdef\expandafter\soulHstring\expandafter{% + \soulHstring + #1% + }% +} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newsavebox\boxA +\newsavebox\boxB +\newsavebox\boxC +\newcommand*{\TestDriver}[4]{% + \subsection{Driver #1}% + \@PackageInfo{soulutf8-test}{* Driver #1}% + \expandafter\let\expandafter\testdriver\csname #1\endcsname + \def\teststringA{#3}% + \def\teststringB{#4}% + \begin{qstest}{string-#2-driver-#1}{string,#2,driver,#1}% + \@PackageInfo{soulutf8-test}{* Version: soulutf8}% + \global\let\soulHstring\@empty + \setbox0=\hbox{\expandafter\testdriver\expandafter{\teststringA}}% + \let\HstringA\soulHstring + \SetTestVBox{\boxA}{\teststringA}% + % + \@PackageInfo{soulutf8-test}{* Version: soul + patch}% + \global\let\soulHstring\@empty + \RestoreOrg{eval}% + \setbox2=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringB\soulHstring + \SetTestVBox{\boxB}{\teststringB}% + % + \@PackageInfo{soulutf8-test}{* Version: original soul}% + \global\let\soulHstring\@empty + \RestoreOrg{splittoken}% + \RestoreOrg{flushcomma}% + \RestoreOrg{flushapo}% + \RestoreOrg{grave}% + \RestoreOrg{addgroup}% + \RestoreOrg{addmath}% + \RestoreOrg{addprotect}% + \RestoreOrg{addtoken}% + \setbox4=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringC\soulHstring + \SetTestVBox{\boxC}{\teststringB}% + % + \TestInfo{0}{soulutf8}% + \TestInfo{2}{soul + patch}% + \TestInfo{4}{original soul}% + \TestInfoVBox + \showboxdepth=\maxdimen + \showboxbreadth=\maxdimen + \tracingonline=\@ne + \Expect*{\HstringA}*{\HstringB}% + \Expect*{\HstringA}*{\HstringC}% + \Expect*{\the\wd0}*{\the\wd2}% + \ifdim\wd0=\wd2 % + \else + \showbox0 % + \showbox2 % + \fi + \Expect*{\the\ht0}*{\the\ht2}% + \Expect*{\the\dp0}*{\the\dp2}% + \Expect*{\the\wd\boxB}*{\the\wd\boxA}% + \Expect*{\the\wd\boxC}*{\the\wd\boxA}% + \Expect*{\the\ht\boxB}*{\the\ht\boxA}% + \ifdim\ht\boxB=\ht\boxA + \else + \showbox\boxA + \showbox\boxB + \fi + \Expect*{\the\ht\boxC}*{\the\ht\boxA}% + \Expect*{\the\dp\boxB}*{\the\dp\boxA}% + \Expect*{\the\dp\boxC}*{\the\dp\boxA}% + \end{qstest}% +} +\newcommand*{\SetTestVBox}[2]{% + \setbox#1=\vbox{% + \hsize=0pt\relax + \hfuzz=100mm\relax + \expandafter\testdriver\expandafter{#2}% + }% +} +\newcommand*{\TestInfo}[2]{% + \par + \noindent + \copy#1\relax + \hfill + \begingroup + \small + \ifdim\wd0=\wd2\relax + \ifdim\wd0=\wd4\relax + \else + \ifnum#1=2 % + \raisebox{.5\baselineskip}[0pt][0pt]{% + \llap{$\}$ }% + \rlap{width = \the\wd#1\relax\space$\{$}% + \phantom{width = 999.99999pt}% + \qquad + }% + \else + \ifnum#1=4 % + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \qquad + \fi + \fi + \fi + \else + \begingroup + \bfseries + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \endgroup + \qquad + \fi + \rlap{(#2)}% + \phantom{(original soul)}% + \endgroup + \par +} +\newcommand*{\TestInfoVBox}{% + \par + \noindent + \mbox{\vrule\relax\space\copy\boxA}% + \ifdim\ht\boxA=\ht\boxB + \else + \hfill + \begingroup + \small + \rlap{(soulutf8)}% + \phantom{(soulutf8)}% + \endgroup + \par + \noindent + \mbox{\vrule\relax\space\copy\boxB}% + \hfill + \begingroup + \small + \rlap{(soul)}% + \phantom{(soulutf8)}% + \endgroup + \fi + \par +} +\makeatletter +\newcommand*{\Test}[3]{% + \clearpage + \begingroup + \def\linebreak{\textbackslash linebreak }% + \def\\{\textbackslash\textbackslash}% + \def\soulomit##1{% + \textbackslash soulomit\textbraceleft##1\textbraceright + }% + \def\mbox##1{% + \textbackslash mbox\textbraceleft##1\textbraceright + }% + \def\abc{\textbackslash abc }% + \def\texttt##1{% + \textbackslash texttt\textbraceleft##1\textbraceright + }% + \def\c##1{% + \textbackslash c\textbraceleft##1\textbraceright + }% + \csname protected@edef\endcsname\x{\endgroup + \noexpand\section{String #1: #2}% + }% + \x + \TestDriver{so}{#1}{#2}{#3}% + \TestDriver{caps}{#1}{#2}{#3}% + \TestDriver{ul}{#1}{#2}{#3}% + \TestDriver{st}{#1}{#2}{#3}% + \TestDriver{hl}{#1}{#2}{#3}% + \TestDriver{an}{#1}{#2}{#3}% + \TestDriver{sy}{#1}{#2}{#3}% + \TestDriver{soulH}{#1}{#2}{#3}% +} +\makeatother +\begin{document} + \Test A{}{}% + \Test B{Hello World}{Hello World}% + \Test C{% + Umlauts: ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f% + }{% + Umlauts: \"A\"O\"U\"a\"o\"u\ss + }% + \Test D{Euro: ^^e2^^82^^ac}{Euro: \texteuro}% + \Test E{Stra^^c3^^9fe}{Stra\ss e}% + \Test F{R^^c3^^b6mer}{R\"omer}% + \Test G{A^^e2^^80^^93B^^e2^^80^^94C}{A--B---C}% + \Test H{X^^c2^^a0Y}{X~Y}% + \Test I{A^^c5^^a4}{A\v T}% + \Test J{A,B,,C,,,D,,,,E}{A,B,,C,,,D,,,,E}% + \Test K{A'B''C'''D''''E}{A'B''C'''D''''E}% + \Test L{A`B``C```D````E}{A`B``C```D````E}% + \Test M{A$x$B}{A$x$B}% + \Test N{A\mbox{abc}B}{A\mbox{abc}B}% + \Test O{,,TA''}{,,TA''}% + \Test P{{!`}Hola{?`}}{{!`}Hola{?`}}% + \Test Q{re-sent\slash x}{re-sent\slash x}% + \Test R{new\\line}{new\\line}% + \Test S{foo\linebreak bar}{foo\linebreak bar}% + \Test T{Virchow{sche}}{Virchow{sche}}% + \Test U{A\soulomit{foo}B}{A\soulomit{foo}B}% + \Test V{A\texttt{xyz}B}{A\texttt{xyz}B}% + \Test W{ffi}{ffi}% + \Test X{f{}f{}i}{f{}f{}i}% + \Test Y{f\mbox{}f\mbox{}i}{f\mbox{}f\mbox{}i}% + \Test Z{\c{\"a}}{{\c{\"a}}}% +\end{document} +\endinput +%% +%% End of file `soulutf8-test4.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test5.tex b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test5.tex new file mode 100644 index 00000000000..41795b145ac --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/soulutf8-test5.tex @@ -0,0 +1,370 @@ +%% +%% This is file `soulutf8-test5.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% soulutf8.dtx (with options: `test5,utf8x,noetex') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 soulutf8.dtx +%% and the derived files +%% soulutf8.sty, soulutf8.pdf, soulutf8.ins, soulutf8.drv, +%% soulutf8-test1.tex, soulutf8-test2.tex, soulutf8-test3.tex, +%% soulutf8-test4.tex, soulutf8-test5.tex. +%% +\let\unexpanded\UNDEFINED +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{textcomp} +\usepackage[ngerman]{babel} +\expandafter\def\csname ver@hypdestopt.sty\endcsname{} +\usepackage[unicode]{hyperref} +\usepackage{bookmark} +\usepackage{color} +\usepackage{soul}[2003/11/17] +\makeatletter +\newcommand*{\@ifDefined}[1]{% + \@ifundefined{#1}{% + \@latex@error{% + \expandafter\noexpand\csname#1\endcsname undefined% + }\@ehc + }% +} +\newcommand*{\SaveOrg}[1]{% + \@ifdefinable{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname ORG@SOUL@#1\expandafter\endcsname + \csname SOUL@#1\endcsname + }% + }% +} +\newcommand*{\RestoreOrg}[1]{% + \@ifDefined{ORG@SOUL@#1}{% + \@ifDefined{SOUL@#1}{% + \expandafter\let\csname SOUL@#1\expandafter\endcsname + \csname ORG@SOUL@#1\endcsname + }% + }% +} +\makeatother +\SaveOrg{eval} +\SaveOrg{splittoken} +\SaveOrg{flushcomma} +\SaveOrg{flushapo} +\SaveOrg{grave} +\SaveOrg{addgroup} +\SaveOrg{addmath} +\SaveOrg{addprotect} +\SaveOrg{addtoken} +\usepackage{soulutf8}[2007/09/09] +\let\origshow\show +\usepackage[utf8x]{inputenc} +\AtBeginDocument{% + \let\show\origshow +} +\makeatletter +\DeclareRobustCommand*{\an}{% + \def\SOUL@preamble{$^{^P}$}% + \def\SOUL@everyspace##1{##1\texttt{\char`\ }\linebreak[2]}% + \def\SOUL@postamble{$^{^E}$}% + \def\SOUL@everyhyphen{$^{^-}$\linebreak[1]}% + \def\SOUL@everyexhyphen##1{##1$^{^=}$}% + \def\SOUL@everysyllable{$^{^S}$}% + \def\SOUL@everytoken{\the\SOUL@token$^{^T}$}% + \def\SOUL@everylowerthan{$^{^L}$}% + \SOUL@ +} +\DeclareRobustCommand*{\sy}{% + \SOUL@setup + \def\SOUL@preamble{% + \lefthyphenmin=\z@ + \righthyphenmin=\z@ + }% + \def\SOUL@everyspace##1{##1\space}% + \def\SOUL@everysyllable{\the\SOUL@syllable}% + \def\SOUL@everyhyphen{% + \discretionary{% + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{% + \hbox{\kern1pt$\cdot$}% + }% + }% + \def\SOUL@everyexhyphen##1{% + \SOUL@setkern\SOUL@hyphkern + \hbox{##1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% + }% + \SOUL@ +} +\DeclareRobustCommand*{\soulH}{% + \def\SOUL@preamble{% + \gdef\SOULH{}% + \soulHadd{[}% + }% + \def\SOUL@everyspace##1{% + \soulHadd{Sp}% + }% + \def\SOUL@postamble{% + \soulHadd{]}% + }% + \def\SOUL@everyhyphen{% + \soulHadd{Hy}% + }% + \def\SOUL@everyexhyphen##1{% + \soulHadd{Exhy}% + }% + \def\SOUL@everysyllable{% + \soulHadd{Sy}% + }% + \def\SOUL@everytoken{% + \soulHadd{T}% + }% + \def\SOUL@everylowerthan{% + \soulHadd{<}% + }% + \SOUL@ +} +\newcommand*{\soulHadd}[1]{% + #1% + \expandafter\gdef\expandafter\soulHstring\expandafter{% + \soulHstring + #1% + }% +} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\newsavebox\boxA +\newsavebox\boxB +\newsavebox\boxC +\newcommand*{\TestDriver}[4]{% + \subsection{Driver #1}% + \@PackageInfo{soulutf8-test}{* Driver #1}% + \expandafter\let\expandafter\testdriver\csname #1\endcsname + \def\teststringA{#3}% + \def\teststringB{#4}% + \begin{qstest}{string-#2-driver-#1}{string,#2,driver,#1}% + \@PackageInfo{soulutf8-test}{* Version: soulutf8}% + \global\let\soulHstring\@empty + \setbox0=\hbox{\expandafter\testdriver\expandafter{\teststringA}}% + \let\HstringA\soulHstring + \SetTestVBox{\boxA}{\teststringA}% + % + \@PackageInfo{soulutf8-test}{* Version: soul + patch}% + \global\let\soulHstring\@empty + \RestoreOrg{eval}% + \setbox2=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringB\soulHstring + \SetTestVBox{\boxB}{\teststringB}% + % + \@PackageInfo{soulutf8-test}{* Version: original soul}% + \global\let\soulHstring\@empty + \RestoreOrg{splittoken}% + \RestoreOrg{flushcomma}% + \RestoreOrg{flushapo}% + \RestoreOrg{grave}% + \RestoreOrg{addgroup}% + \RestoreOrg{addmath}% + \RestoreOrg{addprotect}% + \RestoreOrg{addtoken}% + \setbox4=\hbox{\expandafter\testdriver\expandafter{\teststringB}}% + \let\HstringC\soulHstring + \SetTestVBox{\boxC}{\teststringB}% + % + \TestInfo{0}{soulutf8}% + \TestInfo{2}{soul + patch}% + \TestInfo{4}{original soul}% + \TestInfoVBox + \showboxdepth=\maxdimen + \showboxbreadth=\maxdimen + \tracingonline=\@ne + \Expect*{\HstringA}*{\HstringB}% + \Expect*{\HstringA}*{\HstringC}% + \Expect*{\the\wd0}*{\the\wd2}% + \ifdim\wd0=\wd2 % + \else + \showbox0 % + \showbox2 % + \fi + \Expect*{\the\ht0}*{\the\ht2}% + \Expect*{\the\dp0}*{\the\dp2}% + \Expect*{\the\wd\boxB}*{\the\wd\boxA}% + \Expect*{\the\wd\boxC}*{\the\wd\boxA}% + \Expect*{\the\ht\boxB}*{\the\ht\boxA}% + \ifdim\ht\boxB=\ht\boxA + \else + \showbox\boxA + \showbox\boxB + \fi + \Expect*{\the\ht\boxC}*{\the\ht\boxA}% + \Expect*{\the\dp\boxB}*{\the\dp\boxA}% + \Expect*{\the\dp\boxC}*{\the\dp\boxA}% + \end{qstest}% +} +\newcommand*{\SetTestVBox}[2]{% + \setbox#1=\vbox{% + \hsize=0pt\relax + \hfuzz=100mm\relax + \expandafter\testdriver\expandafter{#2}% + }% +} +\newcommand*{\TestInfo}[2]{% + \par + \noindent + \copy#1\relax + \hfill + \begingroup + \small + \ifdim\wd0=\wd2\relax + \ifdim\wd0=\wd4\relax + \else + \ifnum#1=2 % + \raisebox{.5\baselineskip}[0pt][0pt]{% + \llap{$\}$ }% + \rlap{width = \the\wd#1\relax\space$\{$}% + \phantom{width = 999.99999pt}% + \qquad + }% + \else + \ifnum#1=4 % + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \qquad + \fi + \fi + \fi + \else + \begingroup + \bfseries + \rlap{width = \the\wd#1}% + \phantom{width = 999.99999pt}% + \endgroup + \qquad + \fi + \rlap{(#2)}% + \phantom{(original soul)}% + \endgroup + \par +} +\newcommand*{\TestInfoVBox}{% + \par + \noindent + \mbox{\vrule\relax\space\copy\boxA}% + \ifdim\ht\boxA=\ht\boxB + \else + \hfill + \begingroup + \small + \rlap{(soulutf8)}% + \phantom{(soulutf8)}% + \endgroup + \par + \noindent + \mbox{\vrule\relax\space\copy\boxB}% + \hfill + \begingroup + \small + \rlap{(soul)}% + \phantom{(soulutf8)}% + \endgroup + \fi + \par +} +\makeatletter +\newcommand*{\Test}[3]{% + \clearpage + \begingroup + \def\linebreak{\textbackslash linebreak }% + \def\\{\textbackslash\textbackslash}% + \def\soulomit##1{% + \textbackslash soulomit\textbraceleft##1\textbraceright + }% + \def\mbox##1{% + \textbackslash mbox\textbraceleft##1\textbraceright + }% + \def\abc{\textbackslash abc }% + \def\texttt##1{% + \textbackslash texttt\textbraceleft##1\textbraceright + }% + \def\c##1{% + \textbackslash c\textbraceleft##1\textbraceright + }% + \count@=128 % + \loop + \ifnum\count@<256 % + \lccode`\~=\count@ + \lowercase{% + \def~{\noexpand~}% + }% + \advance\count@\@ne + \repeat + \csname protected@edef\endcsname\x{\endgroup + \noexpand\section{String #1: #2}% + }% + \x + \TestDriver{so}{#1}{#2}{#3}% + \TestDriver{caps}{#1}{#2}{#3}% + \TestDriver{ul}{#1}{#2}{#3}% + \TestDriver{st}{#1}{#2}{#3}% + \TestDriver{hl}{#1}{#2}{#3}% + \TestDriver{an}{#1}{#2}{#3}% + \TestDriver{sy}{#1}{#2}{#3}% + \TestDriver{soulH}{#1}{#2}{#3}% +} +\makeatother +\begin{document} + \Test A{}{}% + \Test B{Hello World}{Hello World}% + \Test C{% + Umlauts: ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f% + }{% + Umlauts: \"A\"O\"U\"a\"o\"u\ss + }% + \Test D{Euro: ^^e2^^82^^ac}{Euro: \texteuro}% + \Test E{Stra^^c3^^9fe}{Stra\ss e}% + \Test F{R^^c3^^b6mer}{R\"omer}% + \Test G{A^^e2^^80^^93B^^e2^^80^^94C}{A--B---C}% + \Test H{X^^c2^^a0Y}{X~Y}% + \Test I{A^^c5^^a4}{A\v T}% + \Test J{A,B,,C,,,D,,,,E}{A,B,,C,,,D,,,,E}% + \Test K{A'B''C'''D''''E}{A'B''C'''D''''E}% + \Test L{A`B``C```D````E}{A`B``C```D````E}% + \Test M{A$x$B}{A$x$B}% + \Test N{A\mbox{abc}B}{A\mbox{abc}B}% + \Test O{,,TA''}{,,TA''}% + \Test P{{!`}Hola{?`}}{{!`}Hola{?`}}% + \Test Q{re-sent\slash x}{re-sent\slash x}% + \Test R{new\\line}{new\\line}% + \Test S{foo\linebreak bar}{foo\linebreak bar}% + \Test T{Virchow{sche}}{Virchow{sche}}% + \Test U{A\soulomit{foo}B}{A\soulomit{foo}B}% + \Test V{A\texttt{xyz}B}{A\texttt{xyz}B}% + \Test W{ffi}{ffi}% + \Test X{f{}f{}i}{f{}f{}i}% + \Test Y{f\mbox{}f\mbox{}i}{f\mbox{}f\mbox{}i}% + \Test Z{\c{\"a}}{{\c{\"a}}}% +\end{document} +\endinput +%% +%% End of file `soulutf8-test5.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test1.tex new file mode 100644 index 00000000000..a43e30ed4ca --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test1.tex @@ -0,0 +1,109 @@ +%% +%% This is file `stringenc-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% stringenc.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 stringenc.dtx +%% and the derived files +%% stringenc.sty, stringenc.pdf, stringenc.ins, stringenc.drv, +%% se-utf32be.def, se-utf32le.def, se-utf8.def, se-utf16le.def, +%% se-pdfdoc.def, se-iso-8859-1.def, se-cp1252.def, +%% se-ascii.def, se-iso-8859-2.def, se-iso-8859-3.def, +%% se-iso-8859-4.def, se-iso-8859-5.def, se-iso-8859-6.def, +%% se-iso-8859-7.def, se-iso-8859-8.def, se-iso-8859-9.def, +%% se-iso-8859-10.def, se-iso-8859-11.def, se-iso-8859-13.def, +%% se-iso-8859-14.def, se-iso-8859-15.def, se-iso-8859-16.def, +%% se-koi8-r.def, se-nextstep.def, se-mac-centeuro.def, +%% se-mac-cyrillic.def, se-mac-roman.def, se-dec-mcs.def, +%% se-cp437.def, se-cp850.def, se-cp852.def, se-cp855.def, +%% se-cp858.def, se-cp865.def, se-cp866.def, se-cp1250.def, +%% se-cp1251.def, se-cp1257.def, stringenc-test1.tex, +%% stringenc-test2.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{minimal} +\makeatletter + +\newcommand*{\RestoreCatcodes}{} +\count@=0 % +\loop + \edef\RestoreCatcodes{% + \RestoreCatcodes + \catcode\the\count@=\the\catcode\count@\relax + }% +\ifnum\count@<255 % + \advance\count@\@ne +\repeat + +\newcommand*{\RangeCatcodeInvalid}[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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \usepackage{stringenc}[2007/10/22]% + \RestoreCatcodes +} +\Test + +\ifx\numexpr\relax + \expandafter\@@end +\fi + +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\def\Test#1{% + \begin{qstest}{loading}{loading}% + \setbox0=\hbox{% + \def\par{p}% + \RangeCatcodeInvalid{0}{255}% + \StringEncodingLoad{#1}% + }% + \Expect*{\the\wd0}{0.0pt}% + \end{qstest}% +} +\@for\x:=\StringEncodingList\do{% + \Test\x +} +\@@end +\endinput +%% +%% End of file `stringenc-test1.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test2.tex b/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test2.tex new file mode 100644 index 00000000000..e1f5df8704d --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/stringenc-test2.tex @@ -0,0 +1,367 @@ +%% +%% This is file `stringenc-test2.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% stringenc.dtx (with options: `test2') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 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 stringenc.dtx +%% and the derived files +%% stringenc.sty, stringenc.pdf, stringenc.ins, stringenc.drv, +%% se-utf32be.def, se-utf32le.def, se-utf8.def, se-utf16le.def, +%% se-pdfdoc.def, se-iso-8859-1.def, se-cp1252.def, +%% se-ascii.def, se-iso-8859-2.def, se-iso-8859-3.def, +%% se-iso-8859-4.def, se-iso-8859-5.def, se-iso-8859-6.def, +%% se-iso-8859-7.def, se-iso-8859-8.def, se-iso-8859-9.def, +%% se-iso-8859-10.def, se-iso-8859-11.def, se-iso-8859-13.def, +%% se-iso-8859-14.def, se-iso-8859-15.def, se-iso-8859-16.def, +%% se-koi8-r.def, se-nextstep.def, se-mac-centeuro.def, +%% se-mac-cyrillic.def, se-mac-roman.def, se-dec-mcs.def, +%% se-cp437.def, se-cp850.def, se-cp852.def, se-cp855.def, +%% se-cp858.def, se-cp865.def, se-cp866.def, se-cp1250.def, +%% se-cp1251.def, se-cp1257.def, stringenc-test1.tex, +%% stringenc-test2.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\nofiles +\documentclass{minimal} + +\ifx\plainmode Y + \let\SavedNumexpr\numexpr + \let\numexpr\relax +\fi +\usepackage{stringenc}[2007/10/22] +\ifx\plainmode Y + \let\numexpr\SavedNumexpr +\fi +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} + +\def\Test#1#2#3#4#5{% + \begingroup + \edef\x{\endgroup + \noexpand\TestTest{#1}{#2}{#3}{#4}#5||\noexpand\NIL + }% + \x +} +\def\TestTest#1#2#3#4#5|#6|#7\NIL{% + \begin{qstest}{encodings}{encodings, conversion}% + \setbox0=\hbox{% + \def\par{p}% + \EdefUnescapeHex\IN{#4}% + \StringEncodingConvert\RESULT\IN{#1}{#2}% + \EdefEscapeHex\RESULT\RESULT + \Expect*{\RESULT}*{#5#6}% + \Expect*{\StringEncodingSuccessFailure{true}{false}}{#3}% + \StringEncodingSuccessFailure{}{% + \StringEncodingConvertTest\RESULT\IN{#1}{#2}{% + }{% + \EdefEscapeHex\RESULT\RESULT + \Expect*{\RESULT}{#5}% + }% + }% + }% + \Expect*{\the\wd0}{0.0pt}% + \end{qstest}% +} + +\def\AllBytesLow{% + 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F% + 202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F% + 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F% + 606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F% +} +\def\AllBytesHigh{% + 808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\def\AllBytes{% + \AllBytesLow + \AllBytesHigh +} +\def\AllUnicodesLow{% + 0000000100020003000400050006000700080009000A000B000C000D000E000F% + 0010001100120013001400150016001700180019001A001B001C001D001E001F% + 0020002100220023002400250026002700280029002A002B002C002D002E002F% + 0030003100320033003400350036003700380039003A003B003C003D003E003F% + 0040004100420043004400450046004700480049004A004B004C004D004E004F% + 0050005100520053005400550056005700580059005A005B005C005D005E005F% + 0060006100620063006400650066006700680069006A006B006C006D006E006F% + 0070007100720073007400750076007700780079007A007B007C007D007E007F% +} +\Test{utf16be}{utf16be}{true}% + {004D04304E8CD800DF02}% + {004D04304E8CD800DF02}% +\Test{utf16}{utf16be}{true}% + {004D04304E8CD800DF02}% + {004D04304E8CD800DF02}% +\Test{utf16be}{utf16}{true}% + {004D04304E8CD800DF02}% + {004D04304E8CD800DF02}% +\Test{utf16}{utf16}{true}% + {004D04304E8CD800DF02}% + {004D04304E8CD800DF02}% +\Test{utf16}{utf16}{true}% + {FEFF004D04304E8CD800DF02}% + {004D04304E8CD800DF02}% +\Test{utf16}{utf16}{true}% + {FFFE4D0030048C4E00D802DF}% + {004D04304E8CD800DF02}% +\Test{utf16be}{utf32be}{true}% + {004D04304E8CD800DF02}% + {0000004D0000043000004E8C00010302}% +\Test{utf16be}{utf32le}{true}% + {004D04304E8CD800DF02}% + {4D000000300400008C4E000002030100}% +\Test{utf32be}{utf16}{true}% + {0000004D0000043000004E8C00010302}% + {004D04304E8CD800DF02}% +\Test{utf32le}{utf16}{true}% + {4D000000300400008C4E000002030100}% + {004D04304E8CD800DF02}% +\Test{utf32}{utf16}{true}% + {0000004D0000043000004E8C00010302}% + {004D04304E8CD800DF02}% +\Test{utf32}{utf16}{true}% + {0000FEFF0000004D0000043000004E8C00010302}% + {004D04304E8CD800DF02}% +\Test{utf32}{utf16}{true}% + {FFFE00004D000000300400008C4E000002030100}% + {004D04304E8CD800DF02}% +\Test{utf32be}{utf16be}{false}{FFFFFFFF}{} +\Test{utf32be}{utf16be}{false}{0000004DFFFFFFFF}{004D} +\Test{utf32be}{utf16be}{false}{FFFFFFFF0000004D}{|004D} +\Test{utf32be}{utf16be}{false}{0000004DFFFFFFFF00000430}{004D|0430} +\Test{utf32be}{utf16be}{false}{FFFFFFFF0000004DFFFFFFFF}{|004D} +\Test{utf32be}{utf16be}{false}{FFFFFF}{} +\Test{utf32be}{utf16be}{false}{0000004DFFFFFF}{004D} +\Test{utf32be}{utf16be}{false}{FFFFFF0000004D}{} +\Test{utf32be}{utf16be}{false}{0000004DFFFFFF00000430}{004D} +\Test{utf32be}{utf16be}{false}{FFFFFF0000004DFFFFFF}{|4DFF} +\Test{utf32be}{utf16be}{false}{FFFF}{} +\Test{utf32be}{utf16be}{false}{0000004DFFFF}{004D} +\Test{utf32be}{utf16be}{false}{FFFF0000004D}{} +\Test{utf32be}{utf16be}{false}{0000004DFFFF00000430}{004D} +\Test{utf32be}{utf16be}{false}{FF}{} +\Test{utf32be}{utf16be}{false}{0000004DFF}{004D} +\Test{utf32be}{utf16be}{false}{FF0000004D}{} +\Test{utf32be}{utf16be}{false}{0000004DFF00000430}{004D} +\Test{utf16be}{utf32be}{true}{DBBFDFFF}{000FFFFF} +\Test{utf16be}{utf8}{true}% + {004D04304E8CD800DF02}% + {4DD0B0E4BA8CF0908C82}% +\Test{utf32}{utf8}{true}% + {000000000000007F000000800000FFFF000100000010FFFF}% + {007FC280EFBFBFF0908080F48FBFBF}% +\Test{utf8}{utf16}{true}% + {007FC280EFBFBFF0908080F48FBFBF}% + {0000007F0080FFFFD800DC00DBFFDFFF}% +\Test{utf16}{utf32}{true}% + {0000007F0080FFFFD800DC00DBFFDFFF}% + {000000000000007F000000800000FFFF000100000010FFFF}% +\Test{utf8}{utf32}{true}% + {007FC280EFBFBFF0908080F48FBFBF}% + {000000000000007F000000800000FFFF000100000010FFFF}% +\Test{utf8}{utf16}{false}{64F57F}{|0064007F} +\Test{utf8}{utf16}{false}{64FE7F}{|0064007F} +\Test{utf8}{utf16}{false}{64FF7F}{|0064007F} +\Test{utf8}{utf16}{false}{80}{} +\Test{utf8}{utf16}{false}{7F807F}{007F|007F} +\Test{utf8}{utf16}{false}{C0}{} +\Test{utf8}{utf16}{false}{7FC07F}{|007F007F} +\Test{utf8}{utf16}{false}{C1}{} +\Test{utf8}{utf16}{false}{7FC17F}{|007F007F} +\Test{utf8}{utf16}{false}{C080}{} +\Test{utf8}{utf16}{false}{C2}{} +\Test{utf8}{utf16}{false}{C2CF}{} +\Test{utf8}{utf16}{false}{12C27F}{0012|007F} +\Test{utf8}{utf16}{true}{C280}{0080} +\Test{utf8}{utf16}{true}{DFBF}{07FF} +\Test{utf8}{utf16}{false}{E0}{} +\Test{utf8}{utf16}{false}{E07F}{|007F} +\Test{utf8}{utf16}{false}{E0A0}{} +\Test{utf8}{utf16}{false}{E0A07F}{|007F} +\Test{utf8}{utf16}{false}{E08080}{} +\Test{utf8}{utf16}{false}{E080807F}{|007F} +\Test{utf8}{utf16}{true}{ED8080}{D000} +\Test{utf8}{utf16}{true}{ED9FBF}{D7FF} +\Test{utf8}{utf16}{true}{EE8080}{E000} +\Test{utf8}{utf16}{true}{EFBFBF}{FFFF} +\Test{utf8}{utf32}{false}{F0}{} +\Test{utf8}{utf32}{false}{F07F}{|0000007F} +\Test{utf8}{utf32}{false}{F090}{} +\Test{utf8}{utf32}{false}{F0907F}{|0000007F} +\Test{utf8}{utf32}{false}{F09080}{} +\Test{utf8}{utf32}{false}{F090807F}{|0000007F} +\Test{utf8}{utf32}{true}{F0908080}{00010000} +\Test{utf8}{utf32}{false}{F0808080}{} +\Test{utf8}{utf32}{false}{F08080807F}{|0000007F} +\Test{utf8}{utf32}{true}{F1808080}{00040000} +\Test{utf8}{utf32}{true}{F3BFBFBF}{000FFFFF} +\Test{utf8}{utf32}{true}{F4808080}{00100000} +\Test{utf8}{utf32}{true}{F48FBFBF}{0010FFFF} +\Test{utf8}{utf32}{false}{F4BFBFBF}{} +\Test{utf8}{utf32}{false}{F4BFBFBF7F}{|0000007F} +\Test{utf16be}{utf8}{true}{0000}{00} +\Test{utf16be}{utf8}{true}{007F}{7F} +\Test{utf16be}{utf8}{true}{0080}{C280} +\Test{utf16be}{utf8}{true}{07FF}{DFBF} +\Test{utf16be}{utf8}{true}{0800}{E0A080} +\Test{utf16be}{utf8}{true}{0FFF}{E0BFBF} +\Test{utf16be}{utf8}{true}{1000}{E18080} +\Test{utf16be}{utf8}{true}{CFFF}{ECBFBF} +\Test{utf16be}{utf8}{true}{D000}{ED8080} +\Test{utf16be}{utf8}{true}{D7FF}{ED9FBF} +\Test{utf16be}{utf8}{false}{D800}{} +\Test{utf16be}{utf8}{false}{DFFF}{} +\Test{utf16be}{utf8}{true}{E000}{EE8080} +\Test{utf16be}{utf8}{true}{FFFF}{EFBFBF} +\Test{utf32be}{utf8}{true}{00010000}{F0908080} +\Test{utf32be}{utf8}{true}{0003FFFF}{F0BFBFBF} +\Test{utf32be}{utf8}{true}{00040000}{F1808080} +\Test{utf32be}{utf8}{true}{000FFFFF}{F3BFBFBF} +\Test{utf32be}{utf8}{true}{00100000}{F4808080} +\Test{utf32be}{utf8}{true}{0010FFFF}{F48FBFBF} +\Test{utf32be}{utf8}{false}{00110000}{} +\Test{utf32be}{utf8}{false}{001100000000007F}{|7F} +\Test{ascii}{utf8}{true}{007F}{007F} +\Test{ascii}{utf8}{false}{80}{} +\Test{ascii}{utf8}{false}{80}{} +\Test{ascii}{utf8}{false}{807F}{|7F} +\Test{utf16be}{ascii}{true}{0000007F}{007F} +\Test{utf16be}{ascii}{false}{0080}{} +\Test{utf16be}{ascii}{false}{0430}{} +\Test{utf16be}{ascii}{false}{D800DF02}{} +\Test{utf16be}{ascii}{false}{D800DF02007F}{|7F} +\Test{ascii}{utf16be}{true}\AllBytesLow\AllUnicodesLow +\Test{utf16be}{ascii}{true}\AllUnicodesLow\AllBytesLow +\def\pdfdocSlots{% + 090A0D18191A1B1C1D1E1F% + 202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F% + 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F% + 606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E% + 808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E% + A0A1A2A3A4A5A6A7A8A9AAABACAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\def\pdfdocUnicodes{% + 0009000A000D02D802C702C602D902DD02DB02DA02DC% + 0020002100220023002400250026002700280029002A002B002C002D002E002F% + 0030003100320033003400350036003700380039003A003B003C003D003E003F% + 0040004100420043004400450046004700480049004A004B004C004D004E004F% + 0050005100520053005400550056005700580059005A005B005C005D005E005F% + 0060006100620063006400650066006700680069006A006B006C006D006E006F% + 0070007100720073007400750076007700780079007A007B007C007D007E% + 202220202021202620142013019220442039203A22122030201E201C201D2018% + 2019201A2122FB01FB020141015201600178017D0131014201530161017E% + 20AC00A100A200A300A400A500A600A700A800A900AA00AB00AC00AE00AF% + 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF% + 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF% + 00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF% + 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF% + 00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF% +} +\Test{pdfdoc}{utf16be}{false}% + {0001020304050607080B0C0E0F10111213141516177F9FAD}% + {}% +\Test{pdfdoc}{utf16be}{true}\pdfdocSlots\pdfdocUnicodes +\Test{pdfdoc}{utf16be}{false}\AllBytes{|\pdfdocUnicodes}% +\Test{utf16be}{pdfdoc}{true}\pdfdocUnicodes\pdfdocSlots +\Test{utf16be}{pdfdoc}{true}{FEFF0054006500730074}{54657374} +\Test{iso-8859-1}{utf16be}{true}{007FA0FF}{0000007F00A000FF} +\Test{iso-8859-1}{utf16be}{false}{80}{} +\Test{iso-8859-1}{utf16be}{false}{807F}{|007F} +\Test{iso-8859-1}{utf16be}{false}{9F}{} +\Test{iso-8859-1}{utf16be}{false}{9F7F}{|007F} +\def\Slots{% + \AllBytesLow + 8082838485868788898A8B8C8E9192939495969798999A9B9C9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\def\Unicodes{% + \AllUnicodesLow + 20AC201A0192201E20262020202102C62030016020390152017D% + 20182019201C201D20222013201402DC21220161203A0153017E0178% + 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF% + 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF% + 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF% + 00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF% + 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF% + 00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF% +} +\Test{cp1252}{utf16be}{false}{818D8F909D}{} +\Test{cp1252}{utf16be}{true}\Slots\Unicodes +\Test{utf16be}{cp1252}{true}\Unicodes\Slots +\def\Slots{% + \AllBytesLow + 808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F% + A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF% +} +\def\Unicodes{% + \AllUnicodesLow + 25002502250C251025142518251C2524252C2534253C258025842588258C2590% + 259125922593232025A02219221A22482264226500A0232100B000B200B700F7% + 25502551255204512553255425552556255725582559255A255B255C255D255E% + 255F25602561040125622563256425652566256725682569256A256B256C00A9% + 044E0430043104460434043504440433044504380439043A043B043C043D043E% + 043F044F044004410442044304360432044C044B04370448044D04490447044A% + 042E0410041104260414041504240413042504180419041A041B041C041D041E% + 041F042F042004210422042304160412042C042B04170428042D04290427042A% +} +\Test{koi8-r}{utf16be}{true}\Slots\Unicodes +\Test{utf16be}{koi8-r}{true}\Unicodes\Slots +\def\Slots{% + \AllBytesLow + A1A2A3A5A7A8A9AAABB0B1B2B3B5B6B7B9BABBBCBDBF% + C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD1D2D3D4D5D6D7D8D9DADBDCDDDF% + E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF1F2F3F4F5F6F7F8F9FAFBFCFD% +} +\def\Unicodes{% + \AllUnicodesLow + 00A100A200A300A500A700A400A900AA00AB% + 00B000B100B200B300B500B600B700B900BA00BB00BC00BD00BF% + 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF% + 00D100D200D300D400D500D6015200D800D900DA00DB00DC017800DF% + 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF% + 00F100F200F300F400F500F6015300F800F900FA00FB00FC00FF% +} +\Test{dec-mcs}{utf16be}{true}\Slots\Unicodes +\Test{dec-mcs}{utf16be}{false}{C0BEC2}{00C0|00C2} +\Test{utf16be}{dec-mcs}{true}\Unicodes\Slots +\Test{utf16be}{utf16be}{true}{FEFF}{} +\Test{utf16be}{utf16be}{true}{FFFE}{FFFE} +\Test{utf16le}{utf16le}{true}{FFFE}{} +\Test{utf16le}{utf16le}{true}{FEFF}{FEFF} +\Test{utf32be}{utf32be}{true}{0000FEFF}{} +\Test{utf32be}{utf32be}{true}{0000FFFE}{0000FFFE} +\Test{utf32le}{utf32le}{true}{FFFE0000}{} +\Test{utf32le}{utf32le}{true}{FEFF0000}{FEFF0000} +\csname @@end\endcsname +\endinput +%% +%% End of file `stringenc-test2.tex'. diff --git a/Master/texmf-dist/doc/latex/oberdiek/test/telprint-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/test/telprint-test1.tex new file mode 100644 index 00000000000..ed748e0c77a --- /dev/null +++ b/Master/texmf-dist/doc/latex/oberdiek/test/telprint-test1.tex @@ -0,0 +1,74 @@ +%% +%% This is file `telprint-test1.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% telprint.dtx (with options: `test1') +%% +%% This is a generated file. +%% +%% Copyright (C) 1996, 1997, 2004, 2005, 2006, 2007 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 telprint.dtx +%% and the derived files +%% telprint.sty, telprint.pdf, telprint.ins, telprint.drv, +%% telprint-test1.tex. +%% +\catcode`\@=11 % +\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}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input telprint.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +\endinput +%% +%% End of file `telprint-test1.tex'. |