From eb20b1a58efdf85ed1ef1c7091bcb414a7a60a32 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 28 Apr 2007 00:47:40 +0000
Subject: oberdiek as always, infwarerr v1.0 new and updates

git-svn-id: svn://tug.org/texlive/trunk@4200 c570f23f-e606-0410-a88d-b1316a301751
---
 .../doc/latex/oberdiek/infwarerr-test1.tex         | 212 +++++++++++++++++++++
 1 file changed, 212 insertions(+)
 create mode 100644 Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex

(limited to 'Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex')

diff --git a/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex b/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
new file mode 100644
index 00000000000..072a25c543c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/oberdiek/infwarerr-test1.tex
@@ -0,0 +1,212 @@
+%%
+%% 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.
+%% 
+\let\PackageInfo\relax
+\input infwarerr.sty\relax
+\let\OrgWrite\write
+\chardef\WriteUnused=16 %
+\def\msg#{\immediate\OrgWrite\WriteUnused}
+\msg{File: infwarerr-test1.tex 2007/04/26 v1.0 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]}%
+      \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{%
+  \@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%
+  }{%
+    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%
+  }{%
+    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%
+  }{%
+    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%
+  }{%
+    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-test1.tex'.
-- 
cgit v1.2.3

