summaryrefslogtreecommitdiff
path: root/web/funnelAC/scripts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/funnelAC/scripts
Initial commit
Diffstat (limited to 'web/funnelAC/scripts')
-rw-r--r--web/funnelAC/scripts/0license.txt37
-rw-r--r--web/funnelAC/scripts/master.fws295
-rw-r--r--web/funnelAC/scripts/test_gen.fws58
-rw-r--r--web/funnelAC/scripts/test_l.fws50
-rw-r--r--web/funnelAC/scripts/test_ld.fws58
-rw-r--r--web/funnelAC/scripts/test_lo.fws53
-rw-r--r--web/funnelAC/scripts/test_lo2.fws59
-rw-r--r--web/funnelAC/scripts/test_lot.fws56
-rw-r--r--web/funnelAC/scripts/test_lt.fws53
9 files changed, 719 insertions, 0 deletions
diff --git a/web/funnelAC/scripts/0license.txt b/web/funnelAC/scripts/0license.txt
new file mode 100644
index 0000000000..8c2fba8bec
--- /dev/null
+++ b/web/funnelAC/scripts/0license.txt
@@ -0,0 +1,37 @@
+
+FUNNNELWEB COPYRIGHT
+====================
+FunnelWeb is a literate-programming macro preprocessor.
+
+The files in this directory are:
+
+Copyright (C) 1992 Ross N. Williams.
+
+ Ross N. Williams
+ ross@spam.adelaide.edu.au
+ 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of Version 2 of the GNU General Public License as
+published by the Free Software Foundation.
+
+This program is distributed WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+See Version 2 of the GNU General Public License for more details.
+
+You should have received a copy of Version 2 of the GNU General Public
+License along with this program. If not, you can FTP the license from
+prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Section 2a of the license requires that all changes to this file be
+recorded prominently in this file. Please record all changes here.
+
+Programmers:
+ RNW Ross N. Williams ross@spam.adelaide.edu.au
+
+Changes:
+ 07-May-1992 RNW Program prepared for release under GNU GPL V2.
+
+###############################################################################
+
diff --git a/web/funnelAC/scripts/master.fws b/web/funnelAC/scripts/master.fws
new file mode 100644
index 0000000000..2267c3492a
--- /dev/null
+++ b/web/funnelAC/scripts/master.fws
@@ -0,0 +1,295 @@
+!============================<Start of Master Script>===========================
+!
+! FUNNELWEB MASTER TEST SCRIPT
+! ============================
+! This is the master FunnelWeb test script.
+! To test FunnelWeb:
+! 1. Create the following directory tree:
+! <anyname>
+! scripts - A directory containing .fws scripts.
+! tests - A directory containing .fw test files.
+! results - An empty directory to receive results of testing.
+! answers - A directory containing the correct answers.
+! 2. Modify the "root test directory" section of this script as described.
+! 3. Ensure that all of the directories and files are on Read/Write access.
+! 4. Set default to the "scripts" directory.
+! 5. Invoke FunnelWeb with the "+k" option.
+! 6. Give the command "execute master.fws".
+! 7. The test should last for a few minutes.
+! 8. Read the test summary on the console at the end of the test.
+!
+! Notes on Script Mechanics
+! -------------------------
+! * FunnelWeb predefines "$/" to be the character that separates
+! directory specifications from file names on whatever machine it is
+! running on. (e.g. Mac=":", Sun="/", Vax="]", PC="\").
+
+write ""
+write "FUNNELWEB TEST SCRIPT"
+write "====================="
+write "This FunnelWeb shellscript applies FunnelWeb to a suite of test files."
+write "The result is a differences report comparing the result files of this"
+write "run with a predefined set of correct "answer" files."
+write ""
+write "Do not be alarmed by errors occurring during the testing as these"
+write "are a consequence of tests of FunnelWeb's detection of various errors."
+write ""
+write "This script cleans up files lying around before testing, so if"
+write "it fails for some reason, you can run it again without having."
+write "to worry about cleaning up after the results of the previous run."
+write ""
+write "This script takes about 10 minutes to run on a 1 MIP machine."
+write "Here we go!"
+write ""
+!
+! Define Symbol For The Root Test Directory
+! -----------------------------------------
+! IMPORTANT: THIS DEFINITION IS ALL YOU HAVE TO CHANGE TO GET THIS
+! SCRIPT WORKING ON YOUR MACHINE.
+! The script substitution variable <dollar>R must point to the root
+! directory <anyname> (see above). Here are some examples of definitions
+! of <dollar>R on various machines onto which FunnelWeb has been ported.
+
+!SUN: define R "/usr2/users/ross/fwdir/"
+!VMS: define R "$$USERS:[ROSS.FWDIR."
+!PC : define R "\fwdir\"
+!Mac: define R "fatdisk:fwdir:"
+!AXP: define R "/usrdsk/user/coates/tmp/funnelweb/"
+!OS2: define R "E:\sources\funnelweb\"
+
+! Place your definition here.
+
+define R "/usr/var/tmp/funnelweb/"
+
+! Define Symbols for Test Directories
+! -----------------------------------
+! S - The directory containing the .fws FunnelWeb test scripts.
+! I - The directory containing the .fw input files.
+! O - The directory where all the test output goes.
+! A - The directory containing all the correct answers.
+! D - The differences file.
+define S "$Rscripts$/"
+define I "$Rtests$/"
+define O "$Rresults$/"
+define A "$Ranswers$/"
+define D "$Rresults$/0testres.dif"
+
+! Set FunnelWeb Options Default
+! -----------------------------
+! The following options remain as default for all the runs.
+! The only two options turned on are +c100 and +b7.
+! The sub-scripts turn on the options they need explicitly.
+! -f No input file specified.
+! -j No journal file.
+! =i..Include files come from the input directory.
+! -o No product file(s).
+! -t No typeset file.
+! -l No Listing file.
+! -d No deletion of output files.
+! +c100 No suppression of listing in listing file.
+! -q Messages to screen.
+! -x No default script file to execute.
+! -w No limit on product file line length imposed by command line.
+! -k No interactive mode.
+! -b1 No dump of input file map.
+! -b2 No dump of line list.
+! -b3 No dump of token list.
+! -b4 No dump of macro table.
+! -b5 No dump of document list.
+! -b6 No dump of timing results.
+! +b7 DONT write anything non-deterministic.
+set -f -j =i$I -o -t -l -d +c100 -q -x -w -k -b123456 +b7
+
+! Delete any Old Differences File
+! -------------------------------
+eneo $D
+
+! Zero the Difference Summary Counters
+! ------------------------------------
+! This is necessary in case the user runs this script twice in one session.
+diffzero
+
+! Clean Test Scripts
+! ------------------
+! When text files are copied from one machine to another, they can sometimes
+! end up with end-of-line characters that are incorrect for the target machine.
+! The following commands clean up the sub-scripts that we are about to invoke.
+fixeols $Stest_ld.fws
+fixeols $Stest_l.fws
+fixeols $Stest_lo.fws
+fixeols $Stest_lt.fws
+fixeols $Stest_lot.fws
+fixeols $Stest_lo2.fws
+
+! Generate Tricky Test Files
+! --------------------------
+! This process is a bit messy and requires operations similar to those in the
+! other sub-scripts (test_ld.fws...), and so I have placed it all in
+! test_gen.fws.
+execute $Stest_gen.fws
+
+! Clean up the Include Files
+! --------------------------
+! The test scripts all "purify" their file arguments by running them through
+! the "fixeols" command. However, the include files aren't automated in this
+! way, so we have to do them here explicitly.
+fixeols $Isc13a.fwi
+fixeols $Isc13b.fwi
+fixeols $Isc13c.fwi
+fixeols $Isc13d.fwi
+fixeols $Isc13e.fwi
+fixeols $Isc13f.fwi
+fixeols $Isc15a.fwi
+fixeols $Itg08a.fwi
+fixeols $Iex09a.fwi
+fixeols $Iex10a.fwi
+
+! Skip Some Tests
+! ---------------
+! If you are debugging some tests, you may wish to move the "here" command
+! further down in the testing so as to skip to the desired tests.
+! X must be defined because FunnelWeb expands command lines even while skipping
+! and generates a "leading spaces" error if X is not defined to be non-blank.
+define X "!"
+skipto
+here
+
+! Test Scanner and Parser
+! -----------------------
+define X "execute $Stest_ld.fws"
+! Special cases:
+! sc01 does not exist (test of non-existence input file).
+! sc09 contains control characters that we don't want FIXEOLS to frob.
+$X sc01 !
+$X sc02
+$X sc03
+$X sc04
+$X sc05
+$X sc06
+$X sc07
+$X sc08
+$X sc09 !
+$X sc10
+$X sc11
+$X sc12
+$X sc13
+$X sc14
+$X sc15
+$X sc16
+$X sc17
+$X sc18
+$X sc19
+$X sc20
+$X sc21
+$X sc22
+$X sc23
+$X sc24
+$X sc25
+$X sc26
+$X sc27
+$X sc28
+$X sc29
+
+$X pr01
+$X pr02
+$X pr03
+$X pr04
+$X pr05
+$X pr06
+$X pr07
+$X pr08
+$X pr09
+$X pr10
+
+! Test Analyser
+! -------------
+define X "execute $Stest_l.fws"
+$X an01
+$X an02
+$X an03
+$X an04
+
+! Test Tangle
+! -----------
+define X "execute $Stest_lo.fws"
+$X tg01
+$X tg02
+$X tg03
+$X tg04
+$X tg05
+$X tg06
+$X tg07
+$X tg08
+$X tg09
+
+! Test Weave
+! ----------
+define X "execute $Stest_lt.fws"
+$X wv01
+$X wv02
+$X wv03
+$X wv04
+$X wv05
+$X wv06
+
+! Examples in User Manual Tutorial
+! --------------------------------
+define X "execute $Stest_lo.fws"
+$X ex01
+$X ex02
+define X "execute $Stest_l.fws"
+$X ex03
+define X "execute $Stest_lo.fws"
+$X ex04
+$X ex05
+$X ex06
+$X ex07
+$X ex08
+$X ex09
+$X ex10
+
+define X "execute $Stest_lt.fws"
+$X ex11
+$X ex12
+$X ex13
+$X ex14
+$X ex15
+
+define X "execute $Stest_lot.fws"
+$X ex16
+
+! Examples in Hints Chapter
+! -------------------------
+define X "execute $Stest_lo.fws"
+$X hi01
+$X hi02
+$X hi03
+$X hi04
+$X hi05
+define X "execute $Stest_lo2.fws"
+$X hi06
+$X hi07
+define X "execute $Stest_lo.fws"
+$X hi08
+$X hi09
+$X hi10
+
+! Final Test Summary
+! ------------------
+write ""
+write ""
+write "The FunnelWeb test suite script has successfully completed."
+write ""
+diffsummary
+write ""
+write "If the differences summary above gives Different=0, then FunnelWeb"
+write "has passed the test suite and is ready for use."
+write ""
+write "If not, you should examine the file"
+write " "$D""
+write "to see what went wrong."
+write ""
+write "By the way, there should be 1 Severe, 277 Errors, and 12 Warnings."
+write ""
+!=============================<End of Master Script>============================
+
diff --git a/web/funnelAC/scripts/test_gen.fws b/web/funnelAC/scripts/test_gen.fws
new file mode 100644
index 0000000000..6b938e763c
--- /dev/null
+++ b/web/funnelAC/scripts/test_gen.fws
@@ -0,0 +1,58 @@
+!==========================<Start of test_gen Script>===========================
+!
+! Generate Tricky Input Files
+! ---------------------------
+! This script processes the "generate.fw" test file which not only tests
+! FunnelWeb to some extent, but also generates a few ".fw" input test
+! files which are tested later on in the test suite process.
+!
+! Inputs: None.
+! Outputs:
+! Listing file.
+! Product files (which appear in the input $I directory as .fw files).
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Basic Test and Generate Some Tricky Input Files"
+
+! Delete any previous output files.
+eneo $Isc06.fw
+eneo $Isc08.fw
+eneo $Isc09.fw
+eneo $Isc13e.fwi
+eneo $Ogenerate.log
+eneo $Ogenerate.lis
+eneo $Ogenerate.tex
+eneo $Ogenerate.out
+
+! Check input and answer files.
+exists $Igenerate.fw
+exists $Agenerate.lis
+absent $Agenerate.out
+absent $Agenerate.tex
+
+! Clean input and answer files.
+fixeols $Igenerate.fw
+fixeols $Agenerate.lis
+
+! Perform the actual FunnelWeb run.
+fw $Igenerate.fw +L$Ogenerate.lis +O$I
+
+! Ensure that the correct files were generated.
+absent $Ogenerate.log
+absent $Ogenerate.tex
+absent $Ogenerate.out
+exists $Ogenerate.lis
+exists $Isc06.fw
+exists $Isc08.fw
+exists $Isc09.fw
+exists $Isc13e.fwi
+
+! Compare the listing file with the correct answer.
+! We can't check the other files because of the original problem this whole
+! generation script is designed to solve!
+diff $Ogenerate.lis $Agenerate.lis $D
+
+!===========================<End of test_gen Script>============================
diff --git a/web/funnelAC/scripts/test_l.fws b/web/funnelAC/scripts/test_l.fws
new file mode 100644
index 0000000000..fe88166d53
--- /dev/null
+++ b/web/funnelAC/scripts/test_l.fws
@@ -0,0 +1,50 @@
+!===========================<Start of test_l Script>============================
+!
+! Test With A Plain Listing File
+! ------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1.out
+
+! Check input and answer files.
+exists $I$1.fw
+exists $A$1.lis
+absent $A$1.out
+absent $A$1.tex
+
+! Clean input and answer files.
+fixeols $I$1.fw
+fixeols $A$1.lis
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+tolerate
+fw $I$1.fw +l$O$1.lis
+
+! Ensure that only a listing file was generated.
+absent $O$1.log
+absent $O$1.tex
+absent $O$1.out
+exists $O$1.lis
+
+! Compare the listing file with the answer file.
+diff $O$1.lis $A$1.lis $D
+
+!============================<End of Test_l Script>=============================
diff --git a/web/funnelAC/scripts/test_ld.fws b/web/funnelAC/scripts/test_ld.fws
new file mode 100644
index 0000000000..4cfc4db857
--- /dev/null
+++ b/web/funnelAC/scripts/test_ld.fws
@@ -0,0 +1,58 @@
+!===========================<Start of test_ld Script>===========================
+!
+! Test With Listing File and Scanner Dumps
+! ----------------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $2 = Empty ("") or "!" to suppress FIXEOLing and existence check
+! of input file.
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file containing dumps.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1.out
+
+! Check input and answer files.
+$2exists $I$1.fw
+exists $A$1.lis
+absent $A$1.out
+absent $A$1.tex
+
+! Clean input and answer files.
+$2fixeols $I$1.fw
+fixeols $A$1.lis
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+! Options:
+! +b1 Dump input file map.
+! +b2 Dump line list.
+! +b3 Dump token list.
+! +b4 Dump macro table.
+! +b5 Dump document list.
+tolerate
+fw $I$1.fw +l$O$1.lis +b12345
+
+! Ensure that only a listing file was generated.
+absent $O$1.log
+absent $O$1.tex
+absent $O$1.out
+exists $O$1.lis
+
+! Compare the listing file with the answer file.
+diff $O$1.lis $A$1.lis $D
+
+!============================<End of test_ld Script>============================
diff --git a/web/funnelAC/scripts/test_lo.fws b/web/funnelAC/scripts/test_lo.fws
new file mode 100644
index 0000000000..572a12e556
--- /dev/null
+++ b/web/funnelAC/scripts/test_lo.fws
@@ -0,0 +1,53 @@
+!===========================<Start of test_lo Script>===========================
+!
+! Test With Listing File and Product File
+! ---------------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file.
+! Product file.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1.out
+
+! Check input and answer files.
+exists $I$1.fw
+exists $A$1.lis
+exists $A$1.out
+absent $A$1.tex
+
+! Clean input and answer files.
+fixeols $I$1.fw
+fixeols $A$1.lis
+fixeols $A$1.out
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+tolerate
+fw $I$1.fw +l$O$1.lis +o$O$1.out
+
+! Ensure that only a listing and an product file were generated.
+absent $O$1.log
+absent $O$1.tex
+exists $O$1.lis
+exists $O$1.out
+
+! Compare the results with the answers.
+diff $O$1.lis $A$1.lis $D
+diff $O$1.out $A$1.out $D
+
+!============================<End of test_lo Script>============================
diff --git a/web/funnelAC/scripts/test_lo2.fws b/web/funnelAC/scripts/test_lo2.fws
new file mode 100644
index 0000000000..798c489680
--- /dev/null
+++ b/web/funnelAC/scripts/test_lo2.fws
@@ -0,0 +1,59 @@
+!===========================<Start of test_lo2 Script>==========================
+!
+! Test With Listing File and Two Product Files
+! --------------------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file.
+! Product file a.
+! Product file b.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1a.out
+eneo $O$1b.out
+
+! Check input and answer files.
+exists $I$1.fw
+exists $A$1.lis
+exists $A$1a.out
+exists $A$1b.out
+absent $A$1.tex
+
+! Clean input and answer files.
+fixeols $I$1.fw
+fixeols $A$1.lis
+fixeols $A$1a.out
+fixeols $A$1b.out
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+tolerate
+fw $I$1.fw +l$O$1.lis +o$O$1.out
+
+! Ensure that only a listing and two product files were generated.
+absent $O$1.log
+absent $O$1.tex
+exists $O$1.lis
+exists $O$1a.out
+exists $O$1b.out
+
+! Compare the results with the answers.
+diff $O$1.lis $A$1.lis $D
+diff $O$1a.out $A$1a.out $D
+diff $O$1b.out $A$1b.out $D
+
+!============================<End of test_lo2 Script>===========================
diff --git a/web/funnelAC/scripts/test_lot.fws b/web/funnelAC/scripts/test_lot.fws
new file mode 100644
index 0000000000..fbbe4ec22d
--- /dev/null
+++ b/web/funnelAC/scripts/test_lot.fws
@@ -0,0 +1,56 @@
+!==========================<Start of test_lot Script>===========================
+!
+! Test With Listing File and Product File and Typeset File
+! --------------------------------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file.
+! Product file.
+! Typeset file.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1.out
+
+! Check input and answer files.
+exists $I$1.fw
+exists $A$1.lis
+exists $A$1.tex
+exists $A$1.out
+
+! Clean input and answer files.
+fixeols $I$1.fw
+fixeols $A$1.lis
+fixeols $A$1.tex
+fixeols $A$1.out
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+tolerate
+fw $I$1.fw +l$O$1.lis +o$O +t$O$1.tex
+
+! Ensure that all three output files were generated.
+absent $O$1.log
+exists $O$1.out
+exists $O$1.lis
+exists $O$1.tex
+
+! Compare the results with the answers.
+diff $O$1.lis $A$1.lis $D
+diff $O$1.out $A$1.out $D
+diff $O$1.tex $A$1.tex $D
+
+!===========================<End of Test_lot Script>============================
diff --git a/web/funnelAC/scripts/test_lt.fws b/web/funnelAC/scripts/test_lt.fws
new file mode 100644
index 0000000000..ebbd7c57e6
--- /dev/null
+++ b/web/funnelAC/scripts/test_lt.fws
@@ -0,0 +1,53 @@
+!===========================<Start of test_lt Script>===========================
+!
+! Test With Listing File and Typeset File
+! ---------------------------------------
+! Inputs:
+! $1 = Name of the .fw file to be tested (e.g. $1="sc01").
+! $I = Directory containing .fw files.
+! $A = Directory containing Answer files.
+! $O = Directory to place Result files.
+! $D = Name of the differences file.
+! Outputs:
+! Listing file.
+! Typeset file.
+! Appendage to differences file.
+
+! Announce this test.
+write ""
+write ""
+writeu "Performing Test $1"
+
+! Delete any previous output files.
+eneo $O$1.log
+eneo $O$1.lis
+eneo $O$1.tex
+eneo $O$1.out
+
+! Check input and answer files.
+exists $I$1.fw
+exists $A$1.lis
+exists $A$1.tex
+absent $A$1.out
+
+! Clean input and answer files.
+fixeols $I$1.fw
+fixeols $A$1.lis
+fixeols $A$1.tex
+
+! Perform the actual FunnelWeb run.
+! Tolerate means "don't abort on warning, error, or severe".
+tolerate
+fw $I$1.fw +l$O$1.lis +t$O$1.tex
+
+! Ensure that only a listing and a typeset file were generated.
+absent $O$1.log
+absent $O$1.out
+exists $O$1.lis
+exists $O$1.tex
+
+! Compare the results with the answers.
+diff $O$1.lis $A$1.lis $D
+diff $O$1.tex $A$1.tex $D
+
+!============================<End of test_lt Script>============================