From 9a1a8cdddc762590ba680992219159244f63d945 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 11 Oct 2020 16:40:39 +0000 Subject: 3 more select-* testcases which sometimes fail on Travis' Ubuntu environment Eliminate the use of TCL_CFGVAL_ENCODING, it isn't actually needed. Run all test-cases with system encoding set to "utf-8", so we get consistant behavior with or without TIP #587 --- tests/all.tcl | 3 ++- tests/select.test | 6 +++--- tests/ttk/all.tcl | 3 ++- unix/tkUnixRFont.c | 6 +----- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/all.tcl b/tests/all.tcl index 3b6b75f..46721a2 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -4,7 +4,7 @@ # tests. Execute it by invoking "source all.tcl" when running tktest # in this directory. # -# Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright © 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -17,4 +17,5 @@ tcltest::configure -loadfile \ [file join [tcltest::testsDirectory] constraints.tcl] tcltest::configure -singleproc 1 set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] +encoding system utf-8 if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} diff --git a/tests/select.test b/tests/select.test index c412fc0..31d6494 100644 --- a/tests/select.test +++ b/tests/select.test @@ -896,7 +896,7 @@ test select-9.1 {SelCvtToX and SelCvtFromX procedures} -setup { test select-9.2 {SelCvtToX and SelCvtFromX procedures} -setup { setup setupbg -} -constraints x11 -body { +} -constraints {x11 failsOnUbuntu} -body { set selValue "1024 0xffff 2048 -2 " set selInfo "" selection handle -selection PRIMARY -format INTEGER -type TEST \ @@ -1022,7 +1022,7 @@ test select-10.4 {ConvertSelection procedure} -constraints { lappend result $selInfo } -result {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}} test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints { - x11 + x11 failsOnUbuntu } -setup { setup setupbg @@ -1060,7 +1060,7 @@ test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints { ############################################################################## # testing reentrancy -test select-11.1 {TkSelPropProc procedure} -constraints x11 -setup { +test select-11.1 {TkSelPropProc procedure} -constraints {x11 failsOnUbuntu} -setup { setup setupbg } -body { diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl index a75172f..8a75ba7 100644 --- a/tests/ttk/all.tcl +++ b/tests/ttk/all.tcl @@ -4,7 +4,7 @@ # tests. Execute it by invoking "source all.tcl" when running tktest # in this directory. # -# Copyright (c) 2007 by the Tk developers. +# Copyright © 2007 by the Tk developers. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -17,4 +17,5 @@ tcltest::configure -loadfile \ [file join [file dirname [tcltest::testsDirectory]] constraints.tcl] tcltest::configure -singleproc 1 set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] +encoding system utf-8 if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index f57eaa5..340b5a9 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -61,10 +61,6 @@ static Tcl_ThreadDataKey dataKey; * the TIP 59 configuration database. */ -#ifndef TCL_CFGVAL_ENCODING -#define TCL_CFGVAL_ENCODING "ascii" -#endif - static int utf8ToUcs4(const char *source, FcChar32 *c, int numBytes) { if (numBytes >= 6) { @@ -82,7 +78,7 @@ TkpFontPkgInit( { 0,0 } }; - Tcl_RegisterConfig(mainPtr->interp, "tk", cfg, TCL_CFGVAL_ENCODING); + Tcl_RegisterConfig(mainPtr->interp, "tk", cfg, "utf-8"); } static XftFont * -- cgit v0.12