diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-25 21:28:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-25 21:28:33 +0000 |
commit | f773331df58a7fd5a9e45fcb04799793085e41dd (patch) | |
tree | 723ade178cbcc9ab2d9d65d97e6412e57e9e91eb /Master/texmf-dist/doc/latex/fifo-stack | |
parent | ed18618d5ba20315c34cc8fe58e4989b5de500ed (diff) |
fifo-stack (25mar14)
git-svn-id: svn://tug.org/texlive/trunk@33288 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/fifo-stack')
-rw-r--r-- | Master/texmf-dist/doc/latex/fifo-stack/README | 77 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fifo-stack/fifo-stack-test.tex | 267 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.cwl | 48 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.pdf | bin | 0 -> 247557 bytes |
4 files changed, 392 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/fifo-stack/README b/Master/texmf-dist/doc/latex/fifo-stack/README new file mode 100644 index 00000000000..66f085fc107 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fifo-stack/README @@ -0,0 +1,77 @@ +# latexFifoStack + +A LaTeX implementation of a combined FIFO Stack modified from Benjamin +Bayart's excellent [LaTeX stack +package](http://www.ctan.org/tex-archive/macros/latex2e/contrib/stack) +from [CTAN](http://www.ctan.org). + +As well as keeping Bayart's \Push and \Pop commands (which have been +renamed to \FSPush and \FSPop and which work on the top/end of the +FIFO/Stack), we explicitly add the ability to \FSUnshift \FSShift off +the bottom/front of the FIFO/Stack + +# Source code + +The original source code [public +releases](https://github.com/diSimplex/latexFifoStack) and the +[development code](https://github.com/stephengaito/latexFifoStack) can +both be found on GitHub. + +# Building + +This project can most easily be built using the "cook" rubygem and the +command line command: + +> cook texStyle + +in the project's root directory. This will compile the documentation, +run the regression tests and zip the CTAN package into the directory +ctanRepo directory. + +# Copyright and LaTeX Project Public License + +Copyright (C) 2014 Stephen Gaito (PerceptiSys Ltd) + +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'. + +The Current Maintainer of this work is Stephen Gaito. + +The released source can be found at: +https://github.com/diSimplex/latexFifoStack/tree/master/texStyle + +The development source can be found at: +https://github.com/stephengaito/latexFifoStack/tree/master/texStyle + +This work consists of the files fifo-stack.dtx, and fifo-stack.ins. + +The command: + +> pdflatex fifo-stack.ins + +followed by: + +> pdflatex fifo-stack.dtx + +will produce the derived files: fifo-stack.sty, fifo-stack-test.tex, +and fifo-stack.pdf. + +The command: + +> pdflatex fifo-stack-test.tex + +will regression test the fifo-stack package. Output will be found in +fifo-stack-test.lgout. If pdflatex completes with no errors, then all +regression tests passed. + +# What's new + +v1.0 (2014/03/24) +* Initial version extened from CTAN stack package v1.00 (on 2014/03/24) diff --git a/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack-test.tex b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack-test.tex new file mode 100644 index 00000000000..c8179eecd8a --- /dev/null +++ b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack-test.tex @@ -0,0 +1,267 @@ +%% +%% This is file `fifo-stack-test.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fifo-stack.dtx (with options: `qstest') +%% +%% Copyright (C) 2014 Stephen Gaito (PerceptiSys Ltd) +%% +%% 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'. +%% +%% The Current Maintainer of this work is Stephen Gaito. +%% +%% The released source can be found at: +%% https://github.com/diSimplex/latexFifoStack/tree/master/texStyle +%% +%% The development source can be found at: +%% https://github.com/stephengaito/latexFifoStack/tree/master/texStyle +%% +%% This work consists of the files fifo-stack.dtx, and fifo-stack.ins. +%% +%% The command: +%% pdflatex fifo-stack.ins +%% followed by: +%% pdflatex fifo-stack.dtx +%% will produce the derived files: fifo-stack.sty, fifo-stack-test.tex, +%% and fifo-stack.pdf. +%% +%% The command: +%% pdflatex fifo-stack-test.tex +%% will regression test the fifo-stack package. Output will be found in +%% fifo-stack-test.lgout. If pdflatex completes with no errors, then all +%% regression tests passed. +%% +\RequirePackage{qstest} +\RequirePackage{xifthen} +\IncludeTests{*} +\LogTests{lgout}{*}{*} +\RequirePackage{fifo-stack} +\begin{qstest}{Simple stack integration test} + {\FSCreate, \FSPush, \FSPop, \FSTop} + + \FSCreate{testStack}{defaultValue} + \Expect*{\FSTop{testStack}}{defaultValue} + \FSPush{testStack}{firstValue} + \Expect*{\FSTop{testStack}}{firstValue} + \FSPush{testStack}{secondValue} + \Expect*{\FSTop{testStack}}{secondValue} + \FSPush{testStack}{thirdValue} + \Expect*{\FSTop{testStack}}{thirdValue} + \FSPop{testStack} + \Expect*{\FSTop{testStack}}{secondValue} + \FSPop{testStack} + \Expect*{\FSTop{testStack}}{firstValue} + \FSPop{testStack} + \Expect*{\FSTop{testStack}}{defaultValue} + \FSPop{testStack} + \Expect*{\FSTop{testStack}}{defaultValue} +\end{qstest} +\begin{qstest}{Up down up down stack integration test} + {\FSCreate, \FSPush, \FSPop, \FSTop} + + \FSCreate{testStackUDUD}{defaultValue} + \Expect*{\FSTop{testStackUDUD}}{defaultValue} + \FSPush{testStackUDUD}{firstValue} + \Expect*{\FSTop{testStackUDUD}}{firstValue} + \FSPush{testStackUDUD}{secondValue} + \Expect*{\FSTop{testStackUDUD}}{secondValue} + \FSPop{testStackUDUD} + \Expect*{\FSTop{testStackUDUD}}{firstValue} + \FSPush{testStackUDUD}{newSecondValue} + \Expect*{\FSTop{testStackUDUD}}{newSecondValue} +\end{qstest} +\begin{qstest}{Simple FIFO integration test} + {\FSCreate, \FSPush, \FSShift, \FSTop, \FSBottom} + + \FSCreate{testFifo}{defaultValue} + \Expect*{\FSTop{testFifo}}{defaultValue} + \Expect*{\FSBottom{testFifo}}{defaultValue} + \FSPush{testFifo}{firstValue} + \Expect*{\FSTop{testFifo}}{firstValue} + \Expect*{\FSBottom{testFifo}}{firstValue} + \FSPush{testFifo}{secondValue} + \Expect*{\FSTop{testFifo}}{secondValue} + \Expect*{\FSBottom{testFifo}}{firstValue} + \FSShift{testFifo} + \Expect*{\FSTop{testFifo}}{secondValue} + \Expect*{\FSBottom{testFifo}}{secondValue} + \FSPush{testFifo}{thirdValue} + \Expect*{\FSTop{testFifo}}{thirdValue} + \Expect*{\FSBottom{testFifo}}{secondValue} + \FSShift{testFifo} + \Expect*{\FSTop{testFifo}}{thirdValue} + \Expect*{\FSBottom{testFifo}}{thirdValue} + \FSShift{testFifo} + \Expect*{\FSTop{testFifo}}{defaultValue} + \Expect*{\FSBottom{testFifo}}{defaultValue} + \FSShift{testFifo} + \Expect*{\FSTop{testFifo}}{defaultValue} + \Expect*{\FSBottom{testFifo}}{defaultValue} +\end{qstest} +\begin{qstest}{Simple linear use of unshift/shift} + {\FSUnshift, \FSShift} + + \FSCreate{testRStack}{defaultValue} + \Expect*{\FSBottom{testRStack}}{defaultValue} + \FSUnshift{testRStack}{firstValue} + \Expect*{\FSBottom{testRStack}}{firstValue} + \FSUnshift{testRStack}{secondValue} + \Expect*{\FSBottom{testRStack}}{secondValue} + \FSUnshift{testRStack}{thirdValue} + \Expect*{\FSBottom{testRStack}}{thirdValue} + \FSShift{testRStack} + \Expect*{\FSBottom{testRStack}}{secondValue} + \FSShift{testRStack} + \Expect*{\FSBottom{testRStack}}{firstValue} + \FSShift{testRStack} + \Expect*{\FSBottom{testRStack}}{defaultValue} + \FSShift{testRStack} + \Expect*{\FSBottom{testRStack}}{defaultValue} +\end{qstest} +\begin{qstest}{Full non-linear FIFO/stack integration test} + {\FSCreate, \FSPush, \FSPop, \FSUnshift, \FSShift, \FSTop, \FSBottom} + + \FSCreate{testFS}{defaultValue} + \Expect*{\FSTop{testFS}}{defaultValue} + \Expect*{\FSBottom{testFS}}{defaultValue} + \FSPush{testFS}{value1} + \Expect*{\FSTop{testFS}}{value1} + \Expect*{\FSBottom{testFS}}{value1} + \FSUnshift{testFS}{value-1} + \Expect*{\FSTop{testFS}}{value1} + \Expect*{\FSBottom{testFS}}{value-1} + \FSShift{testFS} + \Expect*{\FSTop{testFS}}{value1} + \Expect*{\FSBottom{testFS}}{value1} + \FSPush{testFS}{value2} + \Expect*{\FSTop{testFS}}{value2} + \Expect*{\FSBottom{testFS}}{value1} + \FSUnshift{testFS}{value-1again} + \Expect*{\FSTop{testFS}}{value2} + \Expect*{\FSBottom{testFS}}{value-1again} + \FSUnshift{testFS}{value-2} + \Expect*{\FSTop{testFS}}{value2} + \Expect*{\FSBottom{testFS}}{value-2} + \FSPop{testFS} + \Expect*{\FSTop{testFS}}{value1} + \Expect*{\FSBottom{testFS}}{value-2} + \FSPop{testFS} + \Expect*{\FSTop{testFS}}{value-1again} + \Expect*{\FSBottom{testFS}}{value-2} + \FSShift{testFS} + \Expect*{\FSTop{testFS}}{value-1again} + \Expect*{\FSBottom{testFS}}{value-1again} + \FSPop{testFS} + \Expect*{\FSTop{testFS}}{defaultValue} + \Expect*{\FSBottom{testFS}}{defaultValue} + \FSPop{testFS} + \Expect*{\FSTop{testFS}}{defaultValue} + \Expect*{\FSBottom{testFS}}{defaultValue} + \FSShift{testFS} + \Expect*{\FSTop{testFS}}{defaultValue} + \Expect*{\FSBottom{testFS}}{defaultValue} +\end{qstest} +\begin{qstest}{FSClear, FSSize, and FSDestroy test} + {\FSCreate, \FSPush, \FSPop, \FSUnshift, \FSShift, \FSTop, + \FSBottom, \FSClear, \FSDestroy, \FSSize} + + \FSCreate{testFSC}{defaultValue} + \Expect*{\FSSize{testFSC}}{0} + \Expect*{\FSTop{testFSC}}{defaultValue} + \Expect*{\FSBottom{testFSC}}{defaultValue} + \FSPush{testFSC}{value1} + \Expect*{\FSSize{testFSC}}{1} + \Expect*{\FSTop{testFSC}}{value1} + \Expect*{\FSBottom{testFSC}}{value1} + \FSUnshift{testFSC}{value-1} + \Expect*{\FSSize{testFSC}}{2} + \Expect*{\FSTop{testFSC}}{value1} + \Expect*{\FSBottom{testFSC}}{value-1} + \FSPush{testFSC}{value2} + \Expect*{\FSSize{testFSC}}{3} + \Expect*{\FSTop{testFSC}}{value2} + \Expect*{\FSBottom{testFSC}}{value-1} + \FSUnshift{testFSC}{value-2} + \Expect*{\FSSize{testFSC}}{4} + \Expect*{\FSTop{testFSC}}{value2} + \Expect*{\FSBottom{testFSC}}{value-2} + \FSClear{testFSC} + \Expect*{\FSSize{testFSC}}{0} + \Expect*{\FSTop{testFSC}}{defaultValue} + \Expect*{\FSBottom{testFSC}}{defaultValue} + \FSPush{testFSC}{value1} + \Expect*{\FSSize{testFSC}}{1} + \Expect*{\FSTop{testFSC}}{value1} + \Expect*{\FSBottom{testFSC}}{value1} + \FSUnshift{testFSC}{value-1} + \Expect*{\FSSize{testFSC}}{2} + \Expect*{\FSTop{testFSC}}{value1} + \Expect*{\FSBottom{testFSC}}{value-1} + \FSPush{testFSC}{value2} + \Expect*{\FSSize{testFSC}}{3} + \Expect*{\FSTop{testFSC}}{value2} + \Expect*{\FSBottom{testFSC}}{value-1} + \FSUnshift{testFSC}{value-2} + \Expect*{\FSSize{testFSC}}{4} + \Expect*{\FSTop{testFSC}}{value2} + \Expect*{\FSBottom{testFSC}}{value-2} + \FSDestroy{testFSC} +\end{qstest} +\begin{qstest}{Unit test of \fifo@stack@pointer}{\fifo@stack@pointer} + \makeatletter + \Expect*{\fifo@stack@pointer{1}}{ii} + \Expect*{\fifo@stack@pointer{0}}{i} + \Expect*{\fifo@stack@pointer{-1}}{@i} + \makeatother +\end{qstest} +\begin{qstest}{Unit test of \FSdestroy} + {\FSCreate, \FSDestroy} + + \FSCreate{testFSDestroy}{defaultValue} + \makeatletter + \ExpectIfThen{\isnamedefined{testFSDestroy@fifo@stack@count@top}} + \ExpectIfThen{\isnamedefined{testFSDestroy@fifo@stack@count@bottom}} + \ExpectIfThen{\isnamedefined{testFSDestroy@fifo@stack@count@size}} + \ExpectIfThen{\isnamedefined{fifo@stack@top@testFSDestroy}} + \ExpectIfThen{\isnamedefined{fifo@stack@bottom@testFSDestroy}} + \makeatother + \FSDestroy{testFSDestroy} + \makeatletter + \ExpectIfThen{\isundefined\testFSDestroy@fifo@stack@count@top} + \ExpectIfThen{\isundefined\testFSDestroy@fifo@stack@count@bottom} + \ExpectIfThen{\isundefined\testFSDestroy@fifo@stack@count@size} + \ExpectIfThen{\isundefined\fifo@stack@top@testFSDestroy} + \ExpectIfThen{\isundefined\fifo@stack@bottom@testFSDestroy} + \makeatother +\end{qstest} +\begin{qstest}{Unit test of \FSPush and \FSTop} + {\FSCreate, \FSPush, \FSTop} + + \FSCreate{testFSPush}{defaultValue} + \Expect*{\FSTop{testFSPush}}{defaultValue} + \FSPush{testFSPush}{\FSTop{testFSPush}-with-additional-text} + \Expect*{\FSTop{testFSPush}}{defaultValue-with-additional-text} +\end{qstest} +\begin{qstest}{Unit test of \FSUnshift and \FSBottom} + {\FSCreate, \FSUnshift, \FSBottom} + + \FSCreate{testFSUnshift}{defaultValue} + \Expect*{\FSBottom{testFSUnshift}}{defaultValue} + \FSUnshift{testFSUnshift}{\FSBottom{testFSUnshift}-with-additional-text} + \Expect*{\FSBottom{testFSUnshift}}{defaultValue-with-additional-text} +\end{qstest} +\LogClose{lgout} +\stop +\endinput +%% +%% End of file `fifo-stack-test.tex'. diff --git a/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.cwl b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.cwl new file mode 100644 index 00000000000..524cdc5c806 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.cwl @@ -0,0 +1,48 @@ +# +# Copyright (C) 2014 Stephen Gaito (PerceptiSys Ltd) +# +# 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'. +# +# The Current Maintainer of this work is Stephen Gaito. +# +# The released source can be found at: +# https://github.com/diSimplex/latexFifoStack/tree/master/texStyle +# +# The development source can be found at: +# https://github.com/stephengaito/latexFifoStack/tree/master/texStyle +# +# This work consists of the files fifo-stack.dtx, and fifo-stack.ins. +# +# The command: +# pdflatex fifo-stack.ins +# followed by: +# pdflatex fifo-stack.dtx +# will produce the derived files: fifo-stack.sty, fifo-stack-test.tex, +# and fifo-stack.pdf. +# +# The command: +# pdflatex fifo-stack-test.tex +# will regression test the fifo-stack package. Output will be found in +# fifo-stack-test.lgout. If pdflatex completes with no errors, then all +# regression tests passed. +# +\FSCreate{fifoStackName}{defaultValue}# +\FSClear{fifoStackName}# +\FSDestroy{fifoStackName}# +\FSTop{fifoStackName}# +\FSPush{fifoStackName}{value}# +\FSPop{fifoStackName}# +\FSShowTop{fifoStackName}# +\FSBottom{fifoStackName}# +\FSUnshift{fifoStackName}{value}# +\FSShift{fifoStackName}# +\FSShowBottom{fifoStackName}# +\FSSize{fifoStackName}# diff --git a/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.pdf b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.pdf Binary files differnew file mode 100644 index 00000000000..f78a764d75b --- /dev/null +++ b/Master/texmf-dist/doc/latex/fifo-stack/fifo-stack.pdf |