[SCM] master: TestLoadCommand - Change e.send() to e.sendCommandExpectPrompt().

rmoseley@sourceware.org rmoseley@sourceware.org
Mon Dec 17 22:54:00 GMT 2007


The branch, master has been updated
       via  80acbe9e545220f3e18c856f9fec5610ea11a047 (commit)
      from  189dc28164b2bf1b7fb43dd43c3de8cae0fcb493 (commit)

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

- Log -----------------------------------------------------------------
commit 80acbe9e545220f3e18c856f9fec5610ea11a047
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Mon Dec 17 16:54:35 2007 -0600

    TestLoadCommand - Change e.send() to e.sendCommandExpectPrompt().
    
    TestLoadCommand.java: Change e.send() > e.sendCommandExpectPrompt().

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    1 +
 frysk-core/frysk/hpd/TestLoadCommand.java |   43 +++++++++-------------------
 2 files changed, 15 insertions(+), 29 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 313cc11..364c95e 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -5,6 +5,7 @@
 	* HpdTestbed.java (start): New method to support start
 	command.
 	* TopLevel.Command.java: Added start command.
+	* TestLoadCommand.java: Change e.send() > e.sendCommandExpectPrompt().
 
 2007-12-17  Phil Muldoon  <pmuldoon@redhat.com>
 
diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java
index 8830150..fa061a6 100644
--- a/frysk-core/frysk/hpd/TestLoadCommand.java
+++ b/frysk-core/frysk/hpd/TestLoadCommand.java
@@ -65,40 +65,25 @@ public class TestLoadCommand extends TestLib {
     
     public void testLoadRun() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
-		+ "\n");
-	e.expect(5, "Loaded executable file.*" + prompt);
-	e.send("focus\n");
-	e.expect(5, "Target set*");
-	e.expect(5, "[0.0]*0*0*");
-	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
-		+ "\n");
-	e.expect(5, "Loaded executable file.*" + prompt);
-	e.send("focus\n");
-	e.expect(5, "Target set*");
-	e.expect(5, "[0.0]*0*0*");
-	e.expect(5, "[1.0]*0*0*" + prompt);
-	e.send("run\n");
-	e.expect(5, "Attached to process*");
-	e.expect(5, "Attached to process*");
-	e.send("focus\n");
-	e.expect(5, "Target set*");
-	e.expect(5, "[0.0]*");
-	e.expect(5, "[1.0]*" + prompt);
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("focus", "Target set.*[0.0]*0*0*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("focus", "Target set.*[0.0]*0*0.*[1.0]*0*0.*");
+	e.sendCommandExpectPrompt("run", "Attached to process.*Attached to process.*");
+	e.sendCommandExpectPrompt("focus", "Target set.*[0.0].*[1.0].*");
+	//e.sendCommandExpectPrompt("quit", "Quitting.*");
 	e.close();
     }
     
     public void testLoadRunRun() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
-		+ "\n");
-	e.expect(5, "Loaded executable file.*" + prompt);
-	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
-		+ "\n");
-	e.expect(5, "Loaded executable file.*" + prompt);
-	e.send("run\n");
-	e.expect(5, "Attached to process*");
-	e.expect(5, "Attached to process*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("run", "Attached to process.*Attached to process.*");
 	e.close();
     }
 }


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



More information about the Frysk-cvs mailing list