%%
%% This is file `qstest-qs.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% qstest.dtx  (with options: `test,etex')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from qstest-qs.tex.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file qstest.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\errorcontextlines=\maxdimen
%%
%% Copyright (C) 2006, 2007 QuinScape GmbH
%% http://www.quinscape.de
\RequirePackage{qstest}
\LogTests{lgout}{*}{*}
\begin{qstest}{# in isolation}{\Expect, #, \unexpanded}
  \toks0{# and #}
  \Expect*{\the\toks0}*{\unexpanded{# and #}}
\end{qstest}
\begin{qstest}{# in isolation 2}{\Expect, #, \string}
  \toks0{# and #}
  \Expect*{\the\toks0}*{\string#\string# and \string#\string#}
\end{qstest}
\begin{qstest}{# as macro parameter}{\Expect, #}
  \toks0{\def\xxx#1{}}
  \Expect\expandafter{\the\toks0}{\def\xxx#1{}}
\end{qstest}
\makeatletter
\begin{qstest}{Some LaTeX definitions}{\Expect}
  \Expect*{\meaning\@gobble}{\long macro:#1->}
  \Expect*{\the\maxdimen}{16383.99998pt}
\end{qstest}
\RequirePackage{ifthen}
\begin{qstest}{\ExpectIfThen}{\ExpectIfThen}
  \ExpectIfThen{\lengthtest{\maxdimen=16383.99998pt}\AND
    \maxdimen>1000000000}
\end{qstest}
\begin{qstest}{\InRange success}{\InRange}
  \dimen@=10pt
  \Expect*{\the\dimen@}\InRange{5pt}{15pt}
  \Expect*{\the\dimen@}\InRange{10pt}{15pt}
  \Expect*{\the\dimen@}\InRange{5pt}{10pt}
\end{qstest}
\begin{qstest}{\InRange failure}{\InRange, fails}
  \dimen@=10pt \dimen@ii=9.99998pt
  \Expect*{\the\dimen@}\InRange{5pt}{\dimen@ii}
  \dimen@ii=10.00002pt
  \Expect*{\the\dimen@}*\InRange{\the\dimen@ii}{15pt}
\end{qstest}
\begin{qstest}{\NearTo success}{\NearTo}
  \dimen@=10pt
  \Expect*{\the\dimen@}\NearTo{10.05pt}
  \Expect*{\the\dimen@}\NearTo{9.95pt}
  \Expect*{\the\dimen@}\NearTo[2pt]{12pt}
  \Expect*{\the\dimen@}\NearTo[0.1pt]{9.9pt}
\end{qstest}
\begin{qstest}{\NearTo failure}{\NearTo, fails}
  \dimen@=10pt
  \Expect*{\the\dimen@}\NearTo{10.05002pt}
  \Expect*{\the\dimen@}\NearTo[1pt]{11.00001pt}
\end{qstest}
\begin{qstest}{\SavedValue}{\SavedValue}
  \SaveValueFile{\jobname.qsout}
  \SaveValue{\InternalSetValue}*{\meaning\InternalSetValue}
  \SaveValue{\IncludeTests}*{\meaning\IncludeTests}
  \SaveValue{whatever}*{3.1415}
  \SaveValue{\maxdimen}*{\the\maxdimen}
  \Expect{Whatever}\SavedValue{\InternalSetValue}
  \Expect[\IncludeTests]{Whatever else}\SavedValue{\IncludeTests}
  \Expect[whatever]{2.71828}\SavedValue{whatever}
  \Expect[undefined]{1.618034}\SavedValue{undefined}
  \CloseValueFile
  \input{\jobname.qsout}
  \Expect*{\meaning\InternalSetValue}\SavedValue{\InternalSetValue}
  \Expect[\IncludeTests]*{\meaning\IncludeTests}%
                         \SavedValue{\IncludeTests}
  \Expect[whatever]{3.1415}\SavedValue{whatever}
  \Expect[undefined]{1.618034}\SavedValue{undefined}
\end{qstest}
\begin{qstest}{\SavedValue failure}{\SavedValue,fails}
  \Expect{Whatever}\SavedValue{\InternalSetValue}
  \Expect[\IncludeTests]{Whatever else}\SavedValue{\IncludeTests}
  \Expect{2.71828}\SavedValue{whatever}
\end{qstest}
\begin{qstest}{ExpectCallSequence}{ExpectCallSequence}
  \def\e{e} \def\f{f}
  \def\g{g} \def\h{h}
  \begin{ExpectCallSequence}{`\e#1{%
        \Expect\expandafter{\csname\CalledName#1\endcsname}{\e }%
        \Expect*{\meaning#1}{macro:->e}}+\f#1{}'}
    \e \e \e \e \f
  \end{ExpectCallSequence}
\end{qstest}
\LogClose{lgout}
\IncludeTests{*}
\makeatletter
\begin{qstest}{\LogClose}{}
\begin{ExpectCallSequence}{%
    `\PackageInfo#1#2#3{\Expect[##1]{#2}{qstest}%
      \Expect[##2]{#3}{Logging off: \jobname.log}%
      #1{#2}{#3}}'}
  \LogClose{log}
\end{ExpectCallSequence}
\end{qstest}
\begin{qstest}{\LogTests}{}
\begin{ExpectCallSequence}{%
    \PackageInfo#1#2#3{\Expect[##1]{#2}{qstest}%
      \Expect[##2]{#3}{Logging on: \jobname.log}%
      #1{#2}{#3}}}
  \LogTests{log}{*}{*}
\end{ExpectCallSequence}
\end{qstest}
\begin{qstest}{ExpectCallSequence state machine}%
  {ExpectCallSequence,internal}
  \def\foo#1#2#3{\relax\relax}
  \let\fie\relax
  \Expect*{\qst@csallocstate}{3}
  \Expect*{\qst@csalloctrans}{2}
  \begin{ExpectCallSequence}{\fie{}%
      `\foo#1#2#3{#2\bar{#3}}(\bar#1#2{#2}|.#1{})+%
      \foo#1{}}
    \Expect*{\qst@csstate}{7}
    \Expect*{\qst@csallocstate}{15}
    \foo{\Expect*{\qst@csstate}{8}}{\Expect*{\qst@csstate}{10}}
    \Expect*{\qst@csstate}{10}
    \fie
    \Expect*{\qst@csstate}{12}
    \foo
    \Expect*{\qst@csstate}{14}
    \fie
    \Expect*{\qst@csstate}{0}
    \Expect*{\meaning\fie}*{\meaning\relax}
    \foo\junk\junk\junk
    \Expect*{\qst@csstate}{0}
    \Expect*{\meaning\foo}{macro:#1#2#3->\relax \relax}
  \end{ExpectCallSequence}
\end{qstest}
 \stop

\endinput
%%
%% End of file `qstest-qs.tex'.
