texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5588] README added for info tests


From: Gavin D. Smith
Subject: [5588] README added for info tests
Date: Mon, 19 May 2014 22:09:04 +0000

Revision: 5588
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5588
Author:   gavin
Date:     2014-05-19 22:09:03 +0000 (Mon, 19 May 2014)
Log Message:
-----------
README added for info tests

Modified Paths:
--------------
    trunk/ChangeLog

Added Paths:
-----------
    trunk/info/t/README

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-19 21:39:46 UTC (rev 5587)
+++ trunk/ChangeLog     2014-05-19 22:09:03 UTC (rev 5588)
@@ -2,6 +2,7 @@
 
        * info/t/Init-intera.inc: Confirm pts file exists before redirecting
        stdin, stdout and stderr.
+       * info/t/README: File added.
 
 2014-05-19  Gavin Smith  <address@hidden>
 

Added: trunk/info/t/README
===================================================================
--- trunk/info/t/README                         (rev 0)
+++ trunk/info/t/README 2014-05-19 22:09:03 UTC (rev 5588)
@@ -0,0 +1,57 @@
+This directory contains shell scripts used as tests for Info.  They are
+listed in "info/Makefile.am" and will usually be run with "make check".
+It should be possible to run a test on its own by running it at the
+command line and checking the return value, e.g.
+
+bash $t/goto-quoted.sh
+bash $echo $?
+1
+
+shows a test failure.
+
+The tests fall into two categories: tests of non-interactive and
+interactive operation.
+
+It is easy to create new tests by copying existing ones.  Each test should
+start with the lines
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+
+to allow running at the command line, or with either an in-source or
+out-of-source build with "make check".  Tests of interactive operation
+should follow with the line.
+
+. $t/Init-intera.inc
+
+Any interactive test should also finish with
+
+. $t/Cleanup.inc
+
+to cleanup temporary files and spawned processes.  This shell snippet
+will exit with whatever the value of RETVAL is, so you can set the
+exit status of the script indicating success or failure.
+
+Tests of interactive operation
+------------------------------
+
+These work with the "pseudotty" program in the info subdirectory, which
+creates a pseudo-terminal for the input and output of the program,
+so the program will happily enter interactive operation (its standard
+file descriptors pass the isatty library function), and avoid affecting
+the output of the terminal the test was invoked from.  At the moment all it
+does is read and discard all input.
+
+Input keystrokes are provided with the --restore option to the program.
+(It's possible that the pseudotty program will be changed to provide these
+keystrokes in future.)  Testing of correct interactive operation is quite
+crude.  At the moment all it does is test that the cursor is positioned in
+the right place by moving it to a reference to "Node 1" in "intera.info",
+following the reference and dumping the node reached to a file.  (It can
+be compared with a target file in info/t/node-target, to check that we
+ended up where we thought we would.)
+
+Existing dribble files can be inspected with a hex dump program like "xxd",
+and can be recorded using the --dribble option.
+
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]