summaryrefslogtreecommitdiffstats
path: root/tests/winFont.test
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2004-06-24 12:45:41 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2004-06-24 12:45:41 (GMT)
commit72754477d458ee1a408b36a9517229822e7bcd9d (patch)
tree247a6f8a357677371ada6b20a07faf589614debb /tests/winFont.test
parent49b0e6b4d1beaaa5adc98082199f8438d0703f58 (diff)
downloadtk-72754477d458ee1a408b36a9517229822e7bcd9d.zip
tk-72754477d458ee1a408b36a9517229822e7bcd9d.tar.gz
tk-72754477d458ee1a408b36a9517229822e7bcd9d.tar.bz2
Use standard constraint names
Diffstat (limited to 'tests/winFont.test')
-rw-r--r--tests/winFont.test62
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/winFont.test b/tests/winFont.test
index 6104e52..eec223e 100644
--- a/tests/winFont.test
+++ b/tests/winFont.test
@@ -10,7 +10,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winFont.test,v 1.9 2003/04/01 21:07:01 dgp Exp $
+# RCS: @(#) $Id: winFont.test,v 1.10 2004/06/24 12:45:44 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -41,10 +41,10 @@ proc getsize {} {
return "[winfo reqwidth .b.l] [winfo reqheight .b.l]"
}
-test winfont-1.1 {TkpGetNativeFont procedure: not native} {pcOnly} {
+test winfont-1.1 {TkpGetNativeFont procedure: not native} win {
list [catch {font measure {} xyz} msg] $msg
} {1 {font "" doesn't exist}}
-test winfont-1.2 {TkpGetNativeFont procedure: native} {pcOnly} {
+test winfont-1.2 {TkpGetNativeFont procedure: native} win {
font measure ansifixed 0
font measure ansi 0
font measure device 0
@@ -54,99 +54,99 @@ test winfont-1.2 {TkpGetNativeFont procedure: native} {pcOnly} {
set x {}
} {}
-test winfont-2.1 {TkpGetFontFromAttributes procedure: pointsize} {pcOnly} {
+test winfont-2.1 {TkpGetFontFromAttributes procedure: pointsize} win {
expr [font actual {-size -10} -size]>0
} {1}
-test winfont-2.2 {TkpGetFontFromAttributes procedure: pointsize} {pcOnly} {
+test winfont-2.2 {TkpGetFontFromAttributes procedure: pointsize} win {
expr [font actual {-family Arial} -size]>0
} {1}
-test winfont-2.3 {TkpGetFontFromAttributes procedure: normal weight} {pcOnly} {
+test winfont-2.3 {TkpGetFontFromAttributes procedure: normal weight} win {
font actual {-weight normal} -weight
} {normal}
-test winfont-2.4 {TkpGetFontFromAttributes procedure: bold weight} {pcOnly} {
+test winfont-2.4 {TkpGetFontFromAttributes procedure: bold weight} win {
font actual {-weight bold} -weight
} {bold}
-test winfont-2.5 {TkpGetFontFromAttributes procedure: no family} {pcOnly} {
+test winfont-2.5 {TkpGetFontFromAttributes procedure: no family} win {
catch {expr {[font actual {-size 10} -size]}}
} 0
-test winfont-2.6 {TkpGetFontFromAttributes procedure: family} {pcOnly} {
+test winfont-2.6 {TkpGetFontFromAttributes procedure: family} win {
font actual {-family Arial} -family
} {Arial}
-test winfont-2.7 {TkpGetFontFromAttributes procedure: Times fonts} {pcOnly} {
+test winfont-2.7 {TkpGetFontFromAttributes procedure: Times fonts} win {
set x {}
lappend x [font actual {-family "Times"} -family]
lappend x [font actual {-family "New York"} -family]
lappend x [font actual {-family "Times New Roman"} -family]
} {{Times New Roman} {Times New Roman} {Times New Roman}}
-test winfont-2.8 {TkpGetFontFromAttributes procedure: Courier fonts} {pcOnly} {
+test winfont-2.8 {TkpGetFontFromAttributes procedure: Courier fonts} win {
set x {}
lappend x [font actual {-family "Courier"} -family]
lappend x [font actual {-family "Monaco"} -family]
lappend x [font actual {-family "Courier New"} -family]
} {{Courier New} {Courier New} {Courier New}}
-test winfont-2.9 {TkpGetFontFromAttributes procedure: Helvetica fonts} {pcOnly} {
+test winfont-2.9 {TkpGetFontFromAttributes procedure: Helvetica fonts} win {
set x {}
lappend x [font actual {-family "Helvetica"} -family]
lappend x [font actual {-family "Geneva"} -family]
lappend x [font actual {-family "Arial"} -family]
} {Arial Arial Arial}
-test winfont-2.10 {TkpGetFontFromAttributes procedure: fallback} {pcOnly} {
+test winfont-2.10 {TkpGetFontFromAttributes procedure: fallback} win {
# No way to get it to fail! Any font name is acceptable.
} {}
-test winfont-3.1 {TkpDeleteFont procedure} {pcOnly} {
+test winfont-3.1 {TkpDeleteFont procedure} win {
font actual {-family xyz}
set x {}
} {}
-test winfont-4.1 {TkpGetFontFamilies procedure} {pcOnly} {
+test winfont-4.1 {TkpGetFontFamilies procedure} win {
font families
set x {}
} {}
-test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} {pcOnly} {
+test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} win {
.b.l config -wrap 0 -text "000000"
getsize
} "[expr $ax*6] $ay"
-test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} {pcOnly} {
+test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} win {
.b.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
getsize
} "[expr $ax*256] $ay"
-test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} {pcOnly} {
+test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} win {
.b.l config -wrap [expr $ax*10] -text "00000000"
getsize
} "[expr $ax*8] $ay"
-test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} {pcOnly} {
+test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} win {
.b.l config -wrap [expr $ax*6] -text "00000000"
getsize
} "[expr $ax*6] [expr $ay*2]"
-test winfont-5.5 {Tk_MeasureChars procedure: include last partial char} {pcOnly} {
+test winfont-5.5 {Tk_MeasureChars procedure: include last partial char} win {
.b.c dchars $t 0 end
.b.c insert $t 0 "0000"
.b.c index $t @[expr int($cx*2.5)],1
} {2}
-test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} {pcOnly} {
+test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} win {
.b.l config -text "000000" -wrap 1
getsize
} "$ax [expr $ay*6]"
-test winfont-5.7 {Tk_MeasureChars procedure: whole words} {pcOnly} {
+test winfont-5.7 {Tk_MeasureChars procedure: whole words} win {
.b.l config -wrap [expr $ax*8] -text "000000 0000"
getsize
} "[expr $ax*6] [expr $ay*2]"
-test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} {pcOnly} {
+test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} win {
.b.l config -wrap [expr $ax*12] -text "000000 0000000"
getsize
} "[expr $ax*7] [expr $ay*2]"
-test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} {pcOnly} {
+test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} win {
.b.l config -wrap [expr $ax*12] -text "000 00 00000"
getsize
} "[expr $ax*7] [expr $ay*2]"
-test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} {pcOnly} {
+test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} win {
.b.l config -wrap [expr $ax*12] -text "0000000000000000"
getsize
} "[expr $ax*12] [expr $ay*2]"
test winfont-5.10 {Tk_MeasureChars procedure: check for kerning} \
- {pcOnly nonPortable} {
+ {win nonPortable} {
set font [.b.l cget -font]
.b.l config -font {{MS Sans Serif} 8} -text "W"
set width [winfo reqwidth .b.l]
@@ -155,12 +155,12 @@ test winfont-5.10 {Tk_MeasureChars procedure: check for kerning} \
.b.l config -font $font
expr $x < ($width*10)
} 1
-test winfont-6.1 {Tk_DrawChars procedure: loop test} {pcOnly} {
+test winfont-6.1 {Tk_DrawChars procedure: loop test} win {
.b.l config -text "a"
update
} {}
-test winfont-7.1 {AllocFont procedure: use old font} {pcOnly} {
+test winfont-7.1 {AllocFont procedure: use old font} win {
font create xyz
catch {destroy .c}
button .c -font xyz
@@ -169,13 +169,13 @@ test winfont-7.1 {AllocFont procedure: use old font} {pcOnly} {
destroy .c
font delete xyz
} {}
-test winfont-7.2 {AllocFont procedure: extract info from logfont} {pcOnly} {
+test winfont-7.2 {AllocFont procedure: extract info from logfont} win {
font actual {arial 10 bold italic underline overstrike}
} {-family Arial -size 10 -weight bold -slant italic -underline 1 -overstrike 1}
-test winfont-7.3 {AllocFont procedure: extract info from textmetric} {pcOnly} {
+test winfont-7.3 {AllocFont procedure: extract info from textmetric} win {
font metric {arial 10 bold italic underline overstrike} -fixed
} {0}
-test winfont-7.4 {AllocFont procedure: extract info from textmetric} {pcOnly} {
+test winfont-7.4 {AllocFont procedure: extract info from textmetric} win {
font metric systemfixed -fixed
} {1}