| edu.rice.cs.drjava.DrJavaTestCase edu.rice.cs.util.ArgumentTokenizerTest
ArgumentTokenizerTest | public class ArgumentTokenizerTest extends DrJavaTestCase (Code) | | Tests that an ArgumentTokenizer can correctly divide up a string
into command line-style arguments. Tries to follow the precedent
set by a Unix bash shell in most cases.
version: $Id: ArgumentTokenizerTest.java 4255 2007-08-28 19:17:37Z mgricken $ |
ArgumentTokenizerTest | public ArgumentTokenizerTest(String name)(Code) | | Creates a new ArgumentTokenizer to be used in every test.
|
_assertTokenized | protected void _assertTokenized(String typed, String[] expected)(Code) | | Asserts that the given string is tokenized to become the
given array of string arguments.
Parameters: typed - A string containing all arguments (as typed by a user) Parameters: expected - What the tokenizer should return |
_assertTokenized | protected void _assertTokenized(String typed, String[] expected, boolean stringify)(Code) | | Asserts that the given string is tokenized to become the
given array of string arguments.
Parameters: typed - A string containing all arguments (as typed by a user) Parameters: expected - What the tokenizer should return Parameters: stringify - Whether to format the resulting arguments to printout as Strings. |
testTokenizeAndStringify | public void testTokenizeAndStringify()(Code) | | Tests that arguments can be "stringified" properly.
(ie. formatted to be printed as a String)
|
testTokenizeArguments | public void testTokenizeArguments()(Code) | | Tests that the argument tokenizer can split up a simple list of arguments.
|
testTokenizeEscapedArgs | public void testTokenizeEscapedArgs()(Code) | | Tests that escaped characters just return the character itself.
Escaped whitespace is considered a character, not a delimiter.
(This is how Unix behaves.)
not currently enforcing any behavior for a simple implementation
using a StreamTokenizer
|
testTokenizeQuotedEscapedArgs | public void testTokenizeQuotedEscapedArgs()(Code) | | Tests that within a quote, everything is correctly escaped.
(Special characters are passed to the program correctly.)
|
testTokenizeSingleQuotedArgs | public void testTokenizeSingleQuotedArgs()(Code) | | Tests that single quotes can be used as argument delimiters.
This is consistent with Unix, not with DOS.
|
Fields inherited from edu.rice.cs.drjava.DrJavaTestCase | final public static String TEST_DRJAVA_CONFIG_PROPERTY(Code)(Java Doc)
|
|
|