Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> dofile "rect.lua"
> 
> r = Rect.new "a\nbb\nccc"
> = r
a
bb
ccc
> PP(r)
 {1="a", 2="bb", 3="ccc"}
> = r:width()
3
> = r:copy():pad0(1, 4, nil, "d")
a   d
bb
ccc
> = r:copy():pad0(1, 4, "_", "d")
a___d
bb
ccc
> = r:copy():push2("op", "|")
op
|
a
bb
ccc
> = r:copy():push2("op", "|"):pad0(1, r:width()+1, "_")..r:copy():push2(".", "|")
op__.
|   |
a   a
bb  bb
ccc ccc
> = "This => "..r.." <="
This => a   <=
        bb
        ccc
> 
> -- Low-level tests for synconcat, dedconcat, dedroot, dedbar
> = torect("2"):syn1("*"):synconcat(torect("3"))
*__.
|  |
2  3
> = torect("a"):dedconcat(torect("b"))
a  b
> = torect("a"):dedconcat(torect("b")):dedroot("c"):dedbar("-", "foo")
a  b
----foo
c
> = torect("a"):dedconcat(torect("bbbbbb")):dedroot("c"):dedbar("-", "foo")
a  bbbbbb
---------foo
c
> = torect("a"):dedconcat(torect("b")):dedroot("cccccc"):dedbar("-", "foo")
a  b
------foo
cccccc
> 
>