Compare commits
65
Commits
github-action
...
tip-590
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1704d23d60 | ||
|
|
e2721f9546 | ||
|
|
b4cc01c658 | ||
|
|
ef7a8aec00 | ||
|
|
e8b55fb733 | ||
|
|
17e7dbc31a | ||
|
|
d1dfef4884 | ||
|
|
14ec7c1d85 | ||
|
|
8e1f957a66 | ||
|
|
c55eb93bb4 | ||
|
|
26156cc1cc | ||
|
|
f7b532246a | ||
|
|
c4b8fd351a | ||
|
|
a28856a322 | ||
|
|
f88225f6fb | ||
|
|
6098040754 | ||
|
|
48385f8bba | ||
|
|
32e54c3504 | ||
|
|
da2c0d731a | ||
|
|
4929dd61e1 | ||
|
|
95fad70001 | ||
|
|
ffda48d07b | ||
|
|
b9fdbb0710 | ||
|
|
969ef21225 | ||
|
|
d7092f4a55 | ||
|
|
0566be32d5 | ||
|
|
45aa988905 | ||
|
|
7fa0505ae8 | ||
|
|
413ce795e0 | ||
|
|
71a412b8da | ||
|
|
32d5f89b18 | ||
|
|
0589f3b799 | ||
|
|
c13d3b0405 | ||
|
|
0943b71810 | ||
|
|
a3a070b13c | ||
|
|
dac1c2f4f2 | ||
|
|
106838de02 | ||
|
|
ffa8d1d461 | ||
|
|
eff08da703 | ||
|
|
807ed7b13c | ||
|
|
3ef704b39c | ||
|
|
346721f3f0 | ||
|
|
b3e4fc2a04 | ||
|
|
a22953bb77 | ||
|
|
d8f5e027e2 | ||
|
|
8e61a58c14 | ||
|
|
c41e7ffff5 | ||
|
|
f809af7e7b | ||
|
|
a376924771 | ||
|
|
72c49f6909 | ||
|
|
20664f1fa1 | ||
|
|
44d6e3ab5e | ||
|
|
33955d6933 | ||
|
|
f25b288505 | ||
|
|
feb336f6b3 | ||
|
|
efe33a9fd9 | ||
|
|
ce3437bf88 | ||
|
|
e69d8e8e92 | ||
|
|
8607752aa6 | ||
|
|
d9737c5991 | ||
|
|
fb3868da56 | ||
|
|
f145d5f091 | ||
|
|
577981fee9 | ||
|
|
31145f178e | ||
|
|
861d8f512f |
@@ -1,37 +1,45 @@
|
||||
name: Linux Build and Test
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
gcc:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
symbols:
|
||||
- "no"
|
||||
- "mem"
|
||||
- "all"
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: unix
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
working-directory: unix
|
||||
- name: Configure (symbols=${{ matrix.symbols }})
|
||||
run: |
|
||||
mkdir "${HOME}/install dir"
|
||||
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
env:
|
||||
CFGOPT: --enable-symbols=${{ matrix.symbols }}
|
||||
- name: Prepare
|
||||
run: touch tclStubInit.c tclOOStubInit.c
|
||||
working-directory: generic
|
||||
- name: Build
|
||||
working-directory: unix
|
||||
run: |
|
||||
make all
|
||||
- name: Build Test Harness
|
||||
working-directory: unix
|
||||
run: |
|
||||
make tcltest
|
||||
- name: Run Tests
|
||||
working-directory: unix
|
||||
run: |
|
||||
make test
|
||||
- name: Test-Drive Installation
|
||||
working-directory: unix
|
||||
run: |
|
||||
make install
|
||||
- name: Create Distribution Package
|
||||
working-directory: unix
|
||||
run: |
|
||||
make dist
|
||||
- name: Convert Documentation to HTML
|
||||
working-directory: unix
|
||||
run: |
|
||||
make html-tcl
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
name: macOS Build and Test
|
||||
on: [push]
|
||||
jobs:
|
||||
with-Xcode:
|
||||
runs-on: macos-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: macosx
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Prepare
|
||||
run: touch tclStubInit.c tclOOStubInit.c
|
||||
working-directory: generic
|
||||
- name: Build
|
||||
run: make all
|
||||
- name: Run Tests
|
||||
run: make test styles=develop
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
MAC_CI: 1
|
||||
Unix-like:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
symbols:
|
||||
- "no"
|
||||
- "mem"
|
||||
dtrace:
|
||||
- "no"
|
||||
- "yes"
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: unix
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c
|
||||
mkdir "$HOME/install dir"
|
||||
working-directory: generic
|
||||
- name: Configure (symbols=${{ matrix.symbols }} dtrace=${{ matrix.dtrace }})
|
||||
# Note that macOS is always a 64 bit platform
|
||||
run: ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
env:
|
||||
CFGOPT: --enable-symbols=${{ matrix.symbols }} --enable-dtrace=${{ matrix.dtrace }}
|
||||
- name: Build
|
||||
run: |
|
||||
make all tcltest
|
||||
- name: Run Tests
|
||||
run: |
|
||||
make test
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
MAC_CI: 1
|
||||
- name: Trial Installation
|
||||
run: |
|
||||
make install
|
||||
@@ -1,37 +0,0 @@
|
||||
name: Linux Build and Test
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
working-directory: unix
|
||||
run: |
|
||||
mkdir "${HOME}/install dir"
|
||||
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
- name: Build
|
||||
working-directory: unix
|
||||
run: |
|
||||
make all
|
||||
- name: Build Test Harness
|
||||
working-directory: unix
|
||||
run: |
|
||||
make tcltest
|
||||
- name: Run Tests
|
||||
working-directory: unix
|
||||
run: |
|
||||
make test
|
||||
- name: Test-Drive Installation
|
||||
working-directory: unix
|
||||
run: |
|
||||
make install
|
||||
- name: Create Distribution Package
|
||||
working-directory: unix
|
||||
run: |
|
||||
make dist
|
||||
- name: Convert Documentation to HTML
|
||||
working-directory: unix
|
||||
run: |
|
||||
make html-tcl
|
||||
@@ -1,22 +1,75 @@
|
||||
name: Windows Build and Test
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
MSVC:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: powershell
|
||||
working-directory: win
|
||||
# Using powershell means we need to explicitly stop on failure
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Init MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Build
|
||||
working-directory: win
|
||||
run: |
|
||||
nmake -f makefile.vc all
|
||||
&nmake -f makefile.vc all
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
- name: Build Test Harness
|
||||
working-directory: win
|
||||
run: |
|
||||
nmake -f makefile.vc tcltest
|
||||
&nmake -f makefile.vc tcltest
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
- name: Run Tests
|
||||
working-directory: win
|
||||
run: |
|
||||
nmake -f makefile.vc test
|
||||
&nmake -f makefile.vc test
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
CI_BUILD_WITH_MSVC: 1
|
||||
MSYS-gcc:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: win
|
||||
strategy:
|
||||
matrix:
|
||||
symbols:
|
||||
- "no"
|
||||
- "mem"
|
||||
- "all"
|
||||
# Using powershell means we need to explicitly stop on failure
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install MSYS2 and Make
|
||||
run: choco install msys2 make
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c
|
||||
mkdir "${HOME}/install dir"
|
||||
working-directory: generic
|
||||
- name: Configure (symbols=${{ matrix.symbols }})
|
||||
run: |
|
||||
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
env:
|
||||
CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }}
|
||||
- name: Build
|
||||
run: make all
|
||||
- name: Build Test Harness
|
||||
run: make tcltest
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
|
||||
# If you add builds with Wine, be sure to define the environment variable
|
||||
# CI_USING_WINE when running them so that broken tests know not to run.
|
||||
|
||||
@@ -8,14 +8,17 @@ site](https://sourceforge.net/projects/tcl/files/Tcl/).
|
||||
8.6.10
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-6-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-6-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Acore-8-6-branch)
|
||||
<br>
|
||||
8.7a4
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Acore-8-branch)
|
||||
<br>
|
||||
9.0a2
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Amain)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Amain)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Amain)
|
||||
|
||||
## Contents
|
||||
1. [Introduction](#intro)
|
||||
|
||||
+2
-1
@@ -259,7 +259,8 @@ outside this range, \fBTcl_SetChannelBufferSize\fR sets the buffer size to
|
||||
the generic layer that the events specified by \fImask\fR have
|
||||
occurred on the channel. Channel drivers are responsible for invoking
|
||||
this function whenever the channel handlers need to be called for the
|
||||
channel. See \fBWATCHPROC\fR below for more details.
|
||||
channel (or other pending tasks like a write flush should be performed).
|
||||
See \fBWATCHPROC\fR below for more details.
|
||||
.PP
|
||||
\fBTcl_BadChannelOption\fR is called from driver specific
|
||||
\fIsetOptionProc\fR or \fIgetOptionProc\fR to generate a complete
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
|
||||
'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
|
||||
'\" Copyright (c) 2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
|
||||
'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
|
||||
'\" Copyright (c) 2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
|
||||
@@ -762,6 +762,15 @@ high-to-low order within each byte. For example,
|
||||
will return \fB2\fR with \fB01110\fR stored in \fIvar1\fR and
|
||||
\fB1000011100000101\fR stored in \fIvar2\fR.
|
||||
.RE
|
||||
.IP \fBC\fR 5
|
||||
This form is similar to \fBA\fR, except that it scans the data from start
|
||||
and terminates at the first null (C string semantics). For example,
|
||||
.RS
|
||||
.CS
|
||||
\fBbinary scan\fR "abc\e000efghi" C* var1
|
||||
.CE
|
||||
will return \fB1\fR with \fBabc\fR stored in \fIvar1\fR.
|
||||
.RE
|
||||
.IP \fBH\fR 5
|
||||
The data is turned into a string of \fIcount\fR hexadecimal digits in
|
||||
high-to-low order represented as a sequence of characters in the set
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ of the given patterns (in the style of \fBstring match\fR.)
|
||||
.
|
||||
The script rule tests for matching by assigning the key to the
|
||||
\fIkeyVariable\fR and the value to the \fIvalueVariable\fR, and then evaluating
|
||||
the given script which should return a boolean value (with the
|
||||
the given script which should result in a boolean value (with the
|
||||
key/value pair only being included in the result of the \fBdict
|
||||
filter\fR when a true value is returned.) Note that the first
|
||||
argument after the rule selection word is a two-element list. If the
|
||||
|
||||
+19
-7
@@ -78,6 +78,9 @@ when the transaction completes. For this to work, the Tcl event loop
|
||||
must be active. In Tk applications this is always true. For pure-Tcl
|
||||
applications, the caller can use \fB::http::wait\fR after calling
|
||||
\fB::http::geturl\fR to start the event loop.
|
||||
.PP
|
||||
\fBNote:\fR The event queue is even used without the \fB-command\fR option.
|
||||
As a side effect, arbitrary commands may be processed while \fBhttp::geturl\fR is running.
|
||||
.SH COMMANDS
|
||||
.TP
|
||||
\fB::http::config\fR ?\fIoptions\fR?
|
||||
@@ -325,9 +328,11 @@ otherwise complain about HTTP/1.1.
|
||||
\fB\-query\fR \fIquery\fR
|
||||
.
|
||||
This flag causes \fB::http::geturl\fR to do a POST request that passes the
|
||||
\fIquery\fR to the server. The \fIquery\fR must be an x-url-encoding
|
||||
formatted query. The \fB::http::formatQuery\fR procedure can be used to
|
||||
do the formatting.
|
||||
\fIquery\fR as payload verbatim to the server.
|
||||
The content format (and encoding) of \fIquery\fR is announced by the header
|
||||
field \fBcontent-type\fR set by the option \fB-type\fR.
|
||||
\fIquery\fR is an x-url-encoding formatted query, if used for html forms.
|
||||
The \fB::http::formatQuery\fR procedure can be used to do the formatting.
|
||||
.TP
|
||||
\fB\-queryblocksize\fR \fIsize\fR
|
||||
.
|
||||
@@ -551,6 +556,14 @@ is raised, but the status of the transaction will be \fBeof\fR.
|
||||
.
|
||||
The error message will also be stored in the \fBerror\fR status
|
||||
array element, accessible via \fB::http::error\fR.
|
||||
.TP
|
||||
\fBtimeout\fR
|
||||
.
|
||||
A timeout occurred before the transaction could complete
|
||||
.TP
|
||||
\fBreset\fR
|
||||
.
|
||||
user-reset
|
||||
.PP
|
||||
Another error possibility is that \fB::http::geturl\fR is unable to
|
||||
write all the post query data to the server before the server
|
||||
@@ -666,10 +679,9 @@ the post query data to the server.
|
||||
.TP
|
||||
\fBstatus\fR
|
||||
.
|
||||
Either \fBok\fR, for successful completion, \fBreset\fR for
|
||||
user-reset, \fBtimeout\fR if a timeout occurred before the transaction
|
||||
could complete, or \fBerror\fR for an error condition. During the
|
||||
transaction this value is the empty string.
|
||||
See description in the chapter \fBERRORS\fR above for a
|
||||
list and description of \fBstatus\fR.
|
||||
During the transaction this value is the empty string.
|
||||
.TP
|
||||
\fBtotalsize\fR
|
||||
.
|
||||
|
||||
+3
-2
@@ -89,9 +89,10 @@ Tcl tries to guess the name of the package.
|
||||
This may be done differently on different platforms.
|
||||
The default guess, which is used on most UNIX platforms, is to
|
||||
take the last element of \fIfileName\fR, strip off the first
|
||||
three characters if they are \fBlib\fR, and use any following
|
||||
three characters if they are \fBlib\fR, then strip off the next
|
||||
three characters if they are \fBtcl\fR, and use any following
|
||||
alphabetic and underline characters as the module name.
|
||||
For example, the command \fBload libxyz4.2.so\fR uses the module
|
||||
For example, the command \fBload libtclxyz4.2.so\fR uses the module
|
||||
name \fBxyz\fR and the command \fBload bin/last.so {}\fR uses the
|
||||
module name \fBlast\fR.
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1992-1999 by Karl Lehenbauer and Mark Diekhans
|
||||
'\" Copyright (c) 1992-1999 by Karl Lehenbauer & Mark Diekhans
|
||||
'\" Copyright (c) 2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
|
||||
+3
-3
@@ -293,12 +293,12 @@ treatment is as if the enclosing delimiters were
|
||||
.QW \fB[.\fR \&
|
||||
and
|
||||
.QW \fB.]\fR .)
|
||||
For example, if \fBo\fR and \fB\[^o]\fR are the members of an
|
||||
For example, if \fBo\fR and \fB\(^o\fR are the members of an
|
||||
equivalence class, then
|
||||
.QW \fB[[=o=]]\fR ,
|
||||
.QW \fB[[=\[^o]=]]\fR ,
|
||||
.QW \fB[[=\(^o=]]\fR ,
|
||||
and
|
||||
.QW \fB[o\[^o]]\fR \&
|
||||
.QW \fB[o\(^o]\fR \&
|
||||
are all synonymous. An equivalence class may not be an endpoint of a range.
|
||||
.RS
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
zipfs \- Mount and work with ZIP files within Tcl
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBpackage require zipfs \fR?\fB1.0\fR?
|
||||
\fBpackage require tcl::zipfs \fR?\fB1.0\fR?
|
||||
.sp
|
||||
\fBzipfs canonical\fR ?\fImntpnt\fR? \fIfilename\fR ?\fIZIPFS\fR?
|
||||
\fBzipfs exists\fR \fIfilename\fR
|
||||
|
||||
@@ -1175,6 +1175,7 @@ Tcl_CreateInterp(void)
|
||||
*/
|
||||
|
||||
Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs);
|
||||
Tcl_PkgProvideEx(interp, "tcl", TCL_PATCH_LEVEL, &tclStubs);
|
||||
|
||||
if (TclTommath_Init(interp) != TCL_OK) {
|
||||
Tcl_Panic("%s", TclGetString(Tcl_GetObjResult(interp)));
|
||||
|
||||
+12
-3
@@ -1518,7 +1518,8 @@ BinaryScanCmd(
|
||||
}
|
||||
switch (cmd) {
|
||||
case 'a':
|
||||
case 'A': {
|
||||
case 'A':
|
||||
case 'C': {
|
||||
unsigned char *src;
|
||||
|
||||
if (arg >= objc) {
|
||||
@@ -1540,10 +1541,18 @@ BinaryScanCmd(
|
||||
size = count;
|
||||
|
||||
/*
|
||||
* Trim trailing nulls and spaces, if necessary.
|
||||
* Apply C string semantics or trim trailing
|
||||
* nulls and spaces, if necessary.
|
||||
*/
|
||||
|
||||
if (cmd == 'A') {
|
||||
if (cmd == 'C') {
|
||||
for (i = 0; i < size; i++) {
|
||||
if (src[i] == '\0') {
|
||||
size = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (cmd == 'A') {
|
||||
while (size > 0) {
|
||||
if (src[size - 1] != '\0' && src[size - 1] != ' ') {
|
||||
break;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
* the time and date facilities of TclX, by Mark Diekhans and Karl
|
||||
* Lehenbauer.
|
||||
*
|
||||
* Copyright 1991-1995 Karl Lehenbauer and Mark Diekhans.
|
||||
* Copyright (c) 1991-1995 Karl Lehenbauer & Mark Diekhans.
|
||||
* Copyright (c) 1995 Sun Microsystems, Inc.
|
||||
* Copyright (c) 2004 by Kevin B. Kenny. All rights reserved.
|
||||
*
|
||||
|
||||
+19
-23
@@ -2500,8 +2500,8 @@ StringStartCmd(
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int ch;
|
||||
const char *p, *string;
|
||||
int cur, index, length, numChars;
|
||||
const Tcl_UniChar *p, *string;
|
||||
int cur, index, length;
|
||||
Tcl_Obj *obj;
|
||||
|
||||
if (objc != 3) {
|
||||
@@ -2509,32 +2509,30 @@ StringStartCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
string = TclGetStringFromObj(objv[1], &length);
|
||||
numChars = Tcl_NumUtfChars(string, length);
|
||||
if (TclGetIntForIndexM(interp, objv[2], numChars-1, &index) != TCL_OK) {
|
||||
string = Tcl_GetUnicodeFromObj(objv[1], &length);
|
||||
if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
string = TclGetStringFromObj(objv[1], &length);
|
||||
if (index >= numChars) {
|
||||
index = numChars - 1;
|
||||
if (index >= length) {
|
||||
index = length - 1;
|
||||
}
|
||||
cur = 0;
|
||||
if (index > 0) {
|
||||
p = Tcl_UtfAtIndex(string, index);
|
||||
p = &string[index];
|
||||
|
||||
TclUtfToUCS4(p, &ch);
|
||||
(void)TclUniCharToUCS4(p, &ch);
|
||||
for (cur = index; cur >= 0; cur--) {
|
||||
int delta = 0;
|
||||
const char *next;
|
||||
const Tcl_UniChar *next;
|
||||
|
||||
if (!Tcl_UniCharIsWordChar(ch)) {
|
||||
break;
|
||||
}
|
||||
|
||||
next = TclUtfPrev(p, string);
|
||||
next = TclUCS4Prev(p, string);
|
||||
do {
|
||||
next += delta;
|
||||
delta = TclUtfToUCS4(next, &ch);
|
||||
delta = TclUniCharToUCS4(next, &ch);
|
||||
} while (next + delta < p);
|
||||
p = next;
|
||||
}
|
||||
@@ -2572,8 +2570,8 @@ StringEndCmd(
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int ch;
|
||||
const char *p, *end, *string;
|
||||
int cur, index, length, numChars;
|
||||
const Tcl_UniChar *p, *end, *string;
|
||||
int cur, index, length;
|
||||
Tcl_Obj *obj;
|
||||
|
||||
if (objc != 3) {
|
||||
@@ -2581,20 +2579,18 @@ StringEndCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
string = TclGetStringFromObj(objv[1], &length);
|
||||
numChars = Tcl_NumUtfChars(string, length);
|
||||
if (TclGetIntForIndexM(interp, objv[2], numChars-1, &index) != TCL_OK) {
|
||||
string = Tcl_GetUnicodeFromObj(objv[1], &length);
|
||||
if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
string = TclGetStringFromObj(objv[1], &length);
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
if (index < numChars) {
|
||||
p = Tcl_UtfAtIndex(string, index);
|
||||
if (index < length) {
|
||||
p = &string[index];
|
||||
end = string+length;
|
||||
for (cur = index; p < end; cur++) {
|
||||
p += TclUtfToUCS4(p, &ch);
|
||||
p += TclUniCharToUCS4(p, &ch);
|
||||
if (!Tcl_UniCharIsWordChar(ch)) {
|
||||
break;
|
||||
}
|
||||
@@ -2603,7 +2599,7 @@ StringEndCmd(
|
||||
cur++;
|
||||
}
|
||||
} else {
|
||||
cur = numChars;
|
||||
cur = length;
|
||||
}
|
||||
TclNewIntObj(obj, cur);
|
||||
Tcl_SetObjResult(interp, obj);
|
||||
|
||||
@@ -1928,7 +1928,7 @@ ParseLexeme(
|
||||
{
|
||||
const char *end;
|
||||
int scanned, size;
|
||||
Tcl_UniChar ch = 0;
|
||||
int ch;
|
||||
Tcl_Obj *literal = NULL;
|
||||
unsigned char byte;
|
||||
|
||||
@@ -2145,14 +2145,14 @@ ParseLexeme(
|
||||
*/
|
||||
|
||||
if (!TclIsBareword(*start) || *start == '_') {
|
||||
if (Tcl_UtfCharComplete(start, numBytes)) {
|
||||
scanned = TclUtfToUniChar(start, &ch);
|
||||
if (TclUCS4Complete(start, numBytes)) {
|
||||
scanned = TclUtfToUCS4(start, &ch);
|
||||
} else {
|
||||
char utfBytes[4];
|
||||
char utfBytes[8];
|
||||
|
||||
memcpy(utfBytes, start, numBytes);
|
||||
utfBytes[numBytes] = '\0';
|
||||
scanned = TclUtfToUniChar(utfBytes, &ch);
|
||||
scanned = TclUtfToUCS4(utfBytes, &ch);
|
||||
}
|
||||
*lexemePtr = INVALID;
|
||||
Tcl_DecrRefCount(literal);
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@
|
||||
* This file is generated from a yacc grammar defined in the file
|
||||
* tclGetDate.y. It should not be edited directly.
|
||||
*
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
|
||||
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* only used when doing free-form date parsing, an ill-defined process
|
||||
* anyway.
|
||||
*
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
|
||||
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
@@ -27,7 +27,7 @@
|
||||
* This file is generated from a yacc grammar defined in the file
|
||||
* tclGetDate.y. It should not be edited directly.
|
||||
*
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
|
||||
* Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
|
||||
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
|
||||
+4
-2
@@ -3252,12 +3252,14 @@ MODULE_SCOPE int TclUtfCount(int ch);
|
||||
#if TCL_UTF_MAX > 3
|
||||
# define TclUtfToUCS4 Tcl_UtfToUniChar
|
||||
# define TclUniCharToUCS4(src, ptr) (*ptr = *(src),1)
|
||||
# define TclUCS4Prev(src, ptr) (((src) > (ptr)) ? ((src) - 1) : (src))
|
||||
# define TclUCS4Complete Tcl_UtfCharComplete
|
||||
# define TclChar16Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
|
||||
? ((length) >= 3) : Tcl_UtfCharComplete((src), (length)))
|
||||
#else
|
||||
MODULE_SCOPE int TclUtfToUCS4(const char *src, int *ucs4Ptr);
|
||||
MODULE_SCOPE int TclUniCharToUCS4(const Tcl_UniChar *src, int *ucs4Ptr);
|
||||
MODULE_SCOPE int TclUtfToUCS4(const char *, int *);
|
||||
MODULE_SCOPE int TclUniCharToUCS4(const Tcl_UniChar *, int *);
|
||||
MODULE_SCOPE const Tcl_UniChar *TclUCS4Prev(const Tcl_UniChar *, const Tcl_UniChar *);
|
||||
# define TclUCS4Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
|
||||
? ((length) >= 4) : Tcl_UtfCharComplete((src), (length)))
|
||||
# define TclChar16Complete Tcl_UtfCharComplete
|
||||
|
||||
@@ -331,6 +331,10 @@ Tcl_LoadObjCmd(
|
||||
pkgGuess += 3;
|
||||
}
|
||||
#endif /* __CYGWIN__ */
|
||||
if ((pkgGuess[0] == 't') && (pkgGuess[1] == 'c')
|
||||
&& (pkgGuess[2] == 'l')) {
|
||||
pkgGuess += 3;
|
||||
}
|
||||
for (p = pkgGuess; *p != 0; p += offset) {
|
||||
offset = TclUtfToUniChar(p, &ch);
|
||||
if ((ch > 0x100)
|
||||
|
||||
+8
-1
@@ -138,7 +138,10 @@ static const Tcl_MethodType classConstructor = {
|
||||
*/
|
||||
|
||||
static const char *initScript =
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
"package ifneeded TclOO " TCLOO_PATCHLEVEL " {# Already present, OK?};"
|
||||
#endif
|
||||
"package ifneeded tcl::oo " TCLOO_PATCHLEVEL " {# Already present, OK?};"
|
||||
"namespace eval ::oo { variable version " TCLOO_VERSION " };"
|
||||
"namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };";
|
||||
/* "tcl_findLibrary tcloo $oo::version $oo::version" */
|
||||
@@ -257,7 +260,11 @@ TclOOInit(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_PATCHLEVEL,
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
Tcl_PkgProvideEx(interp, "TclOO", TCLOO_PATCHLEVEL,
|
||||
(void *) &tclOOStubs);
|
||||
#endif
|
||||
return Tcl_PkgProvideEx(interp, "tcl::oo", TCLOO_PATCHLEVEL,
|
||||
(void *) &tclOOStubs);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,14 +35,19 @@ TclOOInitializeStubs(
|
||||
const char *version)
|
||||
{
|
||||
int exact = 0;
|
||||
const char *packageName = "TclOO";
|
||||
const char *packageName = "tcl::oo";
|
||||
const char *errMsg = NULL;
|
||||
TclOOStubs *stubsPtr = NULL;
|
||||
const char *actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp,
|
||||
packageName, version, exact, &stubsPtr);
|
||||
|
||||
if (actualVersion == NULL) {
|
||||
return NULL;
|
||||
packageName = "TclOO";
|
||||
actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp,
|
||||
packageName, version, exact, &stubsPtr);
|
||||
if (actualVersion == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (stubsPtr == NULL) {
|
||||
errMsg = "missing stub table pointer";
|
||||
|
||||
+5
-5
@@ -789,7 +789,7 @@ TclParseBackslash(
|
||||
* written. At most 4 bytes will be written there. */
|
||||
{
|
||||
const char *p = src+1;
|
||||
Tcl_UniChar unichar = 0;
|
||||
int unichar;
|
||||
int result;
|
||||
int count;
|
||||
char buf[4] = "";
|
||||
@@ -935,14 +935,14 @@ TclParseBackslash(
|
||||
* #217987] test subst-3.2
|
||||
*/
|
||||
|
||||
if (Tcl_UtfCharComplete(p, numBytes - 1)) {
|
||||
count = TclUtfToUniChar(p, &unichar) + 1; /* +1 for '\' */
|
||||
if (TclUCS4Complete(p, numBytes - 1)) {
|
||||
count = TclUtfToUCS4(p, &unichar) + 1; /* +1 for '\' */
|
||||
} else {
|
||||
char utfBytes[4];
|
||||
char utfBytes[8];
|
||||
|
||||
memcpy(utfBytes, p, numBytes - 1);
|
||||
utfBytes[numBytes - 1] = '\0';
|
||||
count = TclUtfToUniChar(utfBytes, &unichar) + 1;
|
||||
count = TclUtfToUCS4(utfBytes, &unichar) + 1;
|
||||
}
|
||||
result = unichar;
|
||||
break;
|
||||
|
||||
+5
-3
@@ -460,7 +460,7 @@ Tcltest_Init(
|
||||
}
|
||||
/* TIP #268: Full patchlevel instead of just major.minor */
|
||||
|
||||
if (Tcl_PkgProvideEx(interp, "Tcltest", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
|
||||
if (Tcl_PkgProvideEx(interp, "tcl::test", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -6914,8 +6914,10 @@ TestUtfNextCmd(
|
||||
/* Run Tcl_UtfNext with many more possible bytes at src[end], all should give the same result */
|
||||
result = Tcl_UtfNext(buffer + 1);
|
||||
if (first != result) {
|
||||
first = buffer;
|
||||
break;
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"Tcl_UtfNext is not supposed to read src[end]\n"
|
||||
"Different result when src[end] is %#x", UCHAR(p[-1])));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* name and version of this package
|
||||
*/
|
||||
|
||||
static const char packageName[] = "procbodytest";
|
||||
static const char packageName[] = "tcl::procbodytest";
|
||||
static const char packageVersion[] = "1.1";
|
||||
|
||||
/*
|
||||
@@ -75,7 +75,7 @@ static const CmdTable safeCommands[] = {
|
||||
*
|
||||
* Procbodytest_Init --
|
||||
*
|
||||
* This function initializes the "procbodytest" package.
|
||||
* This function initializes the "tcl::procbodytest" package.
|
||||
*
|
||||
* Results:
|
||||
* A standard Tcl result.
|
||||
@@ -99,7 +99,7 @@ Procbodytest_Init(
|
||||
*
|
||||
* Procbodytest_SafeInit --
|
||||
*
|
||||
* This function initializes the "procbodytest" package.
|
||||
* This function initializes the "tcl::procbodytest" package.
|
||||
*
|
||||
* Results:
|
||||
* A standard Tcl result.
|
||||
@@ -315,7 +315,7 @@ ProcBodyTestProcObjCmd(
|
||||
* procbodytest::check
|
||||
*
|
||||
* Performs an internal check that the Tcl_PkgPresent() command returns
|
||||
* the same version number as was registered when the procbodytest package
|
||||
* the same version number as was registered when the tcl::procbodytest package
|
||||
* was provided. Places a boolean in the interp result indicating the
|
||||
* test outcome.
|
||||
*
|
||||
|
||||
+14
-1
@@ -2629,12 +2629,25 @@ TclUniCharToUCS4(
|
||||
* by the Tcl_UniChar string. */
|
||||
{
|
||||
if (((src[0] & 0xFC00) == 0xD800) && ((src[1] & 0xFC00) == 0xDC00)) {
|
||||
*ucs4Ptr = (((src[0] & 0x3FF) << 10) | (src[01] & 0x3FF)) + 0x10000;
|
||||
*ucs4Ptr = (((src[0] & 0x3FF) << 10) | (src[1] & 0x3FF)) + 0x10000;
|
||||
return 2;
|
||||
}
|
||||
*ucs4Ptr = src[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
const Tcl_UniChar *TclUCS4Prev(const Tcl_UniChar *src, const Tcl_UniChar *ptr) {
|
||||
if (src <= ptr + 1) {
|
||||
return ptr;
|
||||
}
|
||||
if (((src[-1] & 0xFC00) == 0xDC00) && ((src[-2] & 0xFC00) == 0xD800)) {
|
||||
return src - 2;
|
||||
}
|
||||
return src - 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -4771,7 +4771,7 @@ TclZipfs_Init(
|
||||
Tcl_NewStringObj("::tcl::zipfs::find", -1));
|
||||
Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
|
||||
ZipFSTclLibraryObjCmd, NULL, NULL);
|
||||
Tcl_PkgProvide(interp, "zipfs", "2.0");
|
||||
Tcl_PkgProvide(interp, "tcl::zipfs", "2.0");
|
||||
}
|
||||
return TCL_OK;
|
||||
#else /* !HAVE_ZLIB */
|
||||
|
||||
+4
-1
@@ -3957,7 +3957,10 @@ TclZlibInit(
|
||||
* Formally provide the package as a Tcl built-in.
|
||||
*/
|
||||
|
||||
return Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION);
|
||||
#endif
|
||||
return Tcl_PkgProvide(interp, "tcl::zlib", TCL_ZLIB_VERSION);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.5-]} return
|
||||
if {[info sharedlibextension] != ".dll"} return
|
||||
package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll] Dde]
|
||||
package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll]]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.5-]} return
|
||||
if {[info sharedlibextension] != ".dll"} return
|
||||
package ifneeded registry 1.3.5 \
|
||||
[list load [file join $dir tclreg13.dll] Registry]
|
||||
[list load [file join $dir tclregistry13.dll]]
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testgetassocdata [llength [info commands testgetassocdata]]
|
||||
testConstraint testsetassocdata [llength [info commands testsetassocdata]]
|
||||
|
||||
+2
-2
@@ -17,10 +17,10 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testasync [llength [info commands testasync]]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
|
||||
|
||||
proc async1 {result code} {
|
||||
global aresult acode
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testevalex [llength [info commands testevalex]]
|
||||
testConstraint testcmdtoken [llength [info commands testcmdtoken]]
|
||||
|
||||
+10
-1
@@ -759,7 +759,16 @@ test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
|
||||
} -body {
|
||||
list [binary scan "abc def \x00ghi " A* arg1] $arg1
|
||||
} -result [list 1 "abc def \x00ghi"]
|
||||
|
||||
test binary-21.13 {Tcl_BinaryObjCmd: scan} -setup {
|
||||
unset -nocomplain arg1
|
||||
} -body {
|
||||
list [binary scan "abc def \x00 " C* arg1] $arg1
|
||||
} -result {1 {abc def }}
|
||||
test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
|
||||
unset -nocomplain arg1
|
||||
} -body {
|
||||
list [binary scan "abc def \x00ghi" C* arg1] $arg1
|
||||
} -result {1 {abc def }}
|
||||
test binary-22.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body {
|
||||
binary scan abc b
|
||||
} -result {not enough arguments for all format specifiers}
|
||||
|
||||
+6
-5
@@ -36,8 +36,8 @@ namespace eval ::tcl::test::io {
|
||||
|
||||
catch {
|
||||
::tcltest::loadTestedCommands
|
||||
package require -exact Tcltest [info patchlevel]
|
||||
set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
|
||||
package require -exact tcl::test [info patchlevel]
|
||||
set ::tcltestlib [info loaded {} Tcltest]
|
||||
}
|
||||
package require tcltests
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace eval ::tcl::test::io {
|
||||
testConstraint testchannelevent [llength [info commands testchannelevent]]
|
||||
testConstraint testmainthread [llength [info commands testmainthread]]
|
||||
testConstraint testservicemode [llength [info commands testservicemode]]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notWinCI [expr {
|
||||
$::tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
|
||||
testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}]
|
||||
|
||||
# You need a *very* special environment to do some tests. In particular,
|
||||
@@ -1886,7 +1887,7 @@ test chan-io-20.3 {Tcl_CreateChannel: initial settings} -constraints {unix} -bod
|
||||
} -result {{{} {}} {auto lf}}
|
||||
test chan-io-20.5 {Tcl_CreateChannel: install channel in empty slot} -setup {
|
||||
set path(stdout) [makeFile {} stdout]
|
||||
} -constraints {stdio knownMsvcBug} -body {
|
||||
} -constraints {stdio notWinCI} -body {
|
||||
set f [open $path(script) w]
|
||||
chan puts -nonewline $f {
|
||||
chan close stdout
|
||||
@@ -2796,7 +2797,7 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} -s
|
||||
chan puts $s $l
|
||||
}
|
||||
}
|
||||
} -constraints {socket tempNotMac fileevent knownMsvcBug} -body {
|
||||
} -constraints {socket tempNotMac fileevent notWinCI} -body {
|
||||
proc accept {s a p} {
|
||||
variable x
|
||||
chan event $s readable [namespace code [list readit $s]]
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testchmod [llength [info commands testchmod]]
|
||||
testConstraint testsetplatform [llength [info commands testsetplatform]]
|
||||
@@ -30,7 +30,7 @@ testConstraint linkDirectory [expr {
|
||||
($::tcl_platform(osVersion) >= 5.0
|
||||
&& [lindex [file system [temporaryDirectory]] 1] eq "NTFS")
|
||||
}]
|
||||
testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
|
||||
|
||||
global env
|
||||
set cmdAHwd [pwd]
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Used for constraining memory leak tests
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testcmdinfo [llength [info commands testcmdinfo]]
|
||||
testConstraint testcmdtoken [llength [info commands testcmdtoken]]
|
||||
|
||||
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Big test for correct ordering of data in [expr]
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Constrain memory leak tests
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint exec [llength [info commands exec]]
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testnrelevels [llength [info commands testnrelevels]]
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testdcall [llength [info commands testdcall]]
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testdstring [llength [info commands testdstring]]
|
||||
if {[testConstraint testdstring]} {
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace eval ::tcl::test::encoding {
|
||||
|
||||
catch {
|
||||
::tcltest::loadTestedCommands
|
||||
package require -exact Tcltest [info patchlevel]
|
||||
package require -exact tcl::test [info patchlevel]
|
||||
}
|
||||
|
||||
proc toutf {args} {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
package require tcltests
|
||||
|
||||
# [exec] is required here to see the actual environment received by child
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ namespace import -force ::tcltest::*
|
||||
|
||||
catch {
|
||||
::tcltest::loadTestedCommands
|
||||
package require -exact Tcltest [info patchlevel]
|
||||
set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
|
||||
package require -exact tcl::test [info patchlevel]
|
||||
set ::tcltestlib [info loaded {} Tcltest]
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-3
@@ -20,13 +20,14 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
package require tcltests
|
||||
|
||||
# All tests require the "exec" command.
|
||||
# Skip them if exec is not defined.
|
||||
testConstraint exec [llength [info commands exec]]
|
||||
testConstraint noosx [expr {![info exists ::env(TRAVIS_OSX_IMAGE)] || ![string match xcode* $::env(TRAVIS_OSX_IMAGE)]}]
|
||||
# Some skips when running in a macOS CI environment
|
||||
testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}]
|
||||
|
||||
unset -nocomplain path
|
||||
|
||||
@@ -673,7 +674,9 @@ test exec-18.2 {exec cat deals with weird file names} -body {
|
||||
# Note that this test cannot be adapted to work on Windows; that platform has
|
||||
# no kernel support for an analog of O_APPEND. OTOH, that means we can assume
|
||||
# that there is a POSIX shell...
|
||||
test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosx} -setup {
|
||||
#
|
||||
# This test also fails in some cases when building with macOS
|
||||
test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosxCI} -setup {
|
||||
set tmpfile [makeFile {0} tmpfile.exec-19.1]
|
||||
} -body {
|
||||
# Note that we have to allow for the current contents of the temporary
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
catch {namespace delete {*}[namespace children :: test_ns_*]}
|
||||
catch {rename foo ""}
|
||||
@@ -985,7 +985,7 @@ test execute-8.6 {Compile epoch bump in global level (bug [fa6bf38d07])} -setup
|
||||
interp create child
|
||||
child eval {
|
||||
package require tcltest 2.5
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
::tcltest::loadTestedCommands
|
||||
if {[namespace which -command testbumpinterpepoch] eq ""} {
|
||||
proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set }
|
||||
@@ -1018,7 +1018,7 @@ test execute-8.7 {Compile epoch bump in global level (bug [fa6bf38d07]), excepti
|
||||
interp create child
|
||||
child eval {
|
||||
package require tcltest 2.5
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
::tcltest::loadTestedCommands
|
||||
if {[namespace which -command testbumpinterpepoch] eq ""} {
|
||||
proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set }
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testexprlong [llength [info commands testexprlong]]
|
||||
testConstraint testexprdouble [llength [info commands testexprdouble]]
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Determine if "long int" type is a 32 bit number and if the wide
|
||||
# type is a 64 bit number on this machine.
|
||||
|
||||
+6
-3
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
cd [temporaryDirectory]
|
||||
|
||||
@@ -41,7 +41,7 @@ if {[testConstraint win]} {
|
||||
testConstraint reg 1
|
||||
}
|
||||
}
|
||||
testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notCI [expr {![info exists ::env(CI)] || !$::env(CI)}]
|
||||
|
||||
set tmpspace /tmp;# default value
|
||||
# Find a group that exists on this Unix system, or else skip tests that
|
||||
@@ -79,6 +79,7 @@ testConstraint darwin9 [expr {
|
||||
&& [package vsatisfies 1.$::tcl_platform(osVersion) 1.9]
|
||||
}]
|
||||
testConstraint notDarwin9 [expr {![testConstraint darwin9]}]
|
||||
testConstraint notContinuousIntegration [expr {![info exists ::env(CI)]}]
|
||||
|
||||
testConstraint fileSharing 0
|
||||
testConstraint notFileSharing 1
|
||||
@@ -2581,7 +2582,9 @@ test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win notWine} -body
|
||||
&& [file exists $env(USERPROFILE)/NTUSER.DAT]
|
||||
&& [file readable $env(USERPROFILE)/NTUSER.DAT]}
|
||||
} -result {1}
|
||||
test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win notWine} -body {
|
||||
# At least one CI environment (GitHub Actions) is set up with the page file in
|
||||
# an unusual location; skip the test if that is so.
|
||||
test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win notCI} -body {
|
||||
set r {}
|
||||
if {[info exists env(SystemDrive)]} {
|
||||
set path $env(SystemDrive)/pagefile.sys
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testsetplatform [llength [info commands testsetplatform]]
|
||||
testConstraint testtranslatefilename [llength [info commands testtranslatefilename]]
|
||||
@@ -31,7 +31,7 @@ if {[testConstraint win]} {
|
||||
testConstraint symbolicLinkFile 0
|
||||
testConstraint sharedCdrive [expr {![catch {cd //[info hostname]/c}]}]
|
||||
}
|
||||
testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
|
||||
# This match compares the first two words of the result. If the wanted result
|
||||
# is "equal", then this is successful if the words are equal. If the wanted
|
||||
# result is "not equal", then this is successful if the words are different.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace eval ::tcl::test::fileSystem {
|
||||
testConstraint loaddll 0
|
||||
catch {
|
||||
::tcltest::loadTestedCommands
|
||||
package require -exact Tcltest [info patchlevel]
|
||||
package require -exact tcl::test [info patchlevel]
|
||||
set ::ddever [package require dde]
|
||||
set ::ddelib [lindex [package ifneeded dde $::ddever] 1]
|
||||
set ::regver [package require registry]
|
||||
@@ -33,11 +33,13 @@ catch {
|
||||
testConstraint loaddll 1
|
||||
}
|
||||
|
||||
# Test for commands defined in Tcltest executable
|
||||
# Test for commands defined in tcl::test package
|
||||
testConstraint testfilesystem [llength [info commands ::testfilesystem]]
|
||||
testConstraint testsetplatform [llength [info commands ::testsetplatform]]
|
||||
testConstraint testsimplefilesystem [llength [info commands ::testsimplefilesystem]]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
# Some things fail under all Continuous Integration systems for subtle reasons
|
||||
# such as CI often running with elevated privileges in a container.
|
||||
testConstraint notInCIenv [expr {![info exists ::env(CI)]}]
|
||||
|
||||
cd [tcltest::temporaryDirectory]
|
||||
makeFile "test file" gorp.file
|
||||
@@ -316,7 +318,7 @@ test filesystem-1.37 {file normalisation with '/./'} -body {
|
||||
} -match regexp -result {^(?:[^/]|/(?:[^/]|$))+$}
|
||||
test filesystem-1.38 {file normalisation with volume relative} -setup {
|
||||
set dir [pwd]
|
||||
} -constraints {win moreThanOneDrive knownMsvcBug} -body {
|
||||
} -constraints {win moreThanOneDrive notInCIenv} -body {
|
||||
set path "[string range [lindex $drives 0] 0 1]foo"
|
||||
cd [lindex $drives 1]
|
||||
file norm $path
|
||||
@@ -565,7 +567,7 @@ test filesystem-7.1.1 {load from vfs} -setup {
|
||||
cd [file dirname $::ddelib]
|
||||
testsimplefilesystem 1
|
||||
# This loads dde via a complex copy-to-temp operation
|
||||
load simplefs:/[file tail $::ddelib] dde
|
||||
load simplefs:/[file tail $::ddelib] Dde
|
||||
testsimplefilesystem 0
|
||||
return ok
|
||||
# The real result of this test is what happens when Tcl exits.
|
||||
|
||||
+4
-1
@@ -20,7 +20,10 @@ testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
|
||||
testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}]
|
||||
testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
|
||||
testConstraint pointerIs64bit [expr {$tcl_platform(pointerSize) >= 8}]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
# MSVC uses a broken libc that gets sprintf("%g") wrong. This is a pain
|
||||
# particularly in Continuous Integration, and there isn't anything much we can
|
||||
# do about it.
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
|
||||
|
||||
test format-1.1 {integer formatting} {
|
||||
format "%*d %d %d %d" 6 34 16923 -12 -1
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testgetint [llength [info commands testgetint]]
|
||||
testConstraint testdoubleobj [llength [info commands testdoubleobj]]
|
||||
|
||||
@@ -16,11 +16,8 @@ if {"::tcltest" ni [namespace children]} {
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
|
||||
testConstraint notOSXtravis [apply {{} {
|
||||
upvar 1 env(TRAVIS_OSX_IMAGE) travis
|
||||
return [expr {![info exists travis] || ![string match xcode* $travis]}]
|
||||
}}]
|
||||
testConstraint sqlite3 [expr {[testConstraint notOSXtravis] && ![catch {
|
||||
testConstraint notMacCI [expr {![info exists ::env(MAC_CI)]}]
|
||||
testConstraint sqlite3 [expr {[testConstraint notMacCI] && ![catch {
|
||||
package require sqlite3
|
||||
}]}]
|
||||
testConstraint cookiejar [expr {[testConstraint sqlite3] && ![catch {
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testindexobj [llength [info commands testindexobj]]
|
||||
testConstraint testparseargs [llength [info commands testparseargs]]
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ if {{::tcltest} ni [namespace children]} {
|
||||
namespace import -force ::tcltest::*
|
||||
}
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
testConstraint zlib [llength [info commands zlib]]
|
||||
|
||||
# Set up namespaces needed to test operation of "info args", "info body",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testinterpdelete [llength [info commands testinterpdelete]]
|
||||
|
||||
|
||||
+9
-6
@@ -31,8 +31,8 @@ namespace eval ::tcl::test::io {
|
||||
|
||||
catch {
|
||||
::tcltest::loadTestedCommands
|
||||
package require -exact Tcltest [info patchlevel]
|
||||
set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
|
||||
package require -exact tcl::test [info patchlevel]
|
||||
set ::tcltestlib [info loaded {} Tcltest]
|
||||
}
|
||||
package require tcltests
|
||||
|
||||
@@ -43,7 +43,10 @@ testConstraint testchannelevent [llength [info commands testchannelevent]]
|
||||
testConstraint testmainthread [llength [info commands testmainthread]]
|
||||
testConstraint testobj [llength [info commands testobj]]
|
||||
testConstraint testservicemode [llength [info commands testservicemode]]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
# Some things fail under Windows in Continuous Integration systems for subtle
|
||||
# reasons such as CI often running with elevated privileges in a container.
|
||||
testConstraint notWinCI [expr {
|
||||
$::tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
|
||||
testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}]
|
||||
|
||||
# You need a *very* special environment to do some tests. In
|
||||
@@ -2230,7 +2233,7 @@ test io-27.5 {FlushChannel, implicit flush when buffer fills and on close} \
|
||||
set path(pipe) [makeFile {} pipe]
|
||||
set path(output) [makeFile {} output]
|
||||
test io-27.6 {FlushChannel, async flushing, async close} \
|
||||
{stdio asyncPipeClose knownMsvcBug} {
|
||||
{stdio asyncPipeClose notWinCI} {
|
||||
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
|
||||
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
|
||||
file delete $path(pipe)
|
||||
@@ -2834,7 +2837,7 @@ test io-29.31 {Tcl_WriteChars, background flush} stdio {
|
||||
set result
|
||||
} ok
|
||||
test io-29.32 {Tcl_WriteChars, background flush to slow reader} \
|
||||
{stdio asyncPipeClose knownMsvcBug} {
|
||||
{stdio asyncPipeClose notWinCI} {
|
||||
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
|
||||
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
|
||||
file delete $path(pipe)
|
||||
@@ -8132,7 +8135,7 @@ test io-53.17 {[7c187a3773] MBWrite: proper inQueueTail handling} -setup {
|
||||
removeFile out
|
||||
} -result {line 100 line}
|
||||
|
||||
test io-54.1 {Recursive channel events} {socket fileevent knownMsvcBug} {
|
||||
test io-54.1 {Recursive channel events} {socket fileevent notWinCI} {
|
||||
# This test checks to see if file events are delivered during recursive
|
||||
# event loops when there is buffered data on the channel.
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
package require tcltests
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Custom constraints used in this file
|
||||
testConstraint testchannel [llength [info commands testchannel]]
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
namespace eval ::tcl::test::iogt {
|
||||
namespace import ::tcltest::*
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
set minus -
|
||||
testConstraint testevalex [llength [info commands testevalex]]
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testlink [llength [info commands testlink]]
|
||||
testConstraint testlinkarray [llength [info commands testlinkarray]]
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testobj [llength [info commands testobj]]
|
||||
|
||||
|
||||
+14
-14
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Figure out what extension is used for shared libraries on this
|
||||
# platform.
|
||||
@@ -78,7 +78,7 @@ test load-2.1 {basic loading, with guess for package name} \
|
||||
interp create -safe child
|
||||
test load-2.2 {loading into a safe interpreter, with package name conversion} \
|
||||
[list $dll $loaded] {
|
||||
load -lazy [file join $testDir pkgb$ext] pKgB child
|
||||
load -lazy [file join $testDir pkgb$ext] Pkgb child
|
||||
list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \
|
||||
[catch {pkgb_sub 12 10} msg2] $msg2
|
||||
} {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}}
|
||||
@@ -125,17 +125,17 @@ test load-4.1 {reloading package into same interpreter} [list $dll $loaded] {
|
||||
list [catch {load [file join $testDir pkga$ext] pkga} msg] $msg
|
||||
} {0 {}}
|
||||
test load-4.2 {reloading package into same interpreter} -setup {
|
||||
catch {load [file join $testDir pkga$ext] pkga}
|
||||
catch {load [file join $testDir pkga$ext] Pkga}
|
||||
} -constraints [list $dll $loaded] -returnCodes error -body {
|
||||
load [file join $testDir pkga$ext] pkgb
|
||||
load [file join $testDir pkga$ext] Pkgb
|
||||
} -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"Pkga\""
|
||||
|
||||
test load-5.1 {file name not specified and no static package: pick default} -setup {
|
||||
catch {interp delete x}
|
||||
interp create x
|
||||
} -constraints [list $dll $loaded] -body {
|
||||
load -global [file join $testDir pkga$ext] pkga
|
||||
load {} pkga x
|
||||
load -global [file join $testDir pkga$ext] Pkga
|
||||
load {} Pkga x
|
||||
info loaded x
|
||||
} -cleanup {
|
||||
interp delete x
|
||||
@@ -153,8 +153,8 @@ test load-6.1 {errors loading file} [list $dll $loaded] {
|
||||
test load-7.1 {Tcl_StaticPackage procedure} [list teststaticpkg] {
|
||||
set x "not loaded"
|
||||
teststaticpkg Test 1 0
|
||||
load {} Test
|
||||
load {} Test child
|
||||
load {} test
|
||||
load {} test child
|
||||
list [set x] [child eval set x]
|
||||
} {loaded loaded}
|
||||
test load-7.2 {Tcl_StaticPackage procedure} [list teststaticpkg] {
|
||||
@@ -168,12 +168,12 @@ test load-7.2 {Tcl_StaticPackage procedure} [list teststaticpkg] {
|
||||
test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] {
|
||||
set x "not loaded"
|
||||
teststaticpkg More 0 1
|
||||
load {} More
|
||||
load {} more
|
||||
set x
|
||||
} {not loaded}
|
||||
catch {load [file join $testDir pkga$ext] pkga}
|
||||
catch {load [file join $testDir pkgb$ext] pkgb}
|
||||
catch {load [file join $testDir pkge$ext] pkge}
|
||||
catch {load [file join $testDir pkga$ext] Pkga}
|
||||
catch {load [file join $testDir pkgb$ext] Pkgb}
|
||||
catch {load [file join $testDir pkge$ext] Pkge}
|
||||
set currentRealPackages [list [list [file join $testDir pkge$ext] Pkge] [list [file join $testDir pkgb$ext] Pkgb] [list [file join $testDir pkga$ext] Pkga]]
|
||||
test load-7.4 {Tcl_StaticPackage procedure, redundant calls} -setup {
|
||||
teststaticpkg Test 1 0
|
||||
@@ -209,7 +209,7 @@ test load-8.3b {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $lo
|
||||
lsort -index 1 [info loaded child]
|
||||
} [lsort -index 1 [list {{} Test} [list [file join $testDir pkgb$ext] Pkgb]]]
|
||||
test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] {
|
||||
load [file join $testDir pkgb$ext] pkgb
|
||||
load [file join $testDir pkgb$ext] Pkgb
|
||||
list [lsort -index 1 [info loaded {}]] [lsort [info commands pkgb_*]]
|
||||
} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] Pkgb] {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}]
|
||||
interp delete child
|
||||
@@ -234,7 +234,7 @@ test load-10.1 {load from vfs} -setup {
|
||||
cd $testDir
|
||||
testsimplefilesystem 1
|
||||
} -constraints [list $dll $loaded testsimplefilesystem] -body {
|
||||
list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg
|
||||
list [catch {load simplefs:/pkgd$ext PKGD} msg] $msg
|
||||
} -result {0 {}} -cleanup {
|
||||
testsimplefilesystem 0
|
||||
cd $dir
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testpurebytesobj [llength [info commands testpurebytesobj]]
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
proc failTrace {name1 name2 op} {
|
||||
error "trace failed"
|
||||
|
||||
+40
-42
@@ -11,12 +11,10 @@ namespace eval ::tcl::test::main {
|
||||
# Is [exec] defined?
|
||||
testConstraint exec [llength [info commands exec]]
|
||||
|
||||
# Is the Tcltest package loaded?
|
||||
# - that is, the special C-coded testing commands in tclTest.c
|
||||
# - tests use testing commands introduced in Tcltest 8.4
|
||||
testConstraint Tcltest [expr {
|
||||
[llength [package provide Tcltest]]
|
||||
&& [package vsatisfies [package provide Tcltest] 8.5-]}]
|
||||
# Is the tcl::test package loaded?
|
||||
testConstraint tcl::test [expr {
|
||||
[llength [package provide tcl::test]]
|
||||
&& [package vsatisfies [package provide tcl::test] 8.5-]}]
|
||||
|
||||
# Procedure to simulate interactive typing of commands, line by line
|
||||
proc type {chan script} {
|
||||
@@ -192,7 +190,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-2.1 {
|
||||
Tcl_Main: appInitProc returns error
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {puts "In script"} script
|
||||
} -body {
|
||||
@@ -208,7 +206,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-2.2 {
|
||||
Tcl_Main: appInitProc returns error
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {puts "In script"} -appinitprocerror >& result
|
||||
set f [open result]
|
||||
@@ -221,7 +219,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-2.3 {
|
||||
Tcl_Main: appInitProc deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {puts "In script"} script
|
||||
} -body {
|
||||
@@ -237,7 +235,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-2.4 {
|
||||
Tcl_Main: appInitProc deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {puts "In script"} \
|
||||
-appinitprocdeleteinterp >& result
|
||||
@@ -251,7 +249,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-2.5 {
|
||||
Tcl_Main: appInitProc closes stderr
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {puts "In script"} \
|
||||
-appinitprocclosestderr >& result
|
||||
@@ -336,7 +334,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-3.5 {
|
||||
Tcl_Main: startup script sets main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {
|
||||
rename exit _exit
|
||||
@@ -364,7 +362,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-3.6 {
|
||||
Tcl_Main: startup script sets main loop and closes stdin
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {
|
||||
close stdin
|
||||
@@ -393,7 +391,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-3.7 {
|
||||
Tcl_Main: startup script deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {
|
||||
rename exit _exit
|
||||
@@ -417,7 +415,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-3.8 {
|
||||
Tcl_Main: startup script deletes interp and sets mainloop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
makeFile {
|
||||
testsetmainloop
|
||||
@@ -461,7 +459,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-4.1 {
|
||||
Tcl_Main: rcFile evaluation deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
set rc [makeFile {testinterpdelete {}} rc]
|
||||
} -body {
|
||||
@@ -478,7 +476,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-4.2 {
|
||||
Tcl_Main: rcFile evaluation closes stdin
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
set rc [makeFile {close stdin} rc]
|
||||
} -body {
|
||||
@@ -495,7 +493,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-4.3 {
|
||||
Tcl_Main: rcFile evaluation closes stdin and sets main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
set rc [makeFile {
|
||||
close stdin
|
||||
@@ -523,7 +521,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-4.4 {
|
||||
Tcl_Main: rcFile evaluation sets main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
set rc [makeFile {
|
||||
testsetmainloop
|
||||
@@ -550,7 +548,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-4.5 {
|
||||
Tcl_Main: Bug 1481986
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
set rc [makeFile {
|
||||
testsetmainloop
|
||||
@@ -698,7 +696,7 @@ namespace eval ::tcl::test::main {
|
||||
Tcl_Main: interactive mode: close stdin
|
||||
-> main loop & [exit] & exit handlers
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
rename exit _exit
|
||||
@@ -722,7 +720,7 @@ namespace eval ::tcl::test::main {
|
||||
Tcl_Main: interactive mode: delete interp
|
||||
-> main loop & exit handlers, but no [exit]
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
rename exit _exit
|
||||
@@ -745,7 +743,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-5.10 {
|
||||
Tcl_Main: exit main loop in mid-interactive command
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -setup {
|
||||
catch {set f [open "|[list [interpreter]]" w+]}
|
||||
catch {chan configure $f -blocking 0}
|
||||
@@ -766,7 +764,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-5.11 {
|
||||
Tcl_Main: EOF in interactive main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
rename exit _exit
|
||||
@@ -788,7 +786,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-5.12 {
|
||||
Tcl_Main: close stdin in interactive main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
rename exit _exit
|
||||
@@ -841,7 +839,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-6.2 {
|
||||
Tcl_Main: prompt deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
set tcl_prompt1 {testinterpdelete {}}
|
||||
@@ -893,7 +891,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-6.5 {
|
||||
Tcl_Main: interactive entry to main loop
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
set tcl_interactive 1
|
||||
@@ -943,7 +941,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-7.1 {
|
||||
Tcl_Main: [exit] defined as no-op -> still have exithandlers
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
proc exit args {}
|
||||
@@ -959,7 +957,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-7.2 {
|
||||
Tcl_Main: [exit] defined as no-op -> still have exithandlers
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
proc exit args {}
|
||||
@@ -979,7 +977,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.1 {
|
||||
StdinProc: handles non-blocking stdin
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -996,7 +994,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.2 {
|
||||
StdinProc: handles stdin EOF
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1018,7 +1016,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.3 {
|
||||
StdinProc: handles interactive stdin EOF
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1039,7 +1037,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.4 {
|
||||
StdinProc: handles stdin close
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1062,7 +1060,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.5 {
|
||||
StdinProc: handles interactive stdin close
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1086,7 +1084,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.6 {
|
||||
StdinProc: handles event loop re-entry
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1105,7 +1103,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.7 {
|
||||
StdinProc: handling of errors
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1122,7 +1120,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.8 {
|
||||
StdinProc: handling of errors, closed stderr
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1140,7 +1138,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.9 {
|
||||
StdinProc: interactive output
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1156,7 +1154,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.10 {
|
||||
StdinProc: interactive output, closed stdout
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1174,7 +1172,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.11 {
|
||||
StdinProc: prompt deletes interp
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1190,7 +1188,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.12 {
|
||||
StdinProc: prompt closes stdin
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << {
|
||||
testsetmainloop
|
||||
@@ -1209,7 +1207,7 @@ namespace eval ::tcl::test::main {
|
||||
test Tcl_Main-8.13 {
|
||||
Bug 1775878
|
||||
} -constraints {
|
||||
exec Tcltest
|
||||
exec tcl::test
|
||||
} -body {
|
||||
exec [interpreter] << "testsetmainloop\nputs \\\npwd\ntestexitmainloop" >& result
|
||||
set f [open result]
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testhashsystemhash [llength [info commands testhashsystemhash]]
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
#
|
||||
# REMARK: the tests for 'namespace upvar' are not done here. They are to be
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testevent [llength [info commands testevent]]
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testnrelevels [llength [info commands testnrelevels]]
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testobj [llength [info commands testobj]]
|
||||
testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
|
||||
|
||||
+12
-12
@@ -7,7 +7,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require TclOO 1.0.3
|
||||
package require tcl::oo 1.0.3
|
||||
if {"::tcltest" ni [namespace children]} {
|
||||
package require tcltest 2.5
|
||||
namespace import -force ::tcltest::*
|
||||
@@ -38,14 +38,14 @@ if {[testConstraint memory]} {
|
||||
test oo-0.1 {basic test of OO's ability to clean up its initial state} {
|
||||
interp create t
|
||||
t eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
}
|
||||
interp delete t
|
||||
} {}
|
||||
test oo-0.2 {basic test of OO's ability to clean up its initial state} {
|
||||
set i [interp create]
|
||||
interp eval $i {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
namespace delete ::
|
||||
}
|
||||
interp delete $i
|
||||
@@ -79,7 +79,7 @@ test oo-0.6 {cleaning the core class pair; way #1} -setup {
|
||||
interp create t
|
||||
} -body {
|
||||
t eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
namespace path oo
|
||||
list [catch {class destroy} m] $m [catch {object destroy} m] $m
|
||||
}
|
||||
@@ -90,7 +90,7 @@ test oo-0.7 {cleaning the core class pair; way #2} -setup {
|
||||
interp create t
|
||||
} -body {
|
||||
t eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
namespace path oo
|
||||
list [catch {object destroy} m] $m [catch {class destroy} m] $m
|
||||
}
|
||||
@@ -109,10 +109,10 @@ test oo-0.8 {leak in variable management} -setup {
|
||||
} -cleanup {
|
||||
foo destroy
|
||||
} -result 0
|
||||
test oo-0.9 {various types of presence of the TclOO package} {
|
||||
list [lsearch -nocase -all -inline [package names] tcloo] \
|
||||
[package present TclOO] [expr {$::oo::patchlevel in [package versions TclOO]}]
|
||||
} [list TclOO $::oo::patchlevel 1]
|
||||
test oo-0.9 {various types of presence of the tcl::oo package} {
|
||||
list [lsearch -nocase -all -inline [package names] tcl::oo] \
|
||||
[package present tcl::oo] [expr {$::oo::patchlevel in [package versions tcl::oo]}]
|
||||
} [list tcl::oo $::oo::patchlevel 1]
|
||||
|
||||
test oo-1.1 {basic test of OO functionality: no classes} {
|
||||
set result {}
|
||||
@@ -383,7 +383,7 @@ test oo-2.1 {basic test of OO functionality: constructor} -setup {
|
||||
# we're modifying the root object class's constructor
|
||||
interp create subinterp
|
||||
subinterp eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
}
|
||||
} -body {
|
||||
subinterp eval {
|
||||
@@ -514,7 +514,7 @@ test oo-3.1 {basic test of OO functionality: destructor} -setup {
|
||||
# modifying the root object class's constructor
|
||||
interp create subinterp
|
||||
subinterp eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
}
|
||||
} -body {
|
||||
subinterp eval {
|
||||
@@ -534,7 +534,7 @@ test oo-3.2 {basic test of OO functionality: destructor} -setup {
|
||||
# we're modifying the root object class's constructor
|
||||
interp create subinterp
|
||||
subinterp eval {
|
||||
package require TclOO
|
||||
package require tcl::oo
|
||||
}
|
||||
} -body {
|
||||
subinterp eval {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require TclOO 1.0.3
|
||||
package require tcl::oo 1.0.3
|
||||
if {"::tcltest" ni [namespace children]} {
|
||||
package require tcltest 2.5
|
||||
namespace import -force ::tcltest::*
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require TclOO 1.0.3
|
||||
package require tcl::oo 1.0.3
|
||||
if {"::tcltest" ni [namespace children]} {
|
||||
package require tcltest 2.5
|
||||
namespace import -force ::tcltest::*
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Do all this in a child interp to avoid garbaging the package list
|
||||
set i [interp create]
|
||||
@@ -1340,7 +1340,7 @@ proc prefer {args} {
|
||||
|
||||
test package-13.0 {package prefer defaults} -body {
|
||||
prefer
|
||||
} -result [expr {[string match {*[ab]*} [package provide Tcl]] ? "latest" : "stable"}]
|
||||
} -result [expr {[string match {*[ab]*} [package provide tcl]] ? "latest" : "stable"}]
|
||||
test package-13.1 {package prefer defaults} -body {
|
||||
set ::env(TCL_PKG_PREFER_LATEST) stable ;# value not relevant!
|
||||
prefer
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ namespace eval ::tcl::test::parse {
|
||||
namespace import ::tcltest::*
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testparser [llength [info commands testparser]]
|
||||
testConstraint testbytestring [llength [info commands testbytestring]]
|
||||
|
||||
@@ -14,7 +14,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Note that the Tcl expression parser (tclCompExpr.c) does not check
|
||||
# the semantic validity of the expressions it parses. It does not check,
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testwordend [llength [info commands testwordend]]
|
||||
testConstraint testbytestring [llength [info commands testbytestring]]
|
||||
|
||||
@@ -559,8 +559,8 @@ testConstraint $dll [file exists $x]
|
||||
|
||||
if {[testConstraint $dll]} {
|
||||
makeFile {
|
||||
# This package provides Pkga, which is also provided by a DLL.
|
||||
package provide Pkga 1.0
|
||||
# This package provides pkga, which is also provided by a DLL.
|
||||
package provide pkga 1.0
|
||||
proc pkga_neq { x } {
|
||||
return [expr {! [pkgq_eq $x]}]
|
||||
}
|
||||
@@ -576,7 +576,7 @@ test pkgMkIndex-10.1 {package in DLL and script} [list exec $dll] {
|
||||
set cmd [list pkg_mkIndex -lazy $fullPkgPath [file tail $x] pkga.tcl]
|
||||
exec [interpreter] << $cmd
|
||||
pkgtest::runCreatedIndex {0 {}} -lazy $fullPkgPath pkga[info sharedlibextension] pkga.tcl
|
||||
} "0 {{Pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}"
|
||||
} "0 {{pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}"
|
||||
test pkgMkIndex-10.2 {package in DLL hidden by -load} [list exec $dll] {
|
||||
# Do all [load]ing of shared libraries in another process, so we can
|
||||
# delete the file and not get stuck because we're holding a reference to
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ namespace eval ::tcl::test::platform {
|
||||
namespace upvar :: tcl_platform tcl_platform
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
package require tcltests
|
||||
|
||||
testConstraint testCPUID [llength [info commands testcpuid]]
|
||||
|
||||
+20
-20
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
namespace import -force ::tcltest::*
|
||||
}
|
||||
|
||||
testConstraint procbodytest [expr {![catch {package require procbodytest}]}]
|
||||
testConstraint tcl::test [expr {![catch {package require tcl::test}]}]
|
||||
testConstraint memory [llength [info commands memory]]
|
||||
|
||||
catch {namespace delete {*}[namespace children :: test_ns_*]}
|
||||
@@ -210,14 +210,14 @@ catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
|
||||
# Note that the test require that procedures whose body is used to create
|
||||
# procbody objects must be executed before the procbodytest::proc command is
|
||||
# procbody objects must be executed before the tcl::procbodytest::proc command is
|
||||
# executed, so that the Proc struct is populated correctly (CompiledLocals are
|
||||
# added at compile time).
|
||||
|
||||
test proc-4.1 {TclCreateProc, procbody obj} -constraints procbodytest -body {
|
||||
test proc-4.1 {TclCreateProc, procbody obj} -constraints tcl::test -body {
|
||||
proc p x {return "$x:$x"}
|
||||
set rv [p P]
|
||||
procbodytest::proc t x p
|
||||
tcl::procbodytest::proc t x p
|
||||
lappend rv [t T]
|
||||
} -cleanup {
|
||||
catch {rename p ""}
|
||||
@@ -229,9 +229,9 @@ test proc-4.2 {TclCreateProc, procbody obj, use compiled locals} -body {
|
||||
return "$x:$y"
|
||||
}
|
||||
set rv [p P]
|
||||
procbodytest::proc t x p
|
||||
tcl::procbodytest::proc t x p
|
||||
lappend rv [t T]
|
||||
} -constraints procbodytest -cleanup {
|
||||
} -constraints tcl::test -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {P:p T:t}
|
||||
@@ -241,9 +241,9 @@ test proc-4.3 {TclCreateProc, procbody obj, too many args} -body {
|
||||
return "$x:$y"
|
||||
}
|
||||
set rv [p P]
|
||||
procbodytest::proc t {x x1 x2} p
|
||||
tcl::procbodytest::proc t {x x1 x2} p
|
||||
lappend rv [t T]
|
||||
} -constraints procbodytest -returnCodes error -cleanup {
|
||||
} -constraints tcl::test -returnCodes error -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {procedure "t": arg list contains 3 entries, precompiled header expects 1}
|
||||
@@ -254,9 +254,9 @@ test proc-4.4 {TclCreateProc, procbody obj, inconsistent arg name} -body {
|
||||
return "$v:$w"
|
||||
}
|
||||
set rv [p P Q R]
|
||||
procbodytest::proc t {x x1 z} p
|
||||
tcl::procbodytest::proc t {x x1 z} p
|
||||
lappend rv [t S T U]
|
||||
} -constraints procbodytest -returnCodes error -cleanup {
|
||||
} -constraints tcl::test -returnCodes error -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {procedure "t": formal parameter 1 is inconsistent with precompiled body}
|
||||
@@ -267,9 +267,9 @@ test proc-4.5 {TclCreateProc, procbody obj, inconsistent arg default type} -body
|
||||
return "$v:$w"
|
||||
}
|
||||
set rv [p P Q R]
|
||||
procbodytest::proc t {x y z} p
|
||||
tcl::procbodytest::proc t {x y z} p
|
||||
lappend rv [t S T U]
|
||||
} -constraints procbodytest -returnCodes error -cleanup {
|
||||
} -constraints tcl::test -returnCodes error -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {procedure "t": formal parameter 2 is inconsistent with precompiled body}
|
||||
@@ -280,9 +280,9 @@ test proc-4.6 {TclCreateProc, procbody obj, inconsistent arg default type} -body
|
||||
return "$v:$w"
|
||||
}
|
||||
set rv [p P Q R]
|
||||
procbodytest::proc t {x y {z Z}} p
|
||||
tcl::procbodytest::proc t {x y {z Z}} p
|
||||
lappend rv [t S T U]
|
||||
} -returnCodes error -constraints procbodytest -cleanup {
|
||||
} -returnCodes error -constraints tcl::test -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {procedure "t": formal parameter 2 is inconsistent with precompiled body}
|
||||
@@ -293,9 +293,9 @@ test proc-4.7 {TclCreateProc, procbody obj, inconsistent arg default value} -bod
|
||||
return "$v:$w"
|
||||
}
|
||||
set rv [p P Q R]
|
||||
procbodytest::proc t {x y {z ZZ}} p
|
||||
tcl::procbodytest::proc t {x y {z ZZ}} p
|
||||
lappend rv [t S T U]
|
||||
} -constraints procbodytest -returnCodes error -cleanup {
|
||||
} -constraints tcl::test -returnCodes error -cleanup {
|
||||
catch {rename p ""}
|
||||
catch {rename t ""}
|
||||
} -result {procedure "t": formal parameter "z" has default value inconsistent with precompiled body}
|
||||
@@ -309,10 +309,10 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set
|
||||
return "$x:$y"
|
||||
}
|
||||
px x
|
||||
} -constraints {procbodytest memory} -body {
|
||||
} -constraints {tcl::test memory} -body {
|
||||
set end [getbytes]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
procbodytest::proc tx x px
|
||||
tcl::procbodytest::proc tx x px
|
||||
set tmp $end
|
||||
set end [getbytes]
|
||||
}
|
||||
@@ -321,8 +321,8 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set
|
||||
rename getbytes {}
|
||||
unset -nocomplain end i tmp leakedBytes
|
||||
} -result 0
|
||||
test proc-4.9 {[39fed4dae5] Valid Tcl_PkgPresent return} procbodytest {
|
||||
procbodytest::check
|
||||
test proc-4.9 {[39fed4dae5] Valid Tcl_PkgPresent return} tcl::test {
|
||||
tcl::procbodytest::check
|
||||
} 1
|
||||
|
||||
test proc-5.1 {Bytecompiling noop; test for correct argument substitution} -body {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# All tests require the testregexp command, return if this
|
||||
# command doesn't exist
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ if {[testConstraint win]} {
|
||||
testConstraint reg 1
|
||||
}
|
||||
}
|
||||
testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
|
||||
|
||||
# determine the current locale
|
||||
testConstraint english [expr {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testdel [llength [info commands testdel]]
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testinterpresolver [llength [info commands testinterpresolver]]
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Some tests require the testsaveresult command
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
# See the file "license.terms" for information on usage and redistribution of
|
||||
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require Tcl 8.5-
|
||||
|
||||
if {"::tcltest" ni [namespace children]} {
|
||||
package require tcltest 2.5
|
||||
namespace import -force ::tcltest::*
|
||||
@@ -53,10 +51,10 @@ proc mapAndSortList {map listIn} {
|
||||
# thus un-autoindexed) APIs in this test result arguments:
|
||||
catch {safe::interpConfigure}
|
||||
|
||||
# testing that nested and statics do what is advertised (we use a static
|
||||
# package - Tcltest - but it might be absent if we're in standard tclsh)
|
||||
# testing that nested and statics do what is advertised (we use a
|
||||
# package - tcl::test - but it might be absent if we're in standard tclsh)
|
||||
|
||||
testConstraint TcltestPackage [expr {![catch {package require Tcltest}]}]
|
||||
testConstraint tcl::test [expr {![catch {package require tcl::test}]}]
|
||||
|
||||
# Tests 5.* test the example files before using them to test safe interpreters.
|
||||
|
||||
|
||||
+8
-8
@@ -54,9 +54,9 @@ proc mapAndSortList {map listIn} {
|
||||
catch {safe::interpConfigure}
|
||||
|
||||
# testing that nested and statics do what is advertised (we use a static
|
||||
# package - Tcltest - but it might be absent if we're in standard tclsh)
|
||||
# package - tcl::test - but it might be absent if we're in standard tclsh)
|
||||
|
||||
testConstraint TcltestPackage [expr {![catch {package require Tcltest}]}]
|
||||
testConstraint tcl::test [expr {![catch {package require tcl::test}]}]
|
||||
|
||||
test safe-1.1 {safe::interpConfigure syntax} -returnCodes error -body {
|
||||
safe::interpConfigure
|
||||
@@ -1158,14 +1158,14 @@ test safe-9.24 {interpConfigure change the access path; check module loading; st
|
||||
# See comments on lsort after test safe-9.20.
|
||||
|
||||
catch {teststaticpkg Safepkg1 0 0}
|
||||
test safe-10.1 {testing statics loading} -constraints TcltestPackage -setup {
|
||||
test safe-10.1 {testing statics loading} -constraints tcl::test -setup {
|
||||
set i [safe::interpCreate]
|
||||
} -body {
|
||||
interp eval $i {load {} Safepkg1}
|
||||
} -returnCodes error -cleanup {
|
||||
safe::interpDelete $i
|
||||
} -result {load of binary library for package Safepkg1 failed: can't use package in a safe interpreter: no Safepkg1_SafeInit procedure}
|
||||
test safe-10.1.1 {testing statics loading} -constraints TcltestPackage -setup {
|
||||
test safe-10.1.1 {testing statics loading} -constraints tcl::test -setup {
|
||||
set i [safe::interpCreate]
|
||||
} -body {
|
||||
catch {interp eval $i {load {} Safepkg1}} m o
|
||||
@@ -1178,7 +1178,7 @@ test safe-10.1.1 {testing statics loading} -constraints TcltestPackage -setup {
|
||||
"load {} Safepkg1"
|
||||
invoked from within
|
||||
"interp eval $i {load {} Safepkg1}"}
|
||||
test safe-10.2 {testing statics loading / -nostatics} -constraints TcltestPackage -body {
|
||||
test safe-10.2 {testing statics loading / -nostatics} -constraints tcl::test -body {
|
||||
set i [safe::interpCreate -nostatics]
|
||||
interp eval $i {load {} Safepkg1}
|
||||
} -returnCodes error -cleanup {
|
||||
@@ -1186,18 +1186,18 @@ test safe-10.2 {testing statics loading / -nostatics} -constraints TcltestPackag
|
||||
} -result {permission denied (static package)}
|
||||
test safe-10.3 {testing nested statics loading / no nested by default} -setup {
|
||||
set i [safe::interpCreate]
|
||||
} -constraints TcltestPackage -body {
|
||||
} -constraints tcl::test -body {
|
||||
interp eval $i {interp create x; load {} Safepkg1 x}
|
||||
} -returnCodes error -cleanup {
|
||||
safe::interpDelete $i
|
||||
} -result {permission denied (nested load)}
|
||||
test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints TcltestPackage -body {
|
||||
test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body {
|
||||
set i [safe::interpCreate -nestedloadok]
|
||||
interp eval $i {interp create x; load {} Safepkg1 x}
|
||||
} -returnCodes error -cleanup {
|
||||
safe::interpDelete $i
|
||||
} -result {load of binary library for package Safepkg1 failed: can't use package in a safe interpreter: no Safepkg1_SafeInit procedure}
|
||||
test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints TcltestPackage -body {
|
||||
test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body {
|
||||
set i [safe::interpCreate -nestedloadok]
|
||||
catch {interp eval $i {interp create x; load {} Safepkg1 x}} m o
|
||||
dict get $o -errorinfo
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
testConstraint testset2 [llength [info commands testset2]]
|
||||
|
||||
|
||||
+9
-5
@@ -66,18 +66,22 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
::tcltest::loadTestedCommands
|
||||
|
||||
if {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]} {
|
||||
# A bad interaction between socket creation, macOS, and unattended CI
|
||||
# environments make this whole file impractical to run; too many weird hangs.
|
||||
if {[info exists ::env(MAC_CI)]} {
|
||||
return
|
||||
}
|
||||
testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
|
||||
|
||||
# Some tests require the Thread package or exec command
|
||||
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]
|
||||
testConstraint exec [llength [info commands exec]]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
|
||||
testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
|
||||
testConstraint notWinCI [expr {
|
||||
$tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
|
||||
|
||||
# Produce a random port number in the Dynamic/Private range
|
||||
# from 49152 through 65535.
|
||||
@@ -2390,7 +2394,7 @@ test socket-14.10.1 {pending [socket -async] and nonblocking [puts], server is I
|
||||
removeFile script
|
||||
} -result {{} ok}
|
||||
test socket-14.11.0 {pending [socket -async] and nonblocking [puts], no listener, no flush} \
|
||||
-constraints {socket knownMsvcBug} \
|
||||
-constraints {socket notWinCI} \
|
||||
-body {
|
||||
set sock [socket -async localhost [randport]]
|
||||
fconfigure $sock -blocking 0
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
|
||||
}
|
||||
|
||||
::tcltest::loadTestedCommands
|
||||
catch [list package require -exact Tcltest [info patchlevel]]
|
||||
catch [list package require -exact tcl::test [info patchlevel]]
|
||||
|
||||
# Helper commands to test various optimizations, code paths, and special cases.
|
||||
proc makeByteArray {s} {binary format a* $s}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user