[incr Tcl] was written by Michael McLennan and ported to Jacl/JTcl by Mo DeJong.
7 |
62 |
63 |
64 | Copyright © 1997-1998 Sun Microsystems, Inc.
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaGetInterpCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::getinterp Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::getinterp Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::getinterp
22 |
23 |
24 |
25 |
26 | The java::getinterp command takes no arguments and returns a handle
27 | to the tcl.lang.Interp Java object that represents the current
28 | interpreter. This command is typically used to get a Java object handle
29 | that will be passed to a Java method.
30 |
31 |
32 |
33 |
34 |
35 |
36 | Copyright © 1997-1998 Sun Microsystems, Inc.
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaInstanceOfCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::instanceof Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::instanceof Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Usage:
20 |
21 |
22 | - java::instanceof javaObj type
23 |
24 |
25 | The java::instanceof command is used to determine if a Java
26 | object is of a given type. The javaObj argument specifies an
27 | object handle. The type argument specifies an
28 | interface or class name. If the type argument is
29 | a class name, java::instanceof will return 1 if the javaObj
30 | argument is an instance of type or an instance of a subclass
31 | of type. If the type argument is an interface name,
32 | java::instanceof returns 1 if the
33 | javaObj argument implements the interface. Otherwise,
34 | java::instanceof returns 0.
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | Examples:
44 |
45 |
46 | -
47 |
48 | This examples shows using the java::instanceof command to
49 | query the inheritance relationship of a java.lang.String
50 | object.
51 |
52 |
53 |
54 |
55 |
56 | % set obj [java::new String mystring]
57 | % java::instanceof $obj Object
58 | 1
59 |
60 |
61 |
62 |
63 |
64 |
65 | Copyright © 1997-1998 Sun Microsystems, Inc.
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaIsNullCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::isnull Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::isnull Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::isnull javaObj
22 |
23 |
24 |
25 | The java::isnull command is used to tell if a Java
26 | reference has the null value. The javaObj argument specifies an
27 | object handle. If the object has the null value, java::isnull
28 | will return 1. If the object is a Java object then java::isnull
29 | will return 0. If the object is not a valid Java object but rather
30 | a standard Tcl string, java::isnull will return an error
31 | stating that the argument was not a Java object handle.
32 |
33 |
34 |
35 |
36 |
37 |
38 | Copyright © 1997-1998 Sun Microsystems, Inc.
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaLockCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::lock Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::lock Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::lock javaObj
22 |
23 |
24 |
25 | The java::lock command prevents the Java object, javaObj,
26 | from getting garbage collected. A Tcl variable that stores a Java
27 | object handle has an internal rep that holds a reference to the Java object.
28 | If the Tcl variable's internal rep is changed (e.g. to a Tcl List), the
29 | reference to the Java object is removed, and the Java object could be
30 | garbage collected. The java::lock command maintains a copy of
31 | javaObj's internal rep, so the Java object will be not be
32 | garbage collected. Multiple locks can be placed on the same Java
33 | object. If javaObject is not a valid reference to a Java
34 | object, a Tcl error is generated. It is important to note that use
35 | of the java::lock command is optional, it is not required. A
36 | Java object handle that is stored in a Tcl variable
37 | will not be garbage collected unless the Tcl variable is unset, or
38 | the internal representation is changed.
39 |
40 |
41 |
42 |
43 |
44 |
45 | Copyright © 1997-1998 Sun Microsystems, Inc.
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaNullCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::null Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::null Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::null
22 |
23 |
24 |
25 | The java::null command takes no arguments and returns an object
26 | handle that represents the "null" value in Java.
27 | This command is typically used to get a "null" handle that
28 | will be passed to a Java method. The exact form of the return value
29 | of java::null is not specified and is likely to change
30 | but this should be of little concern as you should not need to know
31 | what the string representation of the "null" Java object is.
32 | If you ever need to test a handle to see if reffers to the "null"
33 | Java object you should use
34 | the java::isnull command.
35 |
36 |
37 |
38 |
39 |
40 |
41 | Copyright © 1997-1998 Sun Microsystems, Inc.
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaObjCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The javaObj Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The javaObj Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - javaObj ?-noconvert? signature ?arg arg ...?
22 |
23 |
24 |
25 | Each Java object handle is also the name of a Tcl command that can be
26 | used to invoke accessible methods of that object from Tcl. The
27 | signature argument specifies which instance method to invoke.
28 | The Signatures section covers the
29 | form of the signature argument in more detail. Additional
30 | parameters to an object command are converted to Java objects or
31 | primitive Java values and passed to the method. It is not
32 | possible to invoke static methods via a javaObj handle,
33 | use the java::call method instead.
34 |
35 |
36 |
37 | The Conversions section describes the result
38 | and possible error conditions of the object command, including the
39 | effect of the optional -noconvert flag.
40 |
41 |
42 |
43 |
44 |
45 |
46 | Copyright © 1997-1998 Sun Microsystems, Inc.
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaPropCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::prop Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::prop Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::prop ?-noconvert? javaObj property ?value property value ...?
22 |
23 |
24 |
25 | The java::prop command is used to manipulate Java Bean
26 | properties from Tcl. The javaObj argument specifies an object
27 | handle. The property argument specifies a Java Bean property
28 | that has corresponding get and set methods. If an additional
29 | value parameter exists, then the property will be set to
30 | value, otherwise the current value of the property is returned.
31 | Multiple properties may be set via additional parameters by
32 | alternating properties and values.
33 |
34 |
35 |
36 | The Conversions section describes the effect
37 | of the optional -noconvert flag on the result. The -noconvert
38 | flag can only be used when getting the value of a property.
39 |
40 |
41 |
42 |
43 | Copyright © 1997-1998 Sun Microsystems, Inc.
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaThrowCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::throw Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::throw Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::throw throwableObj
22 |
23 |
24 |
25 |
26 | The java::throw command throws a Java exception.
27 | throwableObj must be a valid Java object handle and
28 | must be an instance of java.lang.Throwable. Internally, the
29 | java::throw command sets the errorCode global variable to
30 | a list whose first element is the string "JAVA" and whose second
31 | element is throwableObj. Then, it generates a Tcl error to cause
32 | the script to return abruptly. The effect of calling the
33 | java::throw command is exactly the same as calling a Java method
34 | which throws a Java exception.
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | Example:
45 |
46 |
47 | -
48 |
49 | The following code will raise a java.lang.ClassNotFoundException.
50 |
51 |
52 |
53 | java::throw [java::new ClassNotFoundException "bad class foo"]
54 |
55 |
56 |
57 |
58 |
59 |
60 | Copyright © 1997-1998 Sun Microsystems, Inc.
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/site/resources/docs/java2.0.0/JavaUnlockCmd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The java::unlock Command
4 |
5 |
6 |
7 |
8 |
9 |
10 | The java::unlock Command
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Usage:
19 |
20 |
21 | - java::unlock javaObj
22 |
23 |
24 |
25 | The java::unlock command removes a lock placed on
26 | javaObj by the java::lock command.
27 | Multiple locks are allowed on javaObj.
28 | The java::unlock removes one lock each
29 | time it is called.
30 | If the internal rep of the Tcl variable referenced by javaObj
31 | is zero after the lock is removed, the Java object could
32 | be garbage collected. If javaObj does not have an existing lock,
33 | a Tcl error is generated.
34 |
35 |
36 |
37 | If the java::unlock command is called with the string "all"
38 | as the argument, each object that had been locked with the
39 | java::lock command will be unlocked.
40 |
41 |
42 |
43 |
44 |
45 |
46 | Copyright © 1997-1998 Sun Microsystems, Inc.
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/site/resources/docs/jtcl-swank-paper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/site/resources/docs/jtcl-swank-paper.pdf
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/TclCmd/cd.htm:
--------------------------------------------------------------------------------
1 | Built-In Commands - cd manual page
2 |
3 | cd - Change working directory
4 |
5 | cd ?dirName?
6 |
7 | Change the current working directory to dirName, or to the
8 | home directory (as specified in the HOME environment variable) if
9 | dirName is not given.
10 | Returns an empty string.
11 | Note that the current working directory is a per-process resource; the
12 | cd command changes the working directory for all interpreters
13 | and (in a threaded environment) all threads.
14 |
15 | Change to the home directory of the user fred:
16 | cd ~fred
17 |
18 | Change to the directory lib that is a sibling directory of the
19 | current one:
20 |
cd ../lib
21 |
22 | filename, glob, pwd
23 |
24 | working directory
25 |
26 | Copyright © 1993 The Regents of the University of California.
27 | Copyright © 1994-1996 Sun Microsystems, Inc.
28 | Copyright © 1995-1997 Roger E. Critchlow Jr.
29 |
30 |
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/TclCmd/time.htm:
--------------------------------------------------------------------------------
1 | Built-In Commands - time manual page
2 |
3 | time - Time the execution of a script
4 |
5 | time script ?count?
6 |
7 | This command will call the Tcl interpreter count
8 | times to evaluate script (or once if count isn't
9 | specified). It will then return a string of the form
10 | 503 microseconds per iteration
11 | which indicates the average amount of time required per iteration,
12 | in microseconds.
13 | Time is measured in elapsed time, not CPU time.
14 |
15 | Estimate how long it takes for a simple Tcl for loop to count to
16 | a thousand:
17 | time {
18 | for {set i 0} {$i<1000} {incr i} {
19 | # empty body
20 | }
21 | }
22 |
23 | clock
24 |
25 | script, time
26 |
27 | Copyright © 1993 The Regents of the University of California.
28 | Copyright © 1994-1996 Sun Microsystems, Inc.
29 | Copyright © 1995-1997 Roger E. Critchlow Jr.
30 |
31 |
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/TclLib/contents.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | This Page Intentional Blank
4 |
5 |
6 | This Page Intentional Blank.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/TkCmd/contents.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | This Page Intentional Blank
4 |
5 |
6 | This Page Intentional Blank.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/TkLib/contents.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | This Page Intentional Blank
4 |
5 |
6 | This Page Intentional Blank.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/site/resources/docs/tcl8.4.19/html/UserCmd/contents.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | This Page Intentional Blank
4 |
5 |
6 | This Page Intentional Blank.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/site/resources/images/jtcl-horz-med.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/site/resources/images/jtcl-horz-med.png
--------------------------------------------------------------------------------
/src/site/resources/images/jtcl-horz-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/site/resources/images/jtcl-horz-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/jtcl-horz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/site/resources/images/jtcl-horz.png
--------------------------------------------------------------------------------
/src/site/resources/images/jtcl-vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/site/resources/images/jtcl-vert.png
--------------------------------------------------------------------------------
/src/site/site.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JTcl
5 | images/jtcl-horz-med.png
6 | https://jtcl-project.github.io/jtcl/
7 |
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/site/xdoc/xdoc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome
5 | The Maven Team
6 |
7 |
8 |
9 |
10 | This is some text for the xdoc file.
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/AppendCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class AppendCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/append.test";
8 | tclTestResource(resName);
9 | }
10 |
11 | public void testAppendComp() throws Exception {
12 | String resName = "/tcl/lang/cmd/appendComp.test";
13 | tclTestResource(resName);
14 | }
15 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ApplyCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ApplyCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // fails because of error message differences:
12 | "apply-4.3", "apply-4.4", "apply-4.5", "apply-5.1",
13 | // returns the correct values, but non in the same order as C Tcl
14 | "apply-8.2", "apply-8.3", "apply-8.4", "apply-8.5", "apply-8.6", "apply-8.7",
15 | "apply-8.8", "apply-8.9", "apply-8.10"
16 | }));
17 | String resName = "/tcl/lang/cmd/apply.test";
18 | tclTestResource(resName, expectedFailureList);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/BinaryCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Collections;
4 |
5 | import tcl.lang.TclCmdTest;
6 |
7 | public class BinaryCmdTest extends TclCmdTest {
8 | public void testCmd() throws Exception {
9 | String resName = "/tcl/lang/cmd/binary.test";
10 | tclTestResource(resName, Collections.EMPTY_LIST);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/CaseCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class CaseCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/case.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ClockCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class ClockCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/clock.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/CmdAHTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class CmdAHTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList(new String[] {
11 | // these fail because 'file atime', 'file mtime', 'file stat' and 'file link' are incomplete
12 | // because of JVM restrictions. Could fix with Java 1.7 or native code
13 | "cmdAH-20.2", "cmdAH-24.3", "cmdAH-28.3", "cmdAH-28.4", "cmdAH-28.8", "cmdAH-28.12", "cmdAH-29.4.1"
14 | }));
15 |
16 | String resName = "/tcl/lang/cmd/cmdAH.test";
17 | tclTestResource(resName, expectedFailureList);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/CmdILTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class CmdILTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList(new String[] {
11 | // These fail because JTCL uses a different sorting algorithm than C Tcl.
12 | // Identical elements, according to the lsort comparison method, might be swapped
13 | // in JTCL relative to C Tcl - for example 'lsort -index 0 {{a b} {a c}}' can sort into either order
14 | // and be correctly sorted.
15 | // Also, the compare function might not be called in the same order,
16 | // which makes cmdIL-3.15 fail.
17 | "cmdIL-1.6", "cmdIL-1.23", "cmdIL-3.15"
18 | }));
19 | String resName = "/tcl/lang/cmd/cmdIL.test";
20 | tclTestResource(resName, expectedFailureList);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/CmdMZTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class CmdMZTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | String resName = "/tcl/lang/cmd/cmdMZ.test";
11 | tclTestResource(resName);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ConcatCmdText.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class ConcatCmdText extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/concat.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/EncodingCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 | import java.util.LinkedList;
6 |
7 | import tcl.lang.TclCmdTest;
8 |
9 | public class EncodingCmdTest extends TclCmdTest {
10 | public void testCmd() throws Exception {
11 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
12 | // These fail because of the description at http://www8.plala.or.jp/tkubota1/unicode-symbols-map.html
13 | // In the non-Unicode world, these codes map onto the same JIS X 0208 codepoints. But in Unicode,
14 | // Cpe982's 0x81 0x91 maps to U+FFE0, while Shift_JIS's 0x81 0x91 and Euc-JP's 0xA1 0xF1 map on
15 | // to U+00A2. All three of those map to JIS X 0208 0x2171 and actually are the same "cents" sign.
16 | // When Java encodes Cpe982, 0x81 0x91 -> U+FFE0, and then decodes U+FFE0 to Shift_JIS, it's an invalid
17 | // character. It seems that C Tcl either doesn't go through Unicode, or has hacked the maps.
18 | "encoding-25.2",
19 | "encoding-25.3",
20 | "encoding-25.4",
21 | "encoding-25.5",
22 | "encoding-25.9",
23 | "encoding-25.13"
24 | }));
25 | String resName = "/tcl/lang/cmd/encoding.test";
26 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE, resName, expectedFailureList);
27 | }
28 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ErrorCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ErrorCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception { LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
10 | // difference in 'invoked from within' and 'while executing'
11 | "error-1.3",
12 | "error-2.6"
13 | }));
14 | String resName = "/tcl/lang/cmd/error.test";
15 | tclTestResource(resName, expectedFailureList);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/EvalCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class EvalCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | String resName = "/tcl/lang/cmd/eval.test";
11 | tclTestResource(resName);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ExecCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ExecCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // exec-1.3 and exec-63 fail because the JVM process model doesn't allow for proper STDIN
12 | // file descriptor inheritance, instead using a pipe model. Too much of stdin can get
13 | // eaten up because of this. The solution is to create platform-specific subclasses
14 | // of TclProcess which do proper inheritance. However, these two test fail only
15 | // occassionally, so we inserted the "stdinInherit" testconstraint into exec.test
16 | // which should be removed when we have platform-specific exec.
17 | //"exec-1.3",
18 | //"exec-6.3",
19 |
20 | // exec-11.5 and exec-17.1 fail because JVM doesn't allow background processes to survive the JVM
21 | // if they read from STDIN or write to STDOUT/STDERR. There's no direct access
22 | // in the JVM to filedescriptors 0, 1, 2; we're only given InputStream() and OutputStream()
23 | // so the JVM must be running. However, putting processes in the background does
24 | // work, even though these tests fail.
25 | "exec-11.5",
26 | "exec-17.1"
27 | }));
28 | String resName = "/tcl/lang/cmd/exec.test";
29 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE, resName, expectedFailureList);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ExprCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ExprCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | "expr-13.9", // not possible to match error message without significant recoding
12 | "expr-14.23", // widespread, pesky "invoked from within" instead of "while executing" in error message
13 | "expr-14.29", // widespread, pesky "invoked from within" instead of "while executing" in error message
14 | "expr-20.2", // not possible to match error message without significant recoding
15 | "expr-46.5", "expr-46.6" // JTCL uses 64-bit integer, so these tests don't overflow
16 | }));
17 | String resName = "/tcl/lang/cmd/expr.test";
18 | tclTestResource(resName, expectedFailureList);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/FileCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class FileCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | /* These fail because of error message differences; JVM can't doesn't know exactly why
12 | * copy/rename fails
13 | */
14 | "fCmd-6.17",
15 | "fCmd-9.14",
16 | /*
17 | * These tests fail primarily because link creation with 'file link' is not available because
18 | * Java doesn't support it. However, Java 1.7 will support it, so we should fix it at that time,
19 | * or fix it with native code.
20 | */
21 | "fCmd-28.9",
22 | "fCmd-28.11",
23 | "fCmd-28.12",
24 | "fCmd-28.13",
25 | "fCmd-28.15.2",
26 | "fCmd-28.16",
27 | "fCmd-28.17",
28 | "fCmd-28.18"
29 |
30 | }));
31 | String resName = "/tcl/lang/cmd/fCmd.test";
32 | tclTestResource(resName, expectedFailureList);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/FileNameCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 | import java.util.LinkedList;
6 |
7 | import tcl.lang.TclCmdTest;
8 |
9 | public class FileNameCmdTest extends TclCmdTest {
10 | public void testCmd() throws Exception {
11 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
12 | /*
13 | * These tests fail because 'file link -symbolic' doesn't work in Java. If someday we add
14 | * platform-specific native code, file link -symbolic and glob -types l can be fixes, and these
15 | * test should work.
16 | */
17 | "filename-11.17.2",
18 | "filename-11.17.3",
19 | "filename-11.17.4",
20 | "filename-11.17.7",
21 | "filename-11.17.8"
22 | }));
23 |
24 | String resName = "/tcl/lang/cmd/fileName.test";
25 |
26 | // mostly tests the 'glob' command and some 'file ...' tests
27 | tclTestResource(resName,expectedFailureList);
28 | }
29 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/FileSystemCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 | import java.util.LinkedList;
6 |
7 | import tcl.lang.TclCmdTest;
8 |
9 | public class FileSystemCmdTest extends TclCmdTest {
10 | public void testCmd() throws Exception {
11 | String resName = "/tcl/lang/cmd/fileSystem.test";
12 | tclTestResource(resName,Collections.EMPTY_LIST);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ForCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ForCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // FIXME - can we fix the error callback messages?
12 | // widespread, pesky "invoked from within" instead of "while executing" in error message
13 | "for-1.8", "for-1.12"
14 | }));
15 |
16 | String resName = "/tcl/lang/cmd/for.test";
17 | tclTestResource(resName, expectedFailureList);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ForeachCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class ForeachCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/foreach.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/FormatCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class FormatCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/format.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/HistoryCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class HistoryCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/history.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/IfCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class IfCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // widespread, pesky "invoked from within" instead of "while executing" in error message,
12 | // couled with difference between compiled and non-compiled version of 'if'
13 | "if-1.3", "if-1.10", "if-2.4", "if-3.4", "if-5.3", "if-5.10", "if-6.4", "if-7.4",
14 | // this difference in expr error message would take significant coding to fix
15 | "if-10.6"
16 | }));
17 |
18 | String resName = "/tcl/lang/cmd/if.test";
19 | tclTestResource(resName, expectedFailureList);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/IncrCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class IncrCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // differences between "compiling" and "executing" in error message:
12 | // FIXME - change the error text in the IncrCmd to match 8.4
13 | "incr-1.19", "incr-1.27", "incr-2.19", "incr-2.27"
14 | }));
15 |
16 | String resName = "/tcl/lang/cmd/incr.test";
17 | tclTestResource(resName, expectedFailureList);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/InfoCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class InfoCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // fails because it counts the number of compiled, not interpreted, commands in C Tcl; JTCL doesn't compile
12 | "info-3.1",
13 | // returns the correct values, but non in the same order as C Tcl
14 | "info-15.4"
15 | }));
16 | String resName = "/tcl/lang/cmd/info.test";
17 | tclTestResource(resName, expectedFailureList);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/InterpCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class InterpCmdTest extends TclCmdTest {
9 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
10 | // different list from [interp hidden] because the 'load' command is not implemented in JTCL
11 | "interp-21.5",
12 | "interp-21.8",
13 | // recursion limit is actually inherited by the slave interpreter as expected, but the nested proc
14 | // call count is one fewer in JTCL than in TCL. My best guess is that this is due to TCL compiling
15 | // some of the contents of the recursive proc in these tests, so that there's no eval internal
16 | // to the proc (DJB)
17 | "interp-29.4.1",
18 | "interp-29.4.2"
19 | }));
20 | public void testCmd() throws Exception {
21 | String resName = "/tcl/lang/cmd/interp.test";
22 | tclTestResource(resName, expectedFailureList);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/IoCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class IoCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/ioCmd.test";
8 | tclTestResource(resName);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/JoinCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class JoinCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/join.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LassignCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LassignCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lassign.test";
8 | tclTestResource(resName);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LindexCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LindexCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/linsert.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LinsertCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LinsertCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/linsert.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ListCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class ListCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/list.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LlengthCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Collections;
4 |
5 | import tcl.lang.TclCmdTest;
6 |
7 | public class LlengthCmdTest extends TclCmdTest {
8 | public void testCmd() throws Exception {
9 | String resName = "/tcl/lang/cmd/llength.test";
10 | tclTestResource(resName);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LrangeCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LrangeCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lrange.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LrepeatCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LrepeatCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lrepeat.test";
8 | tclTestResource(resName);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LreplaceCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LreplaceCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lreplace.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LreverseCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LreverseCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lreverse.test";
8 | tclTestResource(resName);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LsearchCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class LsearchCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | String resName = "/tcl/lang/cmd/lsearch.test";
11 | tclTestResource(resName, Collections.EMPTY_LIST);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/LsetCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class LsetCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/lset.test";
8 | tclTestResource(resName);
9 | }
10 |
11 | public void testLsetComp() throws Exception {
12 | String resName = "/tcl/lang/cmd/lsetComp.test";
13 | tclTestResource(resName);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/MiscCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 | import java.util.LinkedList;
6 |
7 | import tcl.lang.TclCmdTest;
8 |
9 | public class MiscCmdTest extends TclCmdTest {
10 | public void testBasic() throws Exception {
11 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
12 | "basic-24.3" // 'info commands' result in a different order; this is not a bug
13 | }));
14 |
15 | String resName = "/tcl/lang/cmd/basic.test";
16 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE, resName, expectedFailureList);
17 | }
18 |
19 | public void testIo() throws Exception {
20 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
21 | // previously failing test now seems to be working in Java 1.6.0_31
22 | // "io-14.9" // test requires that we can exec a new tcltest environment
23 | }));
24 | String resName = "/tcl/lang/cmd/io.test";
25 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE,resName, expectedFailureList);
26 | }
27 |
28 | public void testUtil() throws Exception {
29 | String resName = "/tcl/lang/cmd/util.test";
30 | tclTestResource(resName);
31 | }
32 |
33 | public void testVar() throws Exception {
34 | String resName = "/tcl/lang/cmd/var.test";
35 | tclTestResource(resName);
36 | }
37 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/NamespaceCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Collections;
4 |
5 | import tcl.lang.TclCmdTest;
6 |
7 | public class NamespaceCmdTest extends TclCmdTest {
8 | public void testCmd() throws Exception {
9 | String resName = "/tcl/lang/cmd/namespace.test";
10 | tclTestResource(resName, Collections.EMPTY_LIST);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/PackageCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class PackageCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/package.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/PidCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class PidCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/pid.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ProcCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class ProcCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // fails because of error message differences:
12 | "proc-1.7", "proc-1.8"
13 | }));
14 | String resName = "/tcl/lang/cmd/proc.test";
15 | tclTestResource(resName, expectedFailureList);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/PwdCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class PwdCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/pwd.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/RenameCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class RenameCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | // FIXME: rename.test altered to run test "rename-6.1 {old code invalidated (epoch incremented) when cmd with compile proc is renamed } {"
8 | // a difference between C/Tcl on-the-fly bytecode compiler and JTcl's pure interpreter??
9 | // original test looks was this (from rename-5.1 to end of file)
10 |
11 | // test rename-6.1 {old code invalidated (epoch incremented) when cmd with compile proc is renamed } {
12 | // proc x {} {
13 | // set a 123
14 | // set b [incr a]
15 | // }
16 | // x
17 | // rename incr incr.old
18 | // proc incr {} {puts "new incr called!"}
19 | // catch {x} msg
20 | // set msg
21 | // } {wrong # args: should be "incr"}
22 | //
23 | // if {[info commands incr.old] != {}} {
24 | // catch {rename incr {}}
25 | // catch {rename incr.old incr}
26 | // }
27 | // ::tcltest::cleanupTests
28 | // return
29 |
30 | String resName = "/tcl/lang/cmd/rename.test";
31 | tclTestResource(resName);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/ScanCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class ScanCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/scan.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SetCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class SetCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/set.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SocketCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Collections;
4 |
5 | import tcl.lang.TclCmdTest;
6 |
7 | public class SocketCmdTest extends TclCmdTest {
8 | public void testCmd() throws Exception {
9 | String resName = "/tcl/lang/cmd/socket.test";
10 | /* need TCLTEST_NAMEOFEXECUTABLE in order to properly initialize stdio testConstraint */
11 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE, resName, Collections.EMPTY_LIST);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SourceCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class SourceCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | String resName = "/tcl/lang/cmd/source.test";
11 | tclTestResource(resName);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SplitCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class SplitCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/split.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/StringCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class StringCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/string.test";
8 | tclTestResource(resName);
9 | }
10 |
11 | public void testStringComp() throws Exception {
12 | String resName = "/tcl/lang/cmd/stringComp.test";
13 | tclTestResource(resName);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SubstCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Collections;
4 |
5 | import tcl.lang.TclCmdTest;
6 |
7 | public class SubstCmdTest extends TclCmdTest {
8 | public void testCmd() throws Exception {
9 | String resName = "/tcl/lang/cmd/subst.test";
10 | tclTestResource(TCLTEST_NAMEOFEXECUTABLE, resName, Collections.EMPTY_LIST);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/SwitchCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.Collections;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class SwitchCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | String resName = "/tcl/lang/cmd/switch.test";
11 | tclTestResource(resName, Collections.EMPTY_LIST);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/TimerCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class TimerCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/timer.test";
8 | tclTestResource(resName);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/TraceCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class TraceCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/trace.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/UplevelCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import tcl.lang.TclCmdTest;
4 |
5 | public class UplevelCmdTest extends TclCmdTest {
6 | public void testCmd() throws Exception {
7 | String resName = "/tcl/lang/cmd/uplevel.test";
8 | tclTestResource(resName);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/UpvarCmdTest.java:
--------------------------------------------------------------------------------
1 |
2 | package tcl.lang.cmd;
3 |
4 | import java.util.Arrays;
5 | import java.util.LinkedList;
6 |
7 | import tcl.lang.TclCmdTest;
8 |
9 | public class UpvarCmdTest extends TclCmdTest {
10 | public void testCmd() throws Exception {
11 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
12 | // these test pass, except order of list returned by "array names" if different
13 | "upvar-3.5", "upvar-3.6"
14 | }));
15 |
16 | String resName = "/tcl/lang/cmd/upvar.test";
17 | tclTestResource(resName, expectedFailureList);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/java/tcl/lang/cmd/WhileCmdTest.java:
--------------------------------------------------------------------------------
1 | package tcl.lang.cmd;
2 |
3 | import java.util.Arrays;
4 | import java.util.LinkedList;
5 |
6 | import tcl.lang.TclCmdTest;
7 |
8 | public class WhileCmdTest extends TclCmdTest {
9 | public void testCmd() throws Exception {
10 | LinkedList expectedFailureList = new LinkedList(Arrays.asList( new String[] {
11 | // widespread, pesky "invoked from within" instead of "while executing" in error message
12 | "while-1.2", "while-1.8"
13 | }));
14 |
15 | String resName = "/tcl/lang/cmd/while.test";
16 | tclTestResource(resName, expectedFailureList);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/all.tcl:
--------------------------------------------------------------------------------
1 | # all.tcl --
2 | #
3 | # This file contains a top-level script to run all of the Tcl
4 | # tests. Execute it by invoking "source all.test" when running tcltest
5 | # in this directory.
6 | #
7 | # Copyright (c) 1998-1999 by Scriptics Corporation.
8 | # Copyright (c) 2000 by Ajuba Solutions
9 | #
10 | # See the file "license.terms" for information on usage and redistribution
11 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 | #
13 | # RCS: @(#) $Id: all.tcl,v 1.16 2002/04/10 19:57:15 hobbs Exp $
14 |
15 | set tcltestVersion [package require tcltest]
16 | namespace import -force tcltest::*
17 |
18 | if {$tcl_platform(platform) == "macintosh"} {
19 | tcltest::singleProcess 1
20 | }
21 |
22 | tcltest::testsDirectory [file dir [info script]]
23 | tcltest::runAllTests
24 |
25 | return
26 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/llength.test:
--------------------------------------------------------------------------------
1 | # Commands covered: llength
2 | #
3 | # This file contains a collection of tests for one or more of the Tcl
4 | # built-in commands. Sourcing this file into Tcl runs the tests and
5 | # generates output for errors. No output means no errors were found.
6 | #
7 | # Copyright (c) 1991-1993 The Regents of the University of California.
8 | # Copyright (c) 1994 Sun Microsystems, Inc.
9 | # Copyright (c) 1998-1999 by Scriptics Corporation.
10 | #
11 | # See the file "license.terms" for information on usage and redistribution
12 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 | #
14 | # RCS: @(#) $Id: llength.test,v 1.5 2000/04/10 17:19:01 ericm Exp $
15 |
16 | if {[lsearch [namespace children] ::tcltest] == -1} {
17 | package require tcltest
18 | namespace import -force ::tcltest::*
19 | }
20 |
21 | test llength-1.1 {length of list} {
22 | llength {a b c d}
23 | } 4
24 | test llength-1.2 {length of list} {
25 | llength {a b c {a b {c d}} d}
26 | } 5
27 | test llength-1.3 {length of list} {
28 | llength {}
29 | } 0
30 |
31 | test llength-2.1 {error conditions} {
32 | list [catch {llength} msg] $msg
33 | } {1 {wrong # args: should be "llength list"}}
34 | test llength-2.2 {error conditions} {
35 | list [catch {llength 123 2} msg] $msg
36 | } {1 {wrong # args: should be "llength list"}}
37 | test llength-2.3 {error conditions} {
38 | list [catch {llength "a b c \{"} msg] $msg
39 | } {1 {unmatched open brace in list}}
40 |
41 | # cleanup
42 | ::tcltest::cleanupTests
43 | return
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/lreverse.test:
--------------------------------------------------------------------------------
1 | # This file contains a collection of tests for the procedures in the
2 | # file tclCmdIL.c. Sourcing this file into Tcl runs the tests and
3 | # generates output for errors. No output means no errors were found.
4 | #
5 | # Copyright (c) 1997 Sun Microsystems, Inc.
6 | # Copyright (c) 1998-1999 by Scriptics Corporation.
7 | #
8 | # See the file "license.terms" for information on usage and redistribution
9 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 | #
11 |
12 | if {[lsearch [namespace children] ::tcltest] == -1} {
13 | package require tcltest
14 | namespace import -force ::tcltest::*
15 | }
16 |
17 | test lreverse-7.1 {lreverse command} -body {
18 | lreverse
19 | } -returnCodes error -result "wrong # args: should be \"lreverse list\""
20 | test lreverse-7.2 {lreverse command} -body {
21 | lreverse a b
22 | } -returnCodes error -result "wrong # args: should be \"lreverse list\""
23 | test lreverse-7.3 {lreverse command} -body {
24 | lreverse "not \{a list"
25 | } -returnCodes error -result {unmatched open brace in list}
26 | test lreverse-7.4 {lreverse command - shared object} {
27 | set x {a b {c d} e f}
28 | lreverse $x
29 | } {f e {c d} b a}
30 | test lreverse-7.5 {lreverse command - unshared object} {
31 | lreverse [list a b {c d} e f]
32 | } {f e {c d} b a}
33 | test lreverse-7.6 {lreverse command - unshared object [Bug 1672585]} {
34 | lreverse [set x {1 2 3}][unset x]
35 | } {3 2 1}
36 | test lreverse-7.7 {lreverse command - empty object [Bug 1876793]} {
37 | lreverse [list]
38 | } {}
39 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/osa.test:
--------------------------------------------------------------------------------
1 | # Commands covered: AppleScript
2 | #
3 | # This file contains a collection of tests for one or more of the Tcl
4 | # built-in commands. Sourcing this file into Tcl runs the tests and
5 | # generates output for errors. No output means no errors were found.
6 | #
7 | # Copyright (c) 1997 Sun Microsystems, Inc.
8 | # Copyright (c) 1998-1999 by Scriptics Corporation.
9 | #
10 | # See the file "license.terms" for information on usage and redistribution
11 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 | #
13 | # RCS: @(#) $Id: osa.test,v 1.6 2000/04/10 17:19:02 ericm Exp $
14 |
15 | if {[lsearch [namespace children] ::tcltest] == -1} {
16 | package require tcltest
17 | namespace import -force ::tcltest::*
18 | }
19 |
20 | # Only run the test if we can load the AppleScript command
21 | set ::tcltest::testConstraints(appleScript) [expr {[info commands AppleScript] != ""}]
22 |
23 | test osa-1.1 {Tcl_OSAComponentCmd} {macOnly appleScript} {
24 | list [catch AppleScript msg] $msg
25 | } {1 {wrong # args: should be "AppleScript option ?arg ...?"}}
26 | test osa-1.2 {Tcl_OSAComponentCmd} {macOnly appleScript} {
27 | list [catch {AppleScript x} msg] $msg
28 | } {1 {bad option "x": should be compile, decompile, delete, execute, info, load, run or store}}
29 |
30 | test osa-1.3 {TclOSACompileCmd} {macOnly appleScript} {
31 | list [catch {AppleScript compile} msg] $msg
32 | } {1 {wrong # args: should be "AppleScript compile ?options? code"}}
33 |
34 | # cleanup
35 | ::tcltest::cleanupTests
36 | return
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/pwd.test:
--------------------------------------------------------------------------------
1 | # Commands covered: pwd
2 | #
3 | # This file contains a collection of tests for one or more of the Tcl
4 | # built-in commands. Sourcing this file into Tcl runs the tests and
5 | # generates output for errors. No output means no errors were found.
6 | #
7 | # Copyright (c) 1991-1993 The Regents of the University of California.
8 | # Copyright (c) 1994-1997 Sun Microsystems, Inc.
9 | # Copyright (c) 1998-1999 by Scriptics Corporation.
10 | #
11 | # See the file "license.terms" for information on usage and redistribution
12 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 | #
14 | # RCS: @(#) $Id: pwd.test,v 1.6 2000/04/10 17:19:03 ericm Exp $
15 |
16 | if {[lsearch [namespace children] ::tcltest] == -1} {
17 | package require tcltest
18 | namespace import -force ::tcltest::*
19 | }
20 |
21 | test pwd-1.1 {simple pwd} {
22 | catch pwd
23 | } 0
24 | test pwd-1.2 {simple pwd} {
25 | expr [string length pwd]>0
26 | } 1
27 |
28 | # cleanup
29 | ::tcltest::cleanupTests
30 | return
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/security.test:
--------------------------------------------------------------------------------
1 | # security.test --
2 | #
3 | # Functionality covered: this file contains a collection of tests for the
4 | # auto loading and namespaces.
5 | #
6 | # Sourcing this file into Tcl runs the tests and generates output for
7 | # errors. No output means no errors were found.
8 | #
9 | # Copyright (c) 1997 Sun Microsystems, Inc.
10 | # Copyright (c) 1998-1999 by Scriptics Corporation.
11 | # All rights reserved.
12 | #
13 | # RCS: @(#) $Id: security.test,v 1.5 2000/04/10 17:19:04 ericm Exp $
14 |
15 | if {[lsearch [namespace children] ::tcltest] == -1} {
16 | package require tcltest
17 | namespace import -force ::tcltest::*
18 | }
19 |
20 | # If this proc becomes invoked, then there is a bug
21 |
22 | proc BUG {args} {
23 | set ::BUG 1
24 | }
25 |
26 | # Check and Clear the bug flag (to do before each test)
27 | set ::BUG 0
28 |
29 | proc CB {} {
30 | set ret $::BUG
31 | set ::BUG 0
32 | return $ret
33 | }
34 |
35 |
36 | test sec-1.1 {tcl_endOfPreviousWord} {
37 | catch {tcl_startOfPreviousWord x {[BUG]}}
38 | CB
39 | } 0
40 |
41 | # cleanup
42 | ::tcltest::cleanupTests
43 | return
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/string.test:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/test/resources/tcl/lang/cmd/string.test
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/stringObj.test:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/test/resources/tcl/lang/cmd/stringObj.test
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/subst.test:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtcl-project/jtcl/60c40eabf9dfaf7c5901249689484ada73b9d210/src/test/resources/tcl/lang/cmd/subst.test
--------------------------------------------------------------------------------
/src/test/resources/tcl/lang/cmd/winConsole.test:
--------------------------------------------------------------------------------
1 | # This file tests the tclWinConsole.c file.
2 | #
3 | # This file contains a collection of tests for one or more of the Tcl
4 | # built-in commands. Sourcing this file into Tcl runs the tests and
5 | # generates output for errors. No output means no errors were found.
6 | #
7 | # Copyright (c) 1999 by Scriptics Corporation.
8 | #
9 | # See the file "license.terms" for information on usage and redistribution
10 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 | #
12 | # RCS: @(#) $Id: winConsole.test,v 1.5 2000/04/10 17:19:06 ericm Exp $
13 |
14 | if {[lsearch [namespace children] ::tcltest] == -1} {
15 | package require tcltest
16 | namespace import -force ::tcltest::*
17 | }
18 |
19 |
20 | test winConsole-1.1 {Console file channel: non-blocking gets} \
21 | {pcOnly interactive} {
22 |
23 | set oldmode [fconfigure stdin]
24 |
25 | puts stdout "Enter abcdef now: " nonewline
26 | flush stdout
27 | fileevent stdin readable {
28 | if {[gets stdin line] >= 0} {
29 | set result $line
30 | } else {
31 | set result "gets failed"
32 | }
33 | }
34 |
35 | fconfigure stdin -blocking 0 -buffering line
36 |
37 | set result {}
38 | vwait result
39 |
40 | #cleanup the fileevent
41 | fileevent stdin readable {}
42 | eval fconfigure stdin $oldmode
43 |
44 | set result
45 |
46 | } "abcdef"
47 |
48 | #cleanup
49 |
50 | ::tcltest::cleanupTests
51 | return
52 |
53 |
--------------------------------------------------------------------------------
/toolchains.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | jdk
7 |
8 | 1.6
9 | sun
10 |
11 |
12 |
13 |
14 |
15 | /usr/local/java16
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------