33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
#
|
|
# Copyright (C) 2020 CismonX <admin@cismon.net>
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty, provided the copyright notice and
|
|
# this notice are preserved. This file is offered as-is, without any warranty.
|
|
#
|
|
|
|
set tool "default"
|
|
set timeout 5
|
|
|
|
# The following code is a modified version of ftp://ftp.madore.org/pub/madore/unlambda/CUAN/Square.unl
|
|
# Written by Panu Kalliokoski <Panu.Kalliokoski@nokia.com>
|
|
set src_stub "`r```si`k``s``s`kk`si``s``si`k``s`k`s`k``sk``sr`k.oir``si%s`k`ki"
|
|
set src_segment ""
|
|
set expected "\n"
|
|
for { set i 0 } { $i < 20 } { incr i } {
|
|
set src_segment "$src_segment``si"
|
|
set line [ string repeat "o" [ expr $i + 1 ] ]
|
|
set square [ string repeat "$line\n" [ expr $i + 1 ] ]
|
|
set expected "$expected\n$square"
|
|
u6a_run [ format $src_stub $src_segment ] - - 0
|
|
expect {
|
|
-ex "$expected" {
|
|
pass "case $i ok!"
|
|
}
|
|
default {
|
|
fail "case $i fails!"
|
|
}
|
|
}
|
|
u6a_stop 0
|
|
}
|