public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Add TestAliasCommands.java.
@ 2007-11-08 18:24 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2007-11-08 18:24 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  015e476beb1ca02e5039974f9e8072a5eb631e7b (commit)
      from  b5953ea2cdffa37921ca9f21e01c3c5c0e712261 (commit)

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

- Log -----------------------------------------------------------------
commit 015e476beb1ca02e5039974f9e8072a5eb631e7b
Author: Andrew Cagney <cagney@redhat.com>
Date:   Thu Nov 8 13:23:17 2007 -0500

    Add TestAliasCommands.java.
    
    2007-11-08  Andrew Cagney  <cagney@redhat.com>
    
    	* TestAliasCommands.java: New file.

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog                     |    2 +
 .../hpd/{TestHelp.java => TestAliasCommands.java}  |   48 +++++++++----------
 2 files changed, 25 insertions(+), 25 deletions(-)
 copy frysk-core/frysk/hpd/{TestHelp.java => TestAliasCommands.java} (70%)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 797684f..347cd06 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,5 +1,7 @@
 2007-11-08  Andrew Cagney  <cagney@redhat.com>
 
+	* TestAliasCommands.java: New file.
+
 	* AliasCommands.java: New.
 	* AliasCommand.java: Delete.
 	* UnaliasCommand.java: Delete.
diff --git a/frysk-core/frysk/hpd/TestHelp.java b/frysk-core/frysk/hpd/TestAliasCommands.java
similarity index 70%
copy from frysk-core/frysk/hpd/TestHelp.java
copy to frysk-core/frysk/hpd/TestAliasCommands.java
index e2c7b6d..fd22ee2 100644
--- a/frysk-core/frysk/hpd/TestHelp.java
+++ b/frysk-core/frysk/hpd/TestAliasCommands.java
@@ -40,36 +40,34 @@
 package frysk.hpd;
 
 /**
- * Test the help command, and -help option.
+ * Test the functionality of the alias and unalias commands.
  */
 
-public class TestHelp
-    extends TestLib
-{
-    public void testHelp() {
+public class TestAliasCommands extends TestLib {
+    public void setUp() {
+	super.setUp();
 	e = new HpdTestbed();
-	e.send("help\n");
-	e.expect("actionpoints - ");
-	e.expect("core - ");
-	e.expect("finish - ");
-	e.expect("list - ");
-	e.expect("peek - ");
-	e.expect("regs - ");
-	e.expect("step - ");
-	e.expect("up - ");
-	e.expectPrompt("whichsets.*");
     }
 
-    public void testHelpCompletion() {
-	e = new HpdTestbed();
-	e.send("help u\t");
-	e.expect("unalias\r\nundefset\r\nunset\r\nup\r\n"
-		 + prompt + "help u");
+    public void test() {
+	e.sendCommandExpectPrompt("unalias -all",
+				  "Removing all aliases.*");
+	e.sendCommandExpectPrompt("alias", "No aliases.*");
+	e.sendCommandExpectPrompt("alias xxx yyy", ".*");
+	e.sendCommandExpectPrompt("alias yyy zzz", ".*");
+	e.sendCommandExpectPrompt("alias",
+				  "xxx = yyy\r\nyyy = zzz\r\n");
+	e.sendCommandExpectPrompt("alias xxx",
+				  "xxx = yyy\r\n");
+	e.sendCommandExpectPrompt("unalias yyy",
+				  "Removed alias .yyy.*");
+	e.sendCommandExpectPrompt("unalias -all",
+				  "Removing all aliases.*");
+	e.sendCommandExpectPrompt("alias", "No aliases.*");
     }
-
-    public void testHelpHelp() {
-	e = new HpdTestbed();
-	e.sendCommandExpectPrompt("help help",
-				  "Display help.*");
+    public void testCompletion() {
+	e.sendCommandExpectPrompt("alias xxx yyy", ".*");
+	e.send("alias \t");
+	e.expect("alias xxx ");
     }
 }


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


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

only message in thread, other threads:[~2007-11-08 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-08 18:24 [SCM] master: Add TestAliasCommands.java cagney

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).