From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 477 invoked by alias); 8 Nov 2007 18:24:38 -0000 Received: (qmail 449 invoked by uid 367); 8 Nov 2007 18:24:37 -0000 Date: Thu, 08 Nov 2007 18:24:00 -0000 Message-ID: <20071108182437.434.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Add TestAliasCommands.java. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b5953ea2cdffa37921ca9f21e01c3c5c0e712261 X-Git-Newrev: 015e476beb1ca02e5039974f9e8072a5eb631e7b Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2007-q4/txt/msg00321.txt.bz2 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 Date: Thu Nov 8 13:23:17 2007 -0500 Add TestAliasCommands.java. 2007-11-08 Andrew Cagney * 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 + * 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