Annotation of embedaddon/php/ext/mbstring/libmbfl/tests/strwidth.tests/strwidth.exp, revision 1.1.1.1

1.1       misho       1: #!/usr/bin/expect -f
                      2: spawn tests/strwidth Japanese UTF-8
                      3: set timeout 1
                      4: 
                      5: expect_after {
                      6:     "\[^\r\n\]*\r\n" { fail $test }
                      7: }
                      8: 
                      9: set test "basic test"
                     10: send "testtest\r"
                     11: expect {
                     12:     "8\r\n" { pass $test }
                     13: }
                     14: 
                     15: set test "CJK kanji"
                     16: send "漢字\r"
                     17: expect {
                     18:     "4\r\n" { pass $test }
                     19: }
                     20: 
                     21: set test "CJK hiragana"
                     22: send "ひらがな\r"
                     23: expect {
                     24:     "8\r\n" { pass $test }
                     25: }
                     26: 
                     27: set test "CJK katakana"
                     28: send "カタカナ\r"
                     29: expect {
                     30:     "8\r\n" { pass $test }
                     31: }
                     32: 
                     33: set test "Fullwidth symbols (1)"
                     34: send "〜!”#$%&’())\r"
                     35: expect {
                     36:     "20\r\n" { pass $test }
                     37: }
                     38: 
                     39: set test "Halfwidth symbols assumed to be fullwidth in JISX0208 (2)"
                     40: send "○●◎\r"
                     41: expect {
                     42:     "3\r\n" { pass $test }
                     43: }
                     44: 
                     45: close
                     46: 
                     47: # vim: sts=4 sw=4 ts=4 et encoding=UTF-8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>