Index: openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 5 Feb 2004 17:05:43 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 6 Feb 2004 12:36:55 -0000 1.5 @@ -76,7 +76,7 @@ Testing ad_html_text_convert. } { #---------------------------------------------------------------------- - # text/enhanced + # from text/enhanced #---------------------------------------------------------------------- set string "What?\nNever mind, buddy" @@ -88,7 +88,7 @@ aa_equals "" [ad_html_text_convert -from "text/enhanced" -to "text/plain" -truncate_len 15 -- $string] "What?\n_Never..." #---------------------------------------------------------------------- - # text/plain + # from text/plain #---------------------------------------------------------------------- set string "What?\nNever mind, buddy" @@ -100,7 +100,7 @@ "What?\nNever..." #---------------------------------------------------------------------- - # text/fixed-width + # from text/fixed-width #---------------------------------------------------------------------- set string "What?\nNever mind, buddy" @@ -113,7 +113,7 @@ #---------------------------------------------------------------------- - # text/html + # from text/html #---------------------------------------------------------------------- set string "What?
Never mind, buddy" @@ -123,8 +123,10 @@ aa_equals "" [ad_html_text_convert -from "text/html" -to "text/plain" -truncate_len 15 -- $string] \ "What?\n_Never..." - + set long_string [string repeat "Very long text. " 10] + aa_equals "No truncation" [ad_html_text_convert -from "text/html" -to "text/html" -truncate_len [string length $long_string] -- $long_string] $long_string + } aa_register_case string_truncate { @@ -139,4 +141,8 @@ aa_equals "" [string_truncate -len 11 -ellipsis "" -- "foobar greble"] "foobar" aa_equals "" [string_truncate -len 12 -ellipsis "" -- "foobar greble"] "foobar" aa_equals "" [string_truncate -len 13 -ellipsis "" -- "foobar greble"] "foobar greble" + + set long_string [string repeat "Very long text. " 100] + aa_equals "No truncation" [string_truncate -len [string length $long_string] -- $long_string] $long_string + }