* TESTUPF: Move from internal/ to internal/test/unpackfilename to be parallel with filepos * IOCHAR: FILEPOS respects external format (#3) * FILEPKG: EDITCALLERS speed up with new FILEPOS * internal/test/filepos: Testing jig and cases for new FILEPOS * EXTERNALFORMAT, IOCHAR: fix external-format glitches
61 lines
2.7 KiB
Plaintext
61 lines
2.7 KiB
Plaintext
FILEPOS testing files
|
||
|
||
The file FPTESTS has the specifications for testing against the sample files in this directory. The file TFP has the functions for performing the tests, plus copies of old versions of FILEPOS and FFILEPOS for comparison.
|
||
|
||
Each entry in FPTESTS is a pair of the form (expected-value filepos-args), with the convention that the pattern and casearray args are evaluated before the the filepos function is applied. CASEARRAY=T is interpreted as transparent, it just throws test into the slow case (/SLOWFILEPOS) of very careful interpretion of non-ascii characters.
|
||
|
||
The extension of the testfiles specifies the external format to be asserted of the file before the test is run (defaults to :XCCS) Each test opens and closes the file, so the file position at the start of each test is 0, no carry-over from one test to another.
|
||
|
||
(TFP TESTNAMES TAGS FN)
|
||
TESTNAMES is or contains the names of the variables containing a particular test suite. NIL means all the names in ALLTESTS.
|
||
|
||
THe file-pos args of a particular test and the value of FN are passed to TFP1.
|
||
|
||
(TFP1 FPARGS FN) runs the tests.
|
||
|
||
The FN argument of TFP and TFP1 specifies the function to apply:
|
||
NIL or FILEPOS: New FILEPOS
|
||
(NIL with CASEARRAY=T also means new FFILEPOS)
|
||
FFILEPOS or FF: new FFILEPOS
|
||
OLDFILEPOS or OF: Old FILEPOS
|
||
OLDFFILEPOS or OFF: Old FFILEPOS
|
||
|
||
Test files:
|
||
|
||
ZERONETWO.XCCS
|
||
012 (sanity)
|
||
|
||
GREEK.XCCS
|
||
aÿÿ |