### ----------------------------------------------------
### -- _
### -- Licenses: Artistic-2.0
### -- Authors: Daniel Sockwell
### -- File: t/TextWrap/03-intermediate.rakutest
### ----------------------------------------------------
use Test;
use _;
plan 1;

subtest "Handles basic wide Unicode", {
    my ($s1, $s2) = (q:to/§wide/, q:to/§hani/);
0 1 2 3 4 5 6 7 8 9 10 11 12
０ １ ２ ３ ４ ５ ６ ７ ８ ９
ａ Ｂ Ｃ Ｄ Ｅ Ｆ Ｇ Ｈ Ｉ Ｊ
Ｋ Ｌ Ｍ Ｎ Ｏ Ｐ Ｑ Ｒ Ｓ Ｔ
Ｕ Ｖ Ｗ Ｘ Ｙ Ｚ ａ ｂ ｃ ｄ
ｅ ｆ ｇ ｈ ｉ ｊ ｋ ｌ ｍ ｎ
ｏ ｐ ｑ ｒ ｓ ｔ ｕ ｖ ｗ ｘ
ｙ ｚ
§wide
    泰然自若 to stay clam down . . . . . . .
    日月星辰 the sun, the moon and stars . .
    按部就班 to do things in logical order .
    四海兄弟 friends all around the world. .
    心想事成 all wishes come true. . . . . .
    §hani
say &wrap-words;
    wrap-words($s1.lines.join(' ') ~"\n", :length(30)).&is: $s1, "Handles basic wide unicode";
    wrap-words($s2.lines.join(' ') ~"\n", :length(40)).&is: $s2, "Handles characters from the Han script";
}


