condor.classad.tests
Class CATest

Object
  extended bycondor.classad.tests.CATest

public class CATest
extends Object

General purpose ClassAd tesing program. Designed to be run either interactively or in batch mode. Input consists of a sequence of "commands". Lines starting with '//' and empty lines are ignored. If input comes from a file, lines starting with whitespace are continuation lines, and are appended to the previous non-comment, non-empty line. If input comes from stdin (which only happens if there are no files mentioned on the command line), a continuation line is indicated by a backslash at the end of the previous line. The return status is the number of test failures (0 if all tests succeed). In the following, VAR denotes a sequence of letters, digits, and underscores starting with a letter. After processing of comments and continuation lines and before other processing, each occurrence of $VAR is replaced by the current value of variable VAR (the null string if VAR has never been assigned a value). Note that there is no way to "escape" or "quote" dollar signs in the input. Comands are as follows (case is significant).

echo args
Prints args.
set name = value
Sets an option. See below.
show name
Displays an option value.
let VAR = EXPR
Sets VAR equal to the expression EXPR.
eval VAR = EXPR
Sets VAR equal to the result of evaluating EXPR.
print EXPR
Displays EXPR.
same EXPR1 EXPR2
Compares EXPR1 and EXPR2 and prints a message if they differ.
diff EXPR1 EXPR2
Compares EXPR1 and EXPR2 and prints a message if they are the same.
quit
Immediately exit.
For the "same" and "diff" commands, comparison is "deep structural equality": The command "set name = value" sets the named option to the indicated value. Leading and trailing space are stripped from the value. Otherwise, the name and value strings are processed verbatim. Options are either boolean or string valued. For boolean options, the value must be "true" or "false". Currently, the following options are supported. An attempt to set or show an unknown option is an error. Option names and values are case-sensitive.

Option Type Default Comments
xmlinput boolean false EXPR inputs are in XML
format string compact format for printing EXPRs

Values for the the "format" options are

compact
Display each expression on one line in the "canonical native" representation.
xml
Display expressions in xml
pretty
Display expressions in the "native" format using newlies and indentation to improve readability.


Method Summary
static void main(String[] args)
          Main program.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
Main program. Command-line options are
-v
Request more verbose debugging output (may be repeated).
-vnn
Set the debugging level to nn.
-t
Trace the actions of the parser.
-l classLoad class as a library.
Other arguments are names of input files to process. If none are specified, use stdin.

Parameters:
args - the command-line arguments.