aboutsummaryrefslogtreecommitdiff
path: root/testsuite/ls.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-31 05:15:38 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-31 05:15:38 +0100
commitd8528b8e56bab7643722e4453121882d23c23c07 (patch)
treec742df066326cd571327b10d4cca3341c798d129 /testsuite/ls.tests
parented910c750d7908a31262488e04d38b7bf3d75322 (diff)
downloadbusybox-w32-d8528b8e56bab7643722e4453121882d23c23c07.tar.gz
busybox-w32-d8528b8e56bab7643722e4453121882d23c23c07.tar.bz2
busybox-w32-d8528b8e56bab7643722e4453121882d23c23c07.zip
ls: unicode fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/ls.tests')
-rwxr-xr-xtestsuite/ls.tests136
1 files changed, 136 insertions, 0 deletions
diff --git a/testsuite/ls.tests b/testsuite/ls.tests
new file mode 100755
index 000000000..b0c5da7f9
--- /dev/null
+++ b/testsuite/ls.tests
@@ -0,0 +1,136 @@
1#!/bin/sh
2# Copyright 2010 by Denys Vlasenko
3# Licensed under GPL v2, see file LICENSE for details.
4
5. ./testing.sh
6
7test -f "$bindir/.config" && . "$bindir/.config"
8
9rm -rf ls.testdir >/dev/null
10mkdir ls.testdir || exit 1
11
12# testing "test name" "command" "expected result" "file input" "stdin"
13
14# The test isn't passing correctly now - all | chars should line up
15# perfectly in the correctly passed test.
16test x"$CONFIG_FEATURE_ASSUME_UNICODE" = x"y" \
17&& test x"$CONFIG_SUBST_WCHAR" = x"63" \
18&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"767" \
19&& testing "ls unicode test" \
20"(cd ls.testdir && sh ../ls.mk_uni_tests) && ls -1 ls.testdir" \
21'0001_1__Some_correct_UTF-8_text___________________________________________|
220002_2__Boundary_condition_test_cases_____________________________________|
230003_2.1__First_possible_sequence_of_a_certain_length_____________________|
240004_2.1.2__2_bytes__U-00000080_:________"?"______________________________|
250005_2.1.3__3_bytes__U-00000800_:________"?"______________________________|
260006_2.1.4__4_bytes__U-00010000_:________"?"______________________________|
270007_2.1.5__5_bytes__U-00200000_:________"?"______________________________|
280008_2.1.6__6_bytes__U-04000000_:________"?"______________________________|
290009_2.2__Last_possible_sequence_of_a_certain_length______________________|
300010_2.2.1__1_byte___U-0000007F_:________"?"______________________________|
310011_2.2.2__2_bytes__U-000007FF_:________"?"______________________________|
320012_2.2.3__3_bytes__U-0000FFFF_:________"?"______________________________|
330013_2.2.4__4_bytes__U-001FFFFF_:________"?"______________________________|
340014_2.2.5__5_bytes__U-03FFFFFF_:________"?"______________________________|
350015_2.2.6__6_bytes__U-7FFFFFFF_:________"?"______________________________|
360016_2.3__Other_boundary_conditions_______________________________________|
370017_2.3.1__U-0000D7FF_=_ed_9f_bf_=_"?"___________________________________|
380018_2.3.2__U-0000E000_=_ee_80_80_=_"?"___________________________________|
390019_2.3.3__U-0000FFFD_=_ef_bf_bd_=_"?"___________________________________|
400020_2.3.4__U-0010FFFF_=_f4_8f_bf_bf_=_"?"________________________________|
410021_2.3.5__U-00110000_=_f4_90_80_80_=_"?"________________________________|
420022_3__Malformed_sequences_______________________________________________|
430023_3.1__Unexpected_continuation_bytes___________________________________|
440024_3.1.1__First_continuation_byte_0x80:_"?"_____________________________|
450025_3.1.2__Last__continuation_byte_0xbf:_"?"_____________________________|
460026_3.1.3__2_continuation_bytes:_"??"____________________________________|
470027_3.1.4__3_continuation_bytes:_"???"___________________________________|
480028_3.1.5__4_continuation_bytes:_"????"__________________________________|
490029_3.1.6__5_continuation_bytes:_"?????"_________________________________|
500030_3.1.7__6_continuation_bytes:_"??????"________________________________|
510031_3.1.8__7_continuation_bytes:_"???????"_______________________________|
520032_3.1.9__Sequence_of_all_64_possible_continuation_bytes__0x80-0xbf_:___|
530033____"????????????????_________________________________________________|
540034_____????????????????_________________________________________________|
550035_____????????????????_________________________________________________|
560036_____????????????????"________________________________________________|
570037_3.2__Lonely_start_characters_________________________________________|
580038_3.2.1__All_32_first_bytes_of_2-byte_sequences__0xc0-0xdf_,___________|
590039________each_followed_by_a_space_character:___________________________|
600040____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?__________________________________|
610041_____?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
620042_3.2.2__All_16_first_bytes_of_3-byte_sequences__0xe0-0xef_,___________|
630043________each_followed_by_a_space_character:___________________________|
640044____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
650045_3.2.3__All_8_first_bytes_of_4-byte_sequences__0xf0-0xf7_,____________|
660046________each_followed_by_a_space_character:___________________________|
670047____"?_?_?_?_?_?_?_?_"________________________________________________|
680048_3.2.4__All_4_first_bytes_of_5-byte_sequences__0xf8-0xfb_,____________|
690049________each_followed_by_a_space_character:___________________________|
700050____"?_?_?_?_"________________________________________________________|
710051_3.2.5__All_2_first_bytes_of_6-byte_sequences__0xfc-0xfd_,____________|
720052________each_followed_by_a_space_character:___________________________|
730053____"?_?_"____________________________________________________________|
740054_3.3__Sequences_with_last_continuation_byte_missing___________________|
750055_3.3.1__2-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
760056_3.3.2__3-byte_sequence_with_last_byte_missing__U+0000_:_____"??"______|
770057_3.3.3__4-byte_sequence_with_last_byte_missing__U+0000_:_____"???"______|
780058_3.3.4__5-byte_sequence_with_last_byte_missing__U+0000_:_____"????"______|
790059_3.3.5__6-byte_sequence_with_last_byte_missing__U+0000_:_____"?????"______|
800060_3.3.6__2-byte_sequence_with_last_byte_missing__U-000007FF_:_"?"______|
810061_3.3.7__3-byte_sequence_with_last_byte_missing__U-0000FFFF_:_"??"______|
820062_3.3.8__4-byte_sequence_with_last_byte_missing__U-001FFFFF_:_"???"______|
830063_3.3.9__5-byte_sequence_with_last_byte_missing__U-03FFFFFF_:_"????"______|
840064_3.3.10_6-byte_sequence_with_last_byte_missing__U-7FFFFFFF_:_"?????"______|
850065_3.4__Concatenation_of_incomplete_sequences___________________________|
860066____"??????????????????????????????"______________________________________________________|
870067_3.5__Impossible_bytes________________________________________________|
880068_3.5.1__fe_=_"?"______________________________________________________|
890069_3.5.2__ff_=_"?"______________________________________________________|
900070_3.5.3__fe_fe_ff_ff_=_"????"__________________________________________|
910071_4__Overlong_sequences________________________________________________|
920072_4.1__Examples_of_an_overlong_ASCII_character_________________________|
930073_4.1.1_U+002F_=_c0_af_____________=_"??"_______________________________|
940074_4.1.2_U+002F_=_e0_80_af__________=_"???"_______________________________|
950075_4.1.3_U+002F_=_f0_80_80_af_______=_"????"_______________________________|
960076_4.1.4_U+002F_=_f8_80_80_80_af____=_"?????"_______________________________|
970077_4.1.5_U+002F_=_fc_80_80_80_80_af_=_"??????"_______________________________|
980078_4.2__Maximum_overlong_sequences______________________________________|
990079_4.2.1__U-0000007F_=_c1_bf_____________=_"??"__________________________|
1000080_4.2.2__U-000007FF_=_e0_9f_bf__________=_"?"__________________________|
1010081_4.2.3__U-0000FFFF_=_f0_8f_bf_bf_______=_"?"__________________________|
1020082_4.2.4__U-001FFFFF_=_f8_87_bf_bf_bf____=_"?"__________________________|
1030083_4.2.5__U-03FFFFFF_=_fc_83_bf_bf_bf_bf_=_"?"__________________________|
1040084_4.3__Overlong_representation_of_the_NUL_character____________________|
1050085_4.3.1__U+0000_=_c0_80_____________=_"??"______________________________|
1060086_4.3.2__U+0000_=_e0_80_80__________=_"???"______________________________|
1070087_4.3.3__U+0000_=_f0_80_80_80_______=_"????"______________________________|
1080088_4.3.4__U+0000_=_f8_80_80_80_80____=_"?????"______________________________|
1090089_4.3.5__U+0000_=_fc_80_80_80_80_80_=_"??????"______________________________|
1100090_5__Illegal_code_positions____________________________________________|
1110091_5.1_Single_UTF-16_surrogates_________________________________________|
1120092_5.1.1__U+D800_=_ed_a0_80_=_"?"_______________________________________|
1130093_5.1.2__U+DB7F_=_ed_ad_bf_=_"?"_______________________________________|
1140094_5.1.3__U+DB80_=_ed_ae_80_=_"?"_______________________________________|
1150095_5.1.4__U+DBFF_=_ed_af_bf_=_"?"_______________________________________|
1160096_5.1.5__U+DC00_=_ed_b0_80_=_"?"_______________________________________|
1170097_5.1.6__U+DF80_=_ed_be_80_=_"?"_______________________________________|
1180098_5.1.7__U+DFFF_=_ed_bf_bf_=_"?"_______________________________________|
1190099_5.2_Paired_UTF-16_surrogates_________________________________________|
1200100_5.2.1__U+D800_U+DC00_=_ed_a0_80_ed_b0_80_=_"??"______________________|
1210101_5.2.2__U+D800_U+DFFF_=_ed_a0_80_ed_bf_bf_=_"??"______________________|
1220102_5.2.3__U+DB7F_U+DC00_=_ed_ad_bf_ed_b0_80_=_"??"______________________|
1230103_5.2.4__U+DB7F_U+DFFF_=_ed_ad_bf_ed_bf_bf_=_"??"______________________|
1240104_5.2.5__U+DB80_U+DC00_=_ed_ae_80_ed_b0_80_=_"??"______________________|
1250105_5.2.6__U+DB80_U+DFFF_=_ed_ae_80_ed_bf_bf_=_"??"______________________|
1260106_5.2.7__U+DBFF_U+DC00_=_ed_af_bf_ed_b0_80_=_"??"______________________|
1270107_5.2.8__U+DBFF_U+DFFF_=_ed_af_bf_ed_bf_bf_=_"??"______________________|
1280108_5.3_Other_illegal_code_positions_____________________________________|
1290109_5.3.1__U+FFFE_=_ef_bf_be_=_"?"_______________________________________|
1300110_5.3.2__U+FFFF_=_ef_bf_bf_=_"?"_______________________________________|
131' "" ""
132
133# Clean up
134rm -rf ls.testdir 2>/dev/null
135
136exit $FAILCOUNT