"Fossies" - the Fresh Open Source Software Archive

Member "texinfo-6.5/info/t/README" (4 Jun 2015, 2275 Bytes) of package /linux/misc/texinfo-6.5.tar.xz:

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.

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