2009-11-04 20:01:19 +05:30
|
|
|
|
#!/bin/sh
|
|
|
|
|
# Copyright 2009 by Denys Vlasenko
|
2010-08-16 23:44:46 +05:30
|
|
|
|
# Licensed under GPLv2, see file LICENSE in this source tree.
|
2009-11-04 20:01:19 +05:30
|
|
|
|
|
2009-11-05 05:11:22 +05:30
|
|
|
|
. ./testing.sh
|
2010-07-06 01:07:12 +05:30
|
|
|
|
test -f "$bindir/.config" && . "$bindir/.config"
|
2009-11-04 20:01:19 +05:30
|
|
|
|
|
|
|
|
|
# testing "test name" "options" "expected result" "file input" "stdin"
|
|
|
|
|
|
|
|
|
|
testing "fold -s" "fold -w 7 -s" \
|
2010-01-05 01:19:58 +05:30
|
|
|
|
"123456\n\t\nasdf" \
|
|
|
|
|
"" \
|
|
|
|
|
"123456\tasdf" \
|
|
|
|
|
|
|
|
|
|
testing "fold -w1" "fold -w1" \
|
|
|
|
|
"q\nq\n \nw\n \ne\ne\ne\n \nr\n \nt\nt\nt\nt\n \ny" \
|
|
|
|
|
"" \
|
|
|
|
|
"qq w eee r tttt y" \
|
|
|
|
|
|
|
|
|
|
testing "fold with NULs" "fold -sw22" \
|
|
|
|
|
"\
|
|
|
|
|
The NUL is here:>\0< \n\
|
|
|
|
|
and another one is \n\
|
|
|
|
|
here:>\0< - they must \n\
|
|
|
|
|
be preserved
|
|
|
|
|
" \
|
|
|
|
|
"" \
|
|
|
|
|
"The NUL is here:>\0< and another one \
|
|
|
|
|
is here:>\0< - they must be preserved
|
|
|
|
|
" \
|
|
|
|
|
|
|
|
|
|
# The text was taken from English and Ukrainian wikipedia pages
|
2010-07-06 01:07:12 +05:30
|
|
|
|
test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
|
|
|
|
|
&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
|
|
|
|
|
&& testing "fold -sw66 with unicode input" "fold -sw66" \
|
2010-01-05 01:19:58 +05:30
|
|
|
|
"\
|
|
|
|
|
The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \n\
|
|
|
|
|
Messier 31, M31, or NGC224; often referred to as the Great \n\
|
|
|
|
|
Andromeda Nebula in older texts) is a spiral galaxy approximately \n\
|
|
|
|
|
2,500,000 light-years (1.58×10^11 AU) away in the constellation \n\
|
|
|
|
|
Andromeda. It is the nearest spiral galaxy to our own, the Milky \n\
|
|
|
|
|
Way.\n\
|
|
|
|
|
Галактика або Туманність Андромеди (також відома як M31 за \n\
|
|
|
|
|
каталогом Мессьє та NGC224 за Новим загальним каталогом) — \n\
|
|
|
|
|
спіральна галактика, що знаходиться на відстані приблизно у 2,5 \n\
|
|
|
|
|
мільйони світлових років від нашої планети у сузір'ї Андромеди. \n\
|
|
|
|
|
На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \
|
2009-11-04 20:01:19 +05:30
|
|
|
|
"" \
|
2010-01-05 01:19:58 +05:30
|
|
|
|
"\
|
|
|
|
|
The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \
|
|
|
|
|
Messier 31, M31, or NGC224; often referred to as the Great \
|
|
|
|
|
Andromeda Nebula in older texts) is a spiral galaxy approximately \
|
|
|
|
|
2,500,000 light-years (1.58×10^11 AU) away in the constellation \
|
|
|
|
|
Andromeda. It is the nearest spiral galaxy to our own, the Milky \
|
|
|
|
|
Way.
|
|
|
|
|
Галактика або Туманність Андромеди (також відома як M31 за \
|
|
|
|
|
каталогом Мессьє та NGC224 за Новим загальним каталогом) — \
|
|
|
|
|
спіральна галактика, що знаходиться на відстані приблизно у 2,5 \
|
|
|
|
|
мільйони світлових років від нашої планети у сузір'ї Андромеди. \
|
2010-05-10 09:23:16 +05:30
|
|
|
|
На початку ХХІ ст. в центрі галактики виявлено чорну дірку."
|
2009-11-04 20:01:19 +05:30
|
|
|
|
|
|
|
|
|
exit $FAILCOUNT
|