diff options
author | Keith Seitz <keiths@redhat.com> | 2002-01-18 17:24:30 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2002-01-18 17:24:30 +0000 |
commit | d58e8320fc3ac64a18ea2c421f4bc77cedf7b75b (patch) | |
tree | a05f330eeb3d7d8f1e3c829cc7de33d6095054f8 /gdb/gdbtk/library/console.itb | |
parent | 8544927c780910bf1312ad3aa1506ec27681aa10 (diff) | |
download | gdb-d58e8320fc3ac64a18ea2c421f4bc77cedf7b75b.tar.gz |
* library/console.ith (get_text): Delete.
(test): New public method.
* library/console.itb (get_text): Delete.
(test): New public method.
Diffstat (limited to 'gdb/gdbtk/library/console.itb')
-rw-r--r-- | gdb/gdbtk/library/console.itb | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gdb/gdbtk/library/console.itb b/gdb/gdbtk/library/console.itb index 4f3fb422b94..3ae767aa939 100644 --- a/gdb/gdbtk/library/console.itb +++ b/gdb/gdbtk/library/console.itb @@ -552,11 +552,6 @@ body Console::_paste {{check_primary 1}} { } } -# public method for testing only -body Console::get_text {} { - return $_twin -} - # ------------------------------------------------------------------ # METHOD: _find_lcp - Return the longest common prefix in SLIST. # Can be empty string. @@ -692,3 +687,22 @@ body Console::_update_option {name value} { } } } + +# ------------------------------------------------------------------ +# NAME: public method Console::test +# DESCRIPTION: Executes the given command +# +# ARGUMENTS: Command to run +# RETURNS: Return value of command +# +# NOTES: This will only run if env(GDBTK_TEST_RUNNING)==1. +# FOR TESTING ONLY +# ------------------------------------------------------------------ +body Console::test {args} { + global env + + if {[info exists env(GDBTK_TEST_RUNNING)] && $env(GDBTK_TEST_RUNNING) == 1} { + return [eval $args] + } +} + |