OSDN Git Service

Updated to tk 8.4.1
[pf3gnuchains/sourceware.git] / tk / tests / font.test
index 1df9e7d..65fd00a 100644 (file)
@@ -8,15 +8,12 @@
 #
 # RCS: @(#) $Id$
 
-if {[lsearch [namespace children] ::tcltest] == -1} {
-    source [file join [pwd] [file dirname [info script]] defs.tcl]
-}
-
-if {[info commands testfont] != "testfont"} {
-    puts "testfont command not available; skipping tests"
-    ::tcltest::cleanupTests
-    return
-}
+package require tcltest 2.1
+namespace import -force tcltest::configure
+namespace import -force tcltest::testsDirectory
+configure -testdir [file join [pwd] [file dirname [info script]]]
+configure -loadfile [file join [testsDirectory] constraints.tcl]
+tcltest::loadTestedCommands
 
 catch {destroy .b}
 toplevel .b
@@ -458,7 +455,7 @@ test font-13.4 {CreateNamedFont: recreate "deleted" font} {
 test font-14.1 {Tk_GetFont procedure} {
 } {}
 
-test font-15.1 {Tk_AllocFontFromObj - converting internal reps} {
+test font-15.1 {Tk_AllocFontFromObj - converting internal reps} testfont {
     set x {Times 16}
     lindex $x 0
     destroy .b1 .b2
@@ -466,7 +463,7 @@ test font-15.1 {Tk_AllocFontFromObj - converting internal reps} {
     lindex $x 0
     testfont counts {Times 16}
 } {{1 0}}
-test font-15.2 {Tk_AllocFontFromObj - discard stale font} {
+test font-15.2 {Tk_AllocFontFromObj - discard stale font} testfont {
     set x {Times 16}
     destroy .b1 .b2
     button .b1 -font $x
@@ -476,7 +473,7 @@ test font-15.2 {Tk_AllocFontFromObj - discard stale font} {
     button .b2 -font $x
     lappend result [testfont counts {Times 16}]
 } {{} {{1 1}}}
-test font-15.3 {Tk_AllocFontFromObj - reuse existing font} {
+test font-15.3 {Tk_AllocFontFromObj - reuse existing font} testfont {
     set x {Times 16}
     destroy .b1 .b2
     button .b1 -font $x
@@ -551,7 +548,7 @@ test font-16.1 {Tk_NameOfFont procedure} {
     .b.f cget -font
 } {-family fixed}
 
-test font-17.1 {Tk_FreeFontFromObj - reference counts} {
+test font-17.1 {Tk_FreeFontFromObj - reference counts} testfont {
     set x {Courier 12}
     destroy .b1 .b2 .b3
     button .b1 -font $x
@@ -611,7 +608,7 @@ test font-17.6 {Tk_FreeFont procedure: named font not deleted yet} {
     list [lindex [font actual xyz] 0] [lindex $x 0]
 } {-family -family}
 
-test font-18.1 {FreeFontObjProc} {
+test font-18.1 {FreeFontObjProc} testfont {
     destroy .b1
     set x [format {Courier 12}]
     button .b1 -font $x
@@ -1118,40 +1115,40 @@ test font-32.1 {Tk_TextLayoutToPostscript: ensure buffer doesn't overflow} {
     .b.c insert text end "end"
     set x [.b.c postscript]
     set i [string first "(qwerty" $x] 
-    string range $x $i [expr {$i + 213}]
-} {(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)
-(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-()
-(end)
+    string range $x $i [expr {$i + 278}]
+} {(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)]
+[(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[()]
+[(end)]
 }
 
 test font-33.1 {Tk_TextWidth procedure} {
@@ -1381,4 +1378,3 @@ return
 
 
 
-