aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-04 20:49:58 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-04 20:49:58 +0100
commit28055028a709020ba7eb44f9e5037d0a952b51d6 (patch)
treebb5dc7052f04e66ad74bbbcc9917d638cd603b24 /testsuite
parentd2b1ba6fdee59645763e915ade3ec55e67d5839a (diff)
downloadbusybox-w32-28055028a709020ba7eb44f9e5037d0a952b51d6.tar.gz
busybox-w32-28055028a709020ba7eb44f9e5037d0a952b51d6.tar.bz2
busybox-w32-28055028a709020ba7eb44f9e5037d0a952b51d6.zip
fold: unicode support. Based on a patch by Tomas Heinrich <heinrich.tomas@gmail.com>
General Unicode support is tweaked to expose unicode_status. function old new delta init_unicode - 77 +77 write2stdout - 19 +19 adjust_column 68 71 +3 unicode_status - 1 +1 unicode_is_enabled 1 - -1 grep_main 780 773 -7 fold_main 619 552 -67 check_unicode_in_env 77 - -77 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/fold.tests49
1 files changed, 47 insertions, 2 deletions
diff --git a/testsuite/fold.tests b/testsuite/fold.tests
index ca0e511c1..17721a180 100755
--- a/testsuite/fold.tests
+++ b/testsuite/fold.tests
@@ -7,8 +7,53 @@
7# testing "test name" "options" "expected result" "file input" "stdin" 7# testing "test name" "options" "expected result" "file input" "stdin"
8 8
9testing "fold -s" "fold -w 7 -s" \ 9testing "fold -s" "fold -w 7 -s" \
10 "123456\n\t\nasdf" \ 10 "123456\n\t\nasdf" \
11 "" \
12 "123456\tasdf" \
13
14testing "fold -w1" "fold -w1" \
15 "q\nq\n \nw\n \ne\ne\ne\n \nr\n \nt\nt\nt\nt\n \ny" \
16 "" \
17 "qq w eee r tttt y" \
18
19testing "fold with NULs" "fold -sw22" \
20 "\
21The NUL is here:>\0< \n\
22and another one is \n\
23here:>\0< - they must \n\
24be preserved
25" \
26 "" \
27 "The NUL is here:>\0< and another one \
28is here:>\0< - they must be preserved
29" \
30
31# The text was taken from English and Ukrainian wikipedia pages
32testing "fold -sw66 with unicode input" "fold -sw66" \
33 "\
34The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \n\
35Messier 31, M31, or NGC224; often referred to as the Great \n\
36Andromeda Nebula in older texts) is a spiral galaxy approximately \n\
372,500,000 light-years (1.58×10^11 AU) away in the constellation \n\
38Andromeda. It is the nearest spiral galaxy to our own, the Milky \n\
39Way.\n\
40Галактика або Туманність Андромеди (також відома як M31 за \n\
41каталогом Мессьє та NGC224 за Новим загальним каталогом) — \n\
42спіральна галактика, що знаходиться на відстані приблизно у 2,5 \n\
43мільйони світлових років від нашої планети у сузір'ї Андромеди. \n\
44На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \
11 "" \ 45 "" \
12 "123456\tasdf" \ 46 "\
47The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \
48Messier 31, M31, or NGC224; often referred to as the Great \
49Andromeda Nebula in older texts) is a spiral galaxy approximately \
502,500,000 light-years (1.58×10^11 AU) away in the constellation \
51Andromeda. It is the nearest spiral galaxy to our own, the Milky \
52Way.
53Галактика або Туманність Андромеди (також відома як M31 за \
54каталогом Мессьє та NGC224 за Новим загальним каталогом) — \
55спіральна галактика, що знаходиться на відстані приблизно у 2,5 \
56мільйони світлових років від нашої планети у сузір'ї Андромеди. \
57На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \
13 58
14exit $FAILCOUNT 59exit $FAILCOUNT