diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | doc/dejagnu.texi | 28 | ||||
-rw-r--r-- | doc/user.xml | 27 |
3 files changed, 37 insertions, 26 deletions
@@ -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 diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index 6c719c8..1e3cf7d 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -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 diff --git a/doc/user.xml b/doc/user.xml index 7dfd705..09eb19a 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -11,12 +11,13 @@ 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 "Hello world" locally</title> -<para>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</para> +<para>This test checks whether the shell command <command>echo Hello + world</command> will really output "Hello world" 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> |