[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Didn't investigate myself yet, but zap0 posted the below in #allegro.
All other tests work fine. He was on XP and compiled Allegro 4.9.19 with
MSVC9.
# t19
OK al_ustr_insert_chr(us, 0, 'a') == 1
OK al_ustr_insert_chr(us, 0, L'æ') == 2
FAIL al_ustr_insert_chr(us, 2, L'€') == 3
FAIL 0 == strcmp(al_cstr(us), "æ€a")
OK al_ustr_insert_chr(us, 8, L'ö') == 2
FAIL 0 == memcmp(al_cstr(us), "æ€a\0\0ö", 9)
OK al_ustr_insert_chr(us, 0, -1) == 0
OK al_ustr_insert_chr(us, 0, 0x110000) == 0
# t20
OK al_ustr_append_chr(us, 'a') == 1
OK al_ustr_append_chr(us, L'æ') == 2
FAIL al_ustr_append_chr(us, L'€') == 3
FAIL 0 == strcmp(al_cstr(us), "aæ€")
OK al_ustr_append_chr(us, -1) == 0
OK al_ustr_append_chr(us, 0x110000) == 0
# t29
OK al_ustr_get_next(us, &pos) == 'a'
FAIL al_ustr_get_next(us, &pos) == L'þ'
FAIL al_ustr_get_next(us, &pos) == L'€'
OK al_ustr_get_next(us, &pos) == -1
OK pos == (int) al_ustr_size(us)
OK al_ustr_get_next(us, &pos) == -2
FAIL al_ustr_get_next(us, &pos) == L'€'
# t30
FAIL al_ustr_prev_get(us, &pos) == L'€'
FAIL al_ustr_prev_get(us, &pos) == L'þ'
OK al_ustr_prev_get(us, &pos) == 'a'
OK al_ustr_prev_get(us, &pos) == -1
FAIL al_ustr_prev_get(us, &pos) == L'þ'
# t31
OK al_ustr_find_chr(us, 0, 'e') == 7
OK al_ustr_find_chr(us, 7, 'e') == 7
OK al_ustr_find_chr(us, 8, 'e') == 23
OK al_ustr_find_chr(us, 0, '.') == -1
FAIL al_ustr_find_chr(us, 0, L'ð') == 5
FAIL al_ustr_find_chr(us, 5, L'ð') == 5
FAIL al_ustr_find_chr(us, 6, L'ð') == 21
OK al_ustr_find_chr(us, 0, L'ƶ') == -1
# t32
OK al_ustr_rfind_chr(us, end, 'e') == 23
OK al_ustr_rfind_chr(us, 23, 'e') == 7
OK al_ustr_rfind_chr(us, end, '.') == -1
FAIL al_ustr_rfind_chr(us, end, L'Ã') == 30
FAIL al_ustr_rfind_chr(us, end - 1, L'Ã') == 14
OK al_ustr_rfind_chr(us, end, L'ƶ') == -1
# t42
OK al_ustr_set_chr(us, 1, 'B') == 1
OK 0 == strcmp(al_cstr(us), "aBcdef")
OK 6 == al_ustr_size(us)
OK al_ustr_set_chr(us, 1, L'β') == 2
FAIL 0 == strcmp(al_cstr(us), "aβcdef")
OK 7 == al_ustr_size(us)
FAIL al_ustr_set_chr(us, 5, L'á´ˆ') == 3
FAIL 0 == strcmp(al_cstr(us), "aβcdᴈf")
FAIL 9 == al_ustr_size(us)
OK al_ustr_set_chr(us, 5, L'É™') == 2
FAIL 0 == strcmp(al_cstr(us), "aβcdəf")
OK 8 == al_ustr_size(us)
FAIL al_ustr_set_chr(us, al_ustr_size(us), L'á¿·') == 3
FAIL 0 == strcmp(al_cstr(us), "aβcdəfῷ")
FAIL 11 == al_ustr_size(us)
FAIL al_ustr_set_chr(us, al_ustr_size(us) + 2, L'â‘') == 3
FAIL 0 == memcmp(al_cstr(us), "aβcdÉ™fá¿·\0\0â‘", 16)
FAIL 16 == al_ustr_size(us)
OK al_ustr_set_chr(us, -1, L'â‘') == 0
FAIL 16 == al_ustr_size(us)