summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 07:47:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 07:47:52 (GMT)
commit809842a942400fa2f099485c2faa3e85d946360d (patch)
treebe55463759384fa2c23bf39db82ee742bd939299
parent6f541de9a3a5684df538e29e14259aecc2addeeb (diff)
parent50912fc63c46a741cbb7fd51f25beae99817eb41 (diff)
downloadtcl-809842a942400fa2f099485c2faa3e85d946360d.zip
tcl-809842a942400fa2f099485c2faa3e85d946360d.tar.gz
tcl-809842a942400fa2f099485c2faa3e85d946360d.tar.bz2
Merge 8.5
-rw-r--r--.travis.yml16
-rw-r--r--generic/tclTest.c12
-rw-r--r--tests/format.test5
-rw-r--r--tests/ioCmd.test3
-rw-r--r--win/cat.c6
5 files changed, 23 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index 5da5ecd..9798220 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -215,8 +215,7 @@ matrix:
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit --enable-symbols"
script: *crosstest
# Test on Windows with MSVC native
-# Doesn't run tests because not all tests work in this environment. TODO: either fix or disable those test-cases!
- - name: "Windows/MSVC/Shared/no test"
+ - name: "Windows/MSVC/Shared"
os: windows
compiler: cl
env: &vcenv
@@ -227,23 +226,26 @@ matrix:
- cd ${BUILD_DIR}
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc all tcltest'
- - name: "Windows/MSVC/Static/no test"
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=threads -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=threads -f makefile.vc test'
+ - name: "Windows/MSVC/Static"
os: windows
compiler: cl
env: *vcenv
before_install: *vcpreinst
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc all tcltest'
- - name: "Windows/MSVC/Debug/no test"
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static,msvcrt,threads -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static,msvcrt,threads -f makefile.vc test'
+ - name: "Windows/MSVC/Debug"
os: windows
compiler: cl
env: *vcenv
before_install: *vcpreinst
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,msvcrt,threads -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,msvcrt,threads -f makefile.vc test'
before_install:
- cd ${BUILD_DIR}
install:
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 1a4d7bf..473368c 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2384,11 +2384,11 @@ ExitProcOdd(
ClientData clientData) /* Integer value to print. */
{
char buf[16 + TCL_INTEGER_SPACE];
- size_t len;
+ int len;
- sprintf(buf, "odd %d\n", PTR2INT(clientData));
+ sprintf(buf, "odd %d\n", (int)PTR2INT(clientData));
len = strlen(buf);
- if (len != (size_t) write(1, buf, len)) {
+ if (len != (int) write(1, buf, len)) {
Tcl_Panic("ExitProcOdd: unable to write to stdout");
}
}
@@ -2398,11 +2398,11 @@ ExitProcEven(
ClientData clientData) /* Integer value to print. */
{
char buf[16 + TCL_INTEGER_SPACE];
- size_t len;
+ int len;
- sprintf(buf, "even %d\n", PTR2INT(clientData));
+ sprintf(buf, "even %d\n", (int)PTR2INT(clientData));
len = strlen(buf);
- if (len != (size_t) write(1, buf, len)) {
+ if (len != (int) write(1, buf, len)) {
Tcl_Panic("ExitProcEven: unable to write to stdout");
}
}
diff --git a/tests/format.test b/tests/format.test
index 88013cf..c26bbe9 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -21,6 +21,7 @@ testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
testConstraint wideIs64bit \
[expr {(wide(0x80000000) > 0) && (wide(0x8000000000000000) < 0)}]
testConstraint wideBiggerThanInt [expr {wide(0x80000000) != int(0x80000000)}]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
test format-1.1 {integer formatting} {
format "%*d %d %d %d" 6 34 16923 -12 -1
@@ -273,13 +274,13 @@ test format-6.1 {floating-point zeroes} {eformat} {
test format-6.2 {floating-point zeroes} {eformat} {
format "%.4e %.4f %.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0}
-test format-6.3 {floating-point zeroes} {eformat} {
+test format-6.3 {floating-point zeroes} {eformat knownMsvcBug} {
format "%#.4e %#.4f %#.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0.000}
test format-6.4 {floating-point zeroes} {eformat} {
format "%.0e %.0f %.0g" 0.0 0.0 0.0 0.0
} {0e+00 0 0}
-test format-6.5 {floating-point zeroes} {eformat} {
+test format-6.5 {floating-point zeroes} {eformat knownMsvcBug} {
format "%#.0e %#.0f %#.0g" 0.0 0.0 0.0 0.0
} {0.e+00 0. 0.}
test format-6.6 {floating-point zeroes} {
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 14c3a4e..5bedcbf 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -25,6 +25,7 @@ package require tcltests
# Custom constraints used in this file
testConstraint testchannel [llength [info commands testchannel]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
#----------------------------------------------------------------------
@@ -792,7 +793,7 @@ test iocmd-21.19 {chan create, init failure -> no channel, no finalize} -match g
rename foo {}
set res
} -result {{} {initialize rc* {read write}} 1 {*all required methods*} {}}
-test iocmd-21.20 {Bug 88aef05cda} -setup {
+test iocmd-21.20 {Bug 88aef05cda} -constraints knownMsvcBug -setup {
proc foo {method chan args} {
switch -- $method blocking {
chan configure $chan -blocking [lindex $args 0]
diff --git a/win/cat.c b/win/cat.c
index 3a821a4..bd84dd4 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -28,14 +28,14 @@ _tmain(void)
const char *err;
while (1) {
- n = read(0, buf, sizeof(buf));
+ n = _read(0, buf, sizeof(buf));
if (n <= 0) {
break;
}
- write(1, buf, n);
+ _write(1, buf, n);
}
err = (sizeof(int) == 2) ? "stderr16" : "stderr32";
- write(2, err, (unsigned int)strlen(err));
+ _write(2, err, (unsigned int)strlen(err));
return 0;
}