diff options
Diffstat (limited to 'macros/latex/contrib/oberdiek/uniquecounter.dtx')
-rw-r--r-- | macros/latex/contrib/oberdiek/uniquecounter.dtx | 311 |
1 files changed, 1 insertions, 310 deletions
diff --git a/macros/latex/contrib/oberdiek/uniquecounter.dtx b/macros/latex/contrib/oberdiek/uniquecounter.dtx index 16a2991048..172d081435 100644 --- a/macros/latex/contrib/oberdiek/uniquecounter.dtx +++ b/macros/latex/contrib/oberdiek/uniquecounter.dtx @@ -69,9 +69,6 @@ % TDS:tex/generic/oberdiek/uniquecounter.sty % TDS:doc/latex/oberdiek/uniquecounter.pdf % TDS:doc/latex/oberdiek/uniquecounter-example.tex -% TDS:doc/latex/oberdiek/test/uniquecounter-test1.tex -% TDS:doc/latex/oberdiek/test/uniquecounter-test2.tex -% TDS:doc/latex/oberdiek/test/uniquecounter-test3.tex % TDS:source/latex/oberdiek/uniquecounter.dtx % %<*ignore> @@ -148,10 +145,6 @@ and the derived files % \file{uniquecounter-test1.tex}{\from{uniquecounter.dtx}{test1}}% % \file{uniquecounter-test2.tex}{\from{uniquecounter.dtx}{test2}}% % \file{uniquecounter-test3.tex}{\from{uniquecounter.dtx}{test3}}% - \nopreamble - \nopostamble -% \usedir{source/latex/oberdiek/catalogue}% -% \file{uniquecounter.xml}{\from{uniquecounter.dtx}{catalogue}}% } \catcode32=13\relax% active space @@ -188,21 +181,6 @@ and the derived files % \fi % % -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % % \GetFileInfo{uniquecounter.drv} % @@ -530,291 +508,7 @@ and the derived files % \begin{macrocode} %</package> % \end{macrocode} -% -% \section{Test} -% -% \subsection{Catcode checks for loading} -% -% \begin{macrocode} -%<*test1> -% \end{macrocode} -% \begin{macrocode} -\catcode`\{=1 % -\catcode`\}=2 % -\catcode`\#=6 % -\catcode`\@=11 % -\expandafter\ifx\csname count@\endcsname\relax - \countdef\count@=255 % -\fi -\expandafter\ifx\csname @gobble\endcsname\relax - \long\def\@gobble#1{}% -\fi -\expandafter\ifx\csname @firstofone\endcsname\relax - \long\def\@firstofone#1{#1}% -\fi -\expandafter\ifx\csname loop\endcsname\relax - \expandafter\@firstofone -\else - \expandafter\@gobble -\fi -{% - \def\loop#1\repeat{% - \def\body{#1}% - \iterate - }% - \def\iterate{% - \body - \let\next\iterate - \else - \let\next\relax - \fi - \next - }% - \let\repeat=\fi -}% -\def\RestoreCatcodes{} -\count@=0 % -\loop - \edef\RestoreCatcodes{% - \RestoreCatcodes - \catcode\the\count@=\the\catcode\count@\relax - }% -\ifnum\count@<255 % - \advance\count@ 1 % -\repeat - -\def\RangeCatcodeInvalid#1#2{% - \count@=#1\relax - \loop - \catcode\count@=15 % - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\RangeCatcodeCheck#1#2#3{% - \count@=#1\relax - \loop - \ifnum#3=\catcode\count@ - \else - \errmessage{% - Character \the\count@\space - with wrong catcode \the\catcode\count@\space - instead of \number#3% - }% - \fi - \ifnum\count@<#2\relax - \advance\count@ 1 % - \repeat -} -\def\space{ } -\expandafter\ifx\csname LoadCommand\endcsname\relax - \def\LoadCommand{\input uniquecounter.sty\relax}% -\fi -\def\Test{% - \RangeCatcodeInvalid{0}{47}% - \RangeCatcodeInvalid{58}{64}% - \RangeCatcodeInvalid{91}{96}% - \RangeCatcodeInvalid{123}{255}% - \catcode`\@=12 % - \catcode`\\=0 % - \catcode`\%=14 % - \LoadCommand - \RangeCatcodeCheck{0}{36}{15}% - \RangeCatcodeCheck{37}{37}{14}% - \RangeCatcodeCheck{38}{47}{15}% - \RangeCatcodeCheck{48}{57}{12}% - \RangeCatcodeCheck{58}{63}{15}% - \RangeCatcodeCheck{64}{64}{12}% - \RangeCatcodeCheck{65}{90}{11}% - \RangeCatcodeCheck{91}{91}{15}% - \RangeCatcodeCheck{92}{92}{0}% - \RangeCatcodeCheck{93}{96}{15}% - \RangeCatcodeCheck{97}{122}{11}% - \RangeCatcodeCheck{123}{255}{15}% - \RestoreCatcodes -} -\Test -\csname @@end\endcsname -\end -% \end{macrocode} -% \begin{macrocode} -%</test1> -% \end{macrocode} -% -% \subsection{Macro tests} -% -% \subsubsection{Test with \LaTeX} -% -% \begin{macrocode} -%<*test2> -\NeedsTeXFormat{LaTeX2e} -\nofiles -\documentclass{minimal} -\usepackage{uniquecounter}[2016/05/16] -\usepackage{qstest} -\IncludeTests{*} -\LogTests{log}{*}{*} - -\newcommand*{\CheckValue}[2]{% - \Expect*{#2}*{\UniqueCounterGet{#1}}% -} -\newcommand*{\CheckSpace}[1]{% - \sbox0{#1}% - \Expect{0.0pt}*{\the\wd0}% -} - -\begin{qstest}{creation}{creation} - \CheckSpace{% - \UniqueCounterNew{test}% - }% - \CheckValue{test}{0}% -\end{qstest} - -\begin{qstest}{increment}{increment} - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{1}% - \makeatletter - \def\uqc@cnt@test{2147483645}% - \CheckValue{test}{2147483645}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483646}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \Expect{true}*{\ifx\uqc@inc\uqc@NumInc true\else false\fi}% - \CheckValue{test}{2147483647}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483648}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483649}% -\end{qstest} - -\begin{qstest}{call}{call} - \def\CheckCall#1#2{% - \Expect{#1}{#2}% - }% - \CheckSpace{% - \UniqueCounterNew{foo}% - }% - \CheckValue{foo}{0}% - \def\Check#1{% - \CheckSpace{% - \UniqueCounterCall{foo}{\CheckCall}{#1}% - }% - \CheckValue{foo}{#1}% - }% - \Check{1}% - \Check{2}% - \Check{3}% - \Check{4}% - \Check{5}% - \Check{6}% - \Check{7}% - \Check{8}% - \Check{9}% - \Check{10}% - \Check{11}% - \Check{12}% -\end{qstest} - -\csname @@end\endcsname -%</test2> -% \end{macrocode} -% \subsubsection{Test with plain-\TeX} -% -% \begin{macrocode} -%<*test3> -\input uniquecounter.sty\relax -\catcode`\@=11 % -\def\CheckValue#1#2{% - \begingroup - \edef\A{#2}% - \edef\B{\UniqueCounterGet{#1}}% - \ifx\A\B - \else - \@PackageError{TEST}{Failed: \A\space<> \B}\@ehc - \fi - \endgroup -} -\def\CheckSpace#1{% - \setbox0=\hbox{#1}% - \ifdim\wd0=\z@ - \else - \@PackageError{TEST}{Failed: 0.0pt <> \the\wd0}\@ehc - \fi -} - -\begingroup - \CheckSpace{% - \UniqueCounterNew{test}% - }% - \CheckValue{test}{0}% -\endgroup - -\begingroup - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{1}% - \def\uqc@cnt@test{2147483645}% - \CheckValue{test}{2147483645}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483646}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \ifx\uqc@inc\uqc@NumInc - \else - \@PackageError{TEST}{Failed: wrong inc function}\@ehc - \fi - \CheckValue{test}{2147483647}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483648}% - \CheckSpace{% - \UniqueCounterIncrement{test}% - }% - \CheckValue{test}{2147483649}% -\endgroup -\begingroup - \def\CheckCall#1#2{% - \begingroup - \def\A{#1}% - \def\B{#2}% - \ifx\A\B - \else - \@PackageError{TEST}{Failed: \A\space <> \B}\@ehc - \fi - \endgroup - }% - \CheckSpace{% - \UniqueCounterNew{foo}% - }% - \CheckValue{foo}{0}% - \CheckSpace{% - \UniqueCounterCall{foo}{\CheckCall}{1}% - }% - \CheckSpace{% - \UniqueCounterCall{foo}{\CheckCall}{2}% - }% - \CheckValue{foo}{2}% -\endgroup -\csname @@end\endcsname\end -%</test3> -% \end{macrocode} -% -% \section{Installation} +%% \section{Installation} % % \subsection{Download} % @@ -864,9 +558,6 @@ and the derived files % uniquecounter.sty & tex/generic/oberdiek/uniquecounter.sty\\ % uniquecounter.pdf & doc/latex/oberdiek/uniquecounter.pdf\\ % uniquecounter-example.tex & doc/latex/oberdiek/uniquecounter-example.tex\\ -% test/uniquecounter-test1.tex & doc/latex/oberdiek/test/uniquecounter-test1.tex\\ -% test/uniquecounter-test2.tex & doc/latex/oberdiek/test/uniquecounter-test2.tex\\ -% test/uniquecounter-test3.tex & doc/latex/oberdiek/test/uniquecounter-test3.tex\\ % uniquecounter.dtx & source/latex/oberdiek/uniquecounter.dtx\\ % \end{tabular}^^A % }^^A |