Much of the supported functionality of JSwat is available via typed commands. The following are basic test cases for evaluating the robustness of the command interpreter. Following that are the individual command test cases.
;;;stdout ; stdout ; stdoutstdout "string"stdout \"string\"stdout \\"string\\"stdout \\ \ blahstdout 'string'stdout \'string\'stdout \\'string\\'stdout;stdout;stdoutstdout ";" ; stdout "a" ; stdout
"\""stdout "a" ; stdout "b" ; stdout
"\"c"stdout "a;b" ; stdout 'c"' ;
stdout '\'d'stdout "a;b"Attach remotely to a running VM.
attach - attempts to reconnect using previous
values.attach <port> - connects to the running VM
using the socket connector.attach <host:port> - connects to the
running VM using the socket connector.attach <name> - connects to the running VM
using the shared memory connector. May complain if system does
not support shared memory.help attachDisplays or sets the classpath of the debuggee VM.
classpath - displays classpath.classpath <path> - if active, complains
that classpath cannot be set while session is active.classpath <path> - changes classpath to
that given.classpath "C:\My Files\java\classes" -
test for proper argument parsing; changes classpath to that
given.classpath "<path space>" -
changes classpath to that given in quotes (with a space in the
path).help classpathCloses the active debugging session, and exits JSwat if there are no more sessions.
exit - terminates the session and exits the
program if no other sessions exist.help exitExplains how to use JSwat commands.
help - enters interactive help mode. Test the
navigation of the help categories.help nothere - complains about unknown
command.help commands - shows all command descriptions,
and defined aliases.help <alias> - explains that the named
alias is an alias.help threads - enters interactive help mode
starting with the threads help category.help helpTerminate one or all threads in the debuggee VM.
kill - if not active, complains about inactive
session.kill - if active, terminates running VM.help killListens for a connection from a debuggee VM.
listen - starts listening at the displayed
address.listen <name> - listens using shared
memory connector with given name, or complains if system does not
support dt_shmem.listen <port> - starts listening at the
given port number.help listenExecutes the commands in the given command file.
read - complains of missing arguments.read <bad-name> - complains that file was
not found (same if file not readable).read <name> - reads file and parses commands
contained therein.
# are skipped as
comments.! generate a
warning.help readDisplays or sets the source path.
sourcepath - displays sourcepath.sourcepath <path> - changes sourcepath to
that given.sourcepath "C:\My Files\java\source" -
test for proper argument parsing; changes sourcepath to that
given.help sourcepathSends text to the debuggee VM's standard input stream.
stdin - if not active, complains about inactive
session.stdin <input> - if active and remote
debuggee, complains about remote debuggee.stdin <input> - if active and launched
debuggee, sends input to debuggee VM's standard input
stream.help stdin