Reported by Flash Sheridan <flash@pobox.com>:
authorBen Elliston <bje@gnu.org>
Mon, 14 Mar 2011 07:02:36 +0000 (18:02 +1100)
committerBen Elliston <bje@gnu.org>
Mon, 14 Mar 2011 07:02:36 +0000 (18:02 +1100)
* doc/user.xml (Testing "Hello world" locally): Improve the
example test script and make it robust to failures.  Tidy some
formatting errors.
* doc/dejagnu.texi: Regenerate.

ChangeLog
doc/dejagnu.texi
doc/user.xml

index 5634e82..868b176 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-14  Ben Elliston  <bje@gnu.org>
+
+       Reported by Flash Sheridan <flash@pobox.com>:
+       * doc/user.xml (Testing "Hello world" locally): Improve the
+       example test script and make it robust to failures.  Tidy some
+       formatting errors.
+       * doc/dejagnu.texi: Regenerate.
+
 2011-03-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * runtest.exp (runtest): Call reset_vars at initialisation so that
index 6c719c8..1e3cf7d 100644 (file)
@@ -446,19 +446,17 @@ Follow these instructions as closely a possible in order get a
 good insight into how DejaGnu works, else you might run into a lot of
 subtle problems. You have been warned.
 
-It should be no big problems installing DejaGnu using your
-package manager or from the source code. Under a Debian/GNU/Linux
-systems just type (as root) 
+It should be no big problems installing DejaGnu using your package
+manager or from the source code. On the Debian GNU/Linux system just
+run (as root):
 
 @example
-apt-get install
-dejagnu
+apt-get install dejagnu
 @end example
 
 @noindent
-. These examples were run on a primary machine
-with a AMD K6 and a Mac Powerbook G3 serving as a remote
-target.
+These examples were run on a primary machine with a AMD K6 and a Mac
+Powerbook G3 serving as a remote target.
 
 The tests for Windows were run under Windows using the actual
 Cygwin version (1.3.x as of October 2001). Its target system was a PPC
@@ -924,19 +922,21 @@ set verbose 9
 @node Testing "Hello world" locally, , When trouble strikes, Our first automated tests
 @subsection Testing "Hello world" locally
 
-This test checks, whether the built-in shell command "echo Hello world"
-will really write "Hello world" on the console.
-Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
-It should contain the following lines
+This test checks whether the shell command @code{echo Hello
+world} will really output "Hello world" to the
+console.  Create the file
+@file{~/dejagnu.test/testsuite/calc.test/local_echo.exp}.
+It should contain the following lines:
 
 @strong{A first (local) test case}
 
 @example
 
 set test "Local Hello World"
-send "echo Hello World"
+spawn echo Hello World
 expect @{
-   -re "Hello World"  @{ pass "$test" @}
+   "Hello World"  @{ pass $test @}
+   default @{ fail $test @}
 @}
 @end example
 
index 7dfd705..09eb19a 100644 (file)
 good insight into how &dj; works, else you might run into a lot of
 subtle problems. You have been warned.</para> 
 
-<para>It should be no big problems installing &dj; using your
-package manager or from the source code. Under a Debian/GNU/Linux
-systems just type (as root) <programlisting>apt-get install
-dejagnu</programlisting>. These examples were run on a primary machine
-with a AMD K6 and a Mac Powerbook G3 serving as a remote
-target.</para> 
+<para>It should be no big problems installing &dj; using your package
+manager or from the source code. On the Debian GNU/Linux system just
+run (as root):
+<programlisting>apt-get install dejagnu</programlisting>
+
+These examples were run on a primary machine with a AMD K6 and a Mac
+Powerbook G3 serving as a remote target.</para>
 
 <para> The tests for Windows were run under Windows using the actual
 Cygwin version (1.3.x as of October 2001). Its target system was a PPC
@@ -452,18 +453,20 @@ set verbose 9
 <sect3>
 <title>Testing &quot;Hello world&quot; locally</title>
 
-<para>This test checks, whether the built-in shell command &quot;echo Hello world&quot;
- will really write &quot;Hello world&quot; on the console.
-Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
-It should contain the following lines</para>
+<para>This test checks whether the shell command <command>echo Hello
+ world</command> will really output &quot;Hello world&quot; to the
+ console.  Create the file
+ <filename>~/dejagnu.test/testsuite/calc.test/local_echo.exp</filename>.
+ It should contain the following lines:</para>
 
 <example>
 <title>A first (local) test case</title>
 <programlisting>
 set test "Local Hello World"
-send "echo Hello World"
+spawn echo Hello World
 expect {
-   -re "Hello World"  { pass "$test" }
+   "Hello World"  { pass $test }
+   default { fail $test }
 }
 </programlisting>
 </example>