public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: TestPeekCommand - Change e.send to e.sendCommandExpectPrompt.
@ 2007-12-18  0:23 rmoseley
  0 siblings, 0 replies; only message in thread
From: rmoseley @ 2007-12-18  0:23 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  4c7086268ca8b5e712032270403e990d949b161d (commit)
      from  80acbe9e545220f3e18c856f9fec5610ea11a047 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 4c7086268ca8b5e712032270403e990d949b161d
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Mon Dec 17 18:23:30 2007 -0600

    TestPeekCommand - Change e.send to e.sendCommandExpectPrompt.
    
    * TestPeekCommand - Change e.send to e.sendCommandExpectPrompt.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    1 +
 frysk-core/frysk/hpd/TestPeekCommand.java |   40 +++++++++++++---------------
 2 files changed, 20 insertions(+), 21 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 364c95e..877c1fc 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -6,6 +6,7 @@
 	command.
 	* TopLevel.Command.java: Added start command.
 	* TestLoadCommand.java: Change e.send() > e.sendCommandExpectPrompt().
+	* TestPeekCommand.java: Ditto.
 
 2007-12-17  Phil Muldoon  <pmuldoon@redhat.com>
 
diff --git a/frysk-core/frysk/hpd/TestPeekCommand.java b/frysk-core/frysk/hpd/TestPeekCommand.java
index 2173ee4..bef3637 100644
--- a/frysk-core/frysk/hpd/TestPeekCommand.java
+++ b/frysk-core/frysk/hpd/TestPeekCommand.java
@@ -48,42 +48,40 @@ import frysk.Config;
 public class TestPeekCommand extends TestLib {
     public void testPeekCommand() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath() + "\n");
-	e.expect(5,"Loaded executable file.*");
-	e.send("peek 0x08048000L\n");
-	e.expect(5, "The value at 08048000 = 127.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgDataFile("test-exe-x86").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("peek 0x08048000L", 
+		"The value at 08048000 = 127.*");
 	e.close();
     }
 
     public void testPeekCommandError() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath() + "\n");
-	e.expect(5, "Loaded executable file.*");
-	e.send("peek 08048000\n");
-	e.expect(5, "Cannot find memory in exe file.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgDataFile("test-exe-x86").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("peek 08048000", 
+		"Cannot find memory in exe file.*");
 	e.close();
     }
     
     public void testTwoLoadedPeekCommand() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath() + "\n");
-	e.expect(5, "Loaded executable file*");
-	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath() + "\n");
-	e.expect(5, "Loaded executable file*");
-	e.send("peek 0x08048000L\n");
-	e.expect(5, "\\[0\\.0\\]");
-	e.expect(5, "The value at 08048000 = 127*");
-	e.expect(5, "\\[1\\.0\\]");
-	e.expect(5, "The value at 08048000 = 127*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgDataFile("test-exe-x86").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgDataFile("test-exe-x86").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("peek 0x08048000L", "\\[0\\.0\\].*" +
+		"The value at 08048000 = 127.*\\[1\\.0\\].*" +
+		"The value at 08048000 = 127.*");
 	e.close();
     }
     
     public void testPeekCommandNoParameter() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath() + "\n");
-	e.expect(5, "Loaded executable file*");
-	e.send("peek\n");
-	e.expect(5, "Error: Not enough parameters. Please specify an addess to peek at*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgDataFile("test-exe-x86").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("peek", "Error: Not enough parameters.*" + 
+		"Please specify an addess to peek at.*");
 	e.close();
     }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-18  0:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18  0:23 [SCM] master: TestPeekCommand - Change e.send to e.sendCommandExpectPrompt rmoseley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).