From 0589b4b31288450a755ae9b30fa2526f17cfaa95 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 30 Sep 2002 15:22:07 +0000 Subject: 614650 is still lurking, but now mainly as a [text] widget bug... FossilOrigin-Name: db51651485f014294265af8338de130800f0fd25 --- ChangeLog | 3 ++- tests/unixSelect.test | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50cff05..b18d662 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2002-09-30 Donal K. Fellows - * tests/unixSelect.test: + * tests/unixSelect.test: Test for various things that can fail to + work in 8.4.0... * unix/tkUnixSelect.c (TkSelPropProc,SelRcvIncrProc): Incremental transfers of UTF8_STRING selections should now work; Tk will now tag them with the right size and only transfer complete UTF8 diff --git a/tests/unixSelect.test b/tests/unixSelect.test index 7fe26bc..9e0b35b 100644 --- a/tests/unixSelect.test +++ b/tests/unixSelect.test @@ -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. # -# RCS: @(#) $Id: unixSelect.test,v 1.5 2002/09/30 13:42:25 dkf Exp $ +# RCS: @(#) $Id: unixSelect.test,v 1.6 2002/09/30 15:22:08 dkf Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -296,6 +296,54 @@ test unixSelect-1.15 {TkSelGetSelection procedure: simple i18n text, utf-8} {uni list [string equal \u00fc\u0444 $x] \ [string length $x] [string bytelength $x] } {1 2 4} +test unixSelect-1.16 {TkSelGetSelection procedure: INCR i18n text, utf-8} {unixOnly} { + setupbg + dobg { + entry .e; pack .e; update + .e insert 0 [string repeat [string repeat \u00c4\u00e4 50]\n 21] + .e selection range 0 end + } + set x [selection get -type UTF8_STRING] + cleanupbg + list [string equal [string repeat [string repeat \u00c4\u00e4 50]\n 21] $x] \ + [string length $x] [string bytelength $x] +} {1 2121 4221} +test unixSelect-1.17 {TkSelGetSelection procedure: INCR i18n text, utf-8} {unixOnly} { + setupbg + dobg { + entry .e; pack .e; update + .e insert 0 i[string repeat [string repeat \u00c4\u00e4 50]\n 21] + .e selection range 0 end + } + set x [selection get -type UTF8_STRING] + cleanupbg + list [string equal i[string repeat [string repeat \u00c4\u00e4 50]\n 21] $x] \ + [string length $x] [string bytelength $x] +} {1 2122 4222} +test unixSelect-1.18 {TkSelGetSelection procedure: INCR i18n text, utf-8} {unixOnly} { + setupbg + dobg { + text .t; pack .t; update + .t insert 1.0 [string repeat [string repeat \u00c4\u00e4 50]\n 21] sel + } + after 10 + set x [selection get -type UTF8_STRING] + cleanupbg + list [string equal [string repeat [string repeat \u00c4\u00e4 50]\n 21] $x] \ + [string length $x] [string bytelength $x] +} {1 2121 4221} +test unixSelect-1.19 {TkSelGetSelection procedure: INCR i18n text, utf-8} {unixOnly} { + setupbg + dobg { + text .t; pack .t; update + .t insert 1.0 i[string repeat [string repeat \u00c4\u00e4 50]\n 21] sel + } + after 10 + set x [selection get -type UTF8_STRING] + cleanupbg + list [string equal i[string repeat [string repeat \u00c4\u00e4 50]\n 21] $x] \ + [string length $x] [string bytelength $x] +} {1 2122 4222} # cleanup ::tcltest::cleanupTests -- cgit v0.12