diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-04 20:49:58 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-04 20:49:58 +0100 |
commit | 28055028a709020ba7eb44f9e5037d0a952b51d6 (patch) | |
tree | bb5dc7052f04e66ad74bbbcc9917d638cd603b24 /testsuite | |
parent | d2b1ba6fdee59645763e915ade3ec55e67d5839a (diff) | |
download | busybox-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-x | testsuite/fold.tests | 49 |
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 | ||
9 | testing "fold -s" "fold -w 7 -s" \ | 9 | testing "fold -s" "fold -w 7 -s" \ |
10 | "123456\n\t\nasdf" \ | 10 | "123456\n\t\nasdf" \ |
11 | "" \ | ||
12 | "123456\tasdf" \ | ||
13 | |||
14 | testing "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 | |||
19 | testing "fold with NULs" "fold -sw22" \ | ||
20 | "\ | ||
21 | The NUL is here:>\0< \n\ | ||
22 | and another one is \n\ | ||
23 | here:>\0< - they must \n\ | ||
24 | be preserved | ||
25 | " \ | ||
26 | "" \ | ||
27 | "The NUL is here:>\0< and another one \ | ||
28 | is here:>\0< - they must be preserved | ||
29 | " \ | ||
30 | |||
31 | # The text was taken from English and Ukrainian wikipedia pages | ||
32 | testing "fold -sw66 with unicode input" "fold -sw66" \ | ||
33 | "\ | ||
34 | The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \n\ | ||
35 | Messier 31, M31, or NGC224; often referred to as the Great \n\ | ||
36 | Andromeda Nebula in older texts) is a spiral galaxy approximately \n\ | ||
37 | 2,500,000 light-years (1.58×10^11 AU) away in the constellation \n\ | ||
38 | Andromeda. It is the nearest spiral galaxy to our own, the Milky \n\ | ||
39 | Way.\n\ | ||
40 | Галактика або Туманність Андромеди (також відома як M31 за \n\ | ||
41 | каталогом Мессьє та NGC224 за Новим загальним каталогом) — \n\ | ||
42 | спіральна галактика, що знаходиться на відстані приблизно у 2,5 \n\ | ||
43 | мільйони світлових років від нашої планети у сузір'ї Андромеди. \n\ | ||
44 | На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \ | ||
11 | "" \ | 45 | "" \ |
12 | "123456\tasdf" \ | 46 | "\ |
47 | The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \ | ||
48 | Messier 31, M31, or NGC224; often referred to as the Great \ | ||
49 | Andromeda Nebula in older texts) is a spiral galaxy approximately \ | ||
50 | 2,500,000 light-years (1.58×10^11 AU) away in the constellation \ | ||
51 | Andromeda. It is the nearest spiral galaxy to our own, the Milky \ | ||
52 | Way. | ||
53 | Галактика або Туманність Андромеди (також відома як M31 за \ | ||
54 | каталогом Мессьє та NGC224 за Новим загальним каталогом) — \ | ||
55 | спіральна галактика, що знаходиться на відстані приблизно у 2,5 \ | ||
56 | мільйони світлових років від нашої планети у сузір'ї Андромеди. \ | ||
57 | На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \ | ||
13 | 58 | ||
14 | exit $FAILCOUNT | 59 | exit $FAILCOUNT |