1 use Test::More tests => 11;
10 is(trim("hello"), "hello", "hello");
11 is(trim("hello "), "hello", "hello ");
12 is(trim(" hello"), "hello", " hello");
13 is(trim(" hello "), "hello", " hello ");
14 is(trim(" h el lo "), "h el lo", " h el lo ");
15 is(trim("\n\t\rh\nello"), "h\nello", "line feed, horizontal tab, carriage return; line feed within word");
16 is(trim("\x{a0}h\nello"), "h\nello", "non-breaking space");
17 is(trim("h\nello\n\t\r"), "h\nello", "line feed, horizontal tab, carriage return; line feed within word");
18 is(trim("h\nello\x{a0}"), "h\nello", "non-breaking space");
19 is(trim("h\ne\x{a0}llo\x{a0}"), "h\ne\x{a0}llo", "non-breaking space within word");
20 is(trim(undef), undef, "undef");