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 -N -r1.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 15 Feb 2004 11:15:43 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 24 Feb 2005 22:12:21 -0000 1.7 @@ -131,7 +131,8 @@ aa_register_case -cats {api smoke} string_truncate { Testing string truncation } { - aa_equals "" [string_truncate -len 5 -ellipsis "" -- "foobar greble"] "" + aa_equals "" [string_truncate -len 5 -ellipsis "" -- "foo"] "foo" + aa_equals "" [string_truncate -len 5 -ellipsis "" -- "foobar greble"] "fooba" aa_equals "" [string_truncate -len 6 -ellipsis "" -- "foobar greble"] "foobar" aa_equals "" [string_truncate -len 7 -ellipsis "" -- "foobar greble"] "foobar" aa_equals "" [string_truncate -len 8 -ellipsis "" -- "foobar greble"] "foobar" @@ -141,6 +142,17 @@ aa_equals "" [string_truncate -len 12 -ellipsis "" -- "foobar greble"] "foobar" aa_equals "" [string_truncate -len 13 -ellipsis "" -- "foobar greble"] "foobar greble" + aa_equals "" [string_truncate -len 5 -ellipsis "..." -- "foo"] "foo" + aa_equals "" [string_truncate -len 5 -ellipsis "..." -- "foobar greble"] "fo..." + aa_equals "" [string_truncate -len 6 -ellipsis "..." -- "foobar greble"] "foo..." + aa_equals "" [string_truncate -len 7 -ellipsis "..." -- "foobar greble"] "foob..." + aa_equals "" [string_truncate -len 8 -ellipsis "..." -- "foobar greble"] "fooba..." + aa_equals "" [string_truncate -len 9 -ellipsis "..." -- "foobar greble"] "foobar..." + aa_equals "" [string_truncate -len 10 -ellipsis "..." -- "foobar greble"] "foobar..." + 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