#! /bin/env tclsh
proc suite_main {} {
package require {ycl list}
namespace import [yclprefix]::list::sl
package require {ycl test}
[yclprefix]::test::init
variable cleanup1
namespace upvar [yclprefix]::test cleanup1 cleanup1
package require [list ycl text]
namespace import [yclprefix]::text
test ftclp {} -body {
lappend res [text ftclp hello]
lappend res [text ftclp hello\n]
lappend res [text ftclp hello\\n]
lappend res [text ftclp "hello there\n"]
} -cleanup $cleanup1 -result [sl {
hello
{hello\n}
{hello\x5cn}
{hello there\n}
}]
test ftclp_hex {} -body {
lappend res [text ftclp hello]
lappend res [text ftclp hello\n hex true]
lappend res [text ftclp hello\\n hex true]
lappend res [text ftclp "hello there\n" hex true]
} -cleanup $cleanup1 -result [sl {
hello
hello\\x0a
{hello\x5cn}
{hello there\x0a}
}]
cleanupTests
}