"Fossies" - the Fresh Open Source Software Archive

Member "texinfo-6.7/info/t/README" (25 Aug 2019, 2179 Bytes) of package /linux/misc/texinfo-6.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "README": 6.5_vs_6.6.

    1 This directory contains shell scripts used as tests for Info.  They are
    2 listed in "info/Makefile.am" and will usually be run with "make check".
    3 It should be possible to run a test on its own by running it at the
    4 command line and checking the return value, e.g.
    5 
    6 bash $t/goto-quoted.sh
    7 bash $echo $?
    8 1
    9 
   10 shows a test failure.
   11 
   12 The tests fall into two categories: tests of non-interactive and
   13 interactive operation.
   14 
   15 New tests can be created by copying existing ones.  Each test should
   16 start with the lines
   17 
   18 srcdir=${srcdir:-.}
   19 . $srcdir/t/Init-test.inc
   20 
   21 to allow running at the command line, or with either an in-source or
   22 out-of-source build with "make check".
   23 
   24 Any interactive test should also finish with
   25 
   26 cleanup
   27 
   28 to cleanup temporary files and spawned processes.  This function
   29 will exit with whatever the value of RETVAL is, so you can set the
   30 exit status of the script indicating success or failure.
   31 
   32 Tests of interactive operation
   33 ------------------------------
   34 
   35 These use the "pseudotty" program in the info subdirectory, which
   36 creates a pseudo-terminal for the input and output of the program.
   37 This allows the program to happily enter interactive operation (its standard
   38 file descriptors pass the isatty library function) and avoids affecting
   39 the output of the terminal the test was invoked from.  pseudotty reads and
   40 discards all input on its stdin, and passes through any bytes read on 
   41 its control channel into the pseudo-terminal.  It prints the name of the 
   42 pseudoterminal slave device on standard output.
   43 
   44 (test script)
   45  ^  |
   46  |  `-control----> pseudotty (master) <---> (slave) stdin/stdout ginfo
   47  `-name of slave-----'
   48 
   49 pseudotty will stop running either when killed, or when it exits after 
   50 its control channel is closed.
   51 
   52 Since ginfo is reading to and writing from the pseudoterminal slave 
   53 device, if pseudotty exits before ginfo does, ginfo will exit with an 
   54 I/O error.
   55 
   56 Many of the tests of interactive operation try to position the cursor 
   57 on a cross-reference by various means, follow the reference, and dump the node
   58 reached to a file.  (It can be compared with a target file in
   59 info/t/node-target, to check that we ended up where we thought we would.)
   60 
   61