@@ -338,7 +338,7 @@ static void test_mbcp(void)
338
338
expect_eq (_ismbstrail (mbsonlylead , & mbsonlylead [5 ]), FALSE, int , "%d" );
339
339
340
340
/* _mbsbtype */
341
- expect_eq (_mbsbtype (NULL , 0 ), _MBC_ILLEGAL , int , "%d" );
341
+ skip_2k3_crash expect_eq (_mbsbtype (NULL , 0 ), _MBC_ILLEGAL , int , "%d ");
342
342
expect_eq (_mbsbtype (mbstring , 0 ), _MBC_LEAD , int , "%d" );
343
343
expect_eq (_mbsbtype (mbstring , 1 ), _MBC_TRAIL , int , "%d" );
344
344
expect_eq (_mbsbtype (mbstring , 2 ), _MBC_LEAD , int , "%d" );
@@ -465,6 +465,7 @@ static void test_mbcp(void)
465
465
expect_bin (buf , "\x00\xff" , 2 );
466
466
}
467
467
468
+ skip_2k3_crash {
468
469
errno = 0xdeadbeef ;
469
470
ret = _mbsncpy (NULL , mbstring , 1 );
470
471
ok (ret == NULL , "_mbsncpy returned %p, expected NULL\n" , ret );
@@ -476,6 +477,7 @@ static void test_mbcp(void)
476
477
ok (ret == NULL , "_mbsncpy returned %p, expected NULL\n" , ret );
477
478
ok (errno == EINVAL , "_mbsncpy returned %d\n" , errno );
478
479
expect_bin (buf , "\xff\xff\xff" , 3 );
480
+ }
479
481
480
482
errno = 0xdeadbeef ;
481
483
ret = _mbsncpy (NULL , mbstring , 0 );
@@ -488,6 +490,7 @@ static void test_mbcp(void)
488
490
ok (ret == buf , "_mbsncpy returned %p, expected %sp\n" , ret , buf );
489
491
ok (errno == 0xdeadbeef , "_mbsncpy should not change errno\n" );
490
492
493
+ skip_2k3_crash {
491
494
memset (buf , 0xff , sizeof (buf ));
492
495
errno = 0xdeadbeef ;
493
496
ret = _mbsncpy (NULL , mbstring , 1 );
@@ -499,6 +502,7 @@ static void test_mbcp(void)
499
502
ret = _mbsncpy (buf , NULL , 1 );
500
503
ok (ret == NULL , "_mbsncpy returned %p, expected NULL\n" , ret );
501
504
ok (errno == EINVAL , "_mbsncpy returned %d\n" , errno );
505
+ }
502
506
503
507
memset (buf , 0xff , sizeof (buf ));
504
508
ret = _mbsncpy (NULL , mbstring , 0 );
@@ -724,6 +728,7 @@ static void test_strcmp(void)
724
728
725
729
ret = p_strncmp ( "abc" , "abcd" , 3 );
726
730
ok ( ret == 0 , "wrong ret %d\n" , ret );
731
+ skip_2k3_fail {
727
732
#ifdef _WIN64
728
733
ret = p_strncmp ( "" , "abc" , 3 );
729
734
ok ( ret == -1 , "wrong ret %d\n" , ret );
@@ -739,6 +744,7 @@ static void test_strcmp(void)
739
744
ret = p_strncmp ( "ab\xb0" , "ab\xa0" , 3 );
740
745
ok ( ret == 0xb0 - 0xa0 , "wrong ret %d\n" , ret );
741
746
#endif
747
+ }
742
748
ret = p_strncmp ( "ab\xb0" , "ab\xa0" , 2 );
743
749
ok ( ret == 0 , "wrong ret %d\n" , ret );
744
750
ret = p_strncmp ( "ab\xc2" , "ab\xc2" , 3 );
@@ -3389,6 +3395,7 @@ static void test_tolower(void)
3389
3395
ret = p_tolower ((unsigned char )0xD0 );
3390
3396
ok (ret == 0xF0 , "ret = %x\n" , ret );
3391
3397
3398
+ skip_2k3_fail {
3392
3399
ok (setlocale (LC_ALL , "Japanese_Japan.932" ) != NULL , "setlocale failed.\n" );
3393
3400
errno = 0xdeadbeef ;
3394
3401
ret = p_tolower ((signed char )0xd0 );
@@ -3428,6 +3435,7 @@ static void test_tolower(void)
3428
3435
ret = p_tolower (0xd0 );
3429
3436
ok (ret == 0xd0 , "Got %#x.\n" , ret );
3430
3437
ok (errno == 0xdeadbeef , "Got errno %d.\n" , errno );
3438
+ }
3431
3439
3432
3440
setlocale (LC_ALL , "C" );
3433
3441
}
@@ -3578,7 +3586,7 @@ static void test__stricmp(void)
3578
3586
ret = _stricmp ("abc\xa5\xa1" , "abc" );
3579
3587
ok (ret > 0 , "_stricmp returned %d\n" , ret );
3580
3588
3581
- ok (setlocale (LC_ALL , "Japanese_Japan.932" ) != NULL , "setlocale failed.\n" );
3589
+ skip_2k3_fail ok (setlocale (LC_ALL , "Japanese_Japan .932 ") != NULL, "setlocale failed .\n ");
3582
3590
ret = _stricmp ("test ", "test ");
3583
3591
ok (ret == 0 , "_stricmp returned %d \n ", ret );
3584
3592
ret = _stricmp ("a ", "z ");
@@ -3647,6 +3655,11 @@ static void test__wcstoi64(void)
3647
3655
3648
3656
for (i = 0 ; i < ARRAY_SIZE (tests ); i ++ )
3649
3657
{
3658
+ if ((i == 20 ) && (_winver < 0x600 ))
3659
+ {
3660
+ skip ("Skipping test with i = 20, because it fails on Windows 2003\n" );
3661
+ continue ;
3662
+ }
3650
3663
res = p_wcstoi64 ( tests [i ].str , & endpos , tests [i ].base );
3651
3664
ok ( res == tests [i ].res , "%u: %s res %s\n" ,
3652
3665
i , wine_dbgstr_w (tests [i ].str ), wine_dbgstr_longlong (res ) );
@@ -4867,7 +4880,7 @@ static void test_mbsrev(void)
4867
4880
strcpy ((char * )buf , "\x36\x8c" );
4868
4881
ret = _mbsrev (buf );
4869
4882
ok (ret == buf , "ret = %p, expected %p\n" , ret , buf );
4870
- ok (!memcmp (buf , "\x36" , 2 ), "buf = %s\n" , wine_dbgstr_a ((char * )buf ));
4883
+ skip_2k3_fail ok (!memcmp (buf , "\x36 ", 2 ), "buf = %s\n" , wine_dbgstr_a ((char * )buf ));
4871
4884
4872
4885
_setmbcp (cp );
4873
4886
}
@@ -4985,7 +4998,7 @@ static void test_toupper(void)
4985
4998
errno = 0xdeadbeef ;
4986
4999
ret = p_toupper ((signed char )0xf0 );
4987
5000
ok (ret == 0xd0 , "Got %#x.\n" , ret );
4988
- ok (errno == EILSEQ , "Got errno %d.\n" , errno );
5001
+ skip_2k3_fail ok (errno == EILSEQ , "Got errno %d.\n" , errno );
4989
5002
errno = 0xdeadbeef ;
4990
5003
ret = p_toupper (0xf0 );
4991
5004
ok (ret == 0xd0 , "Got %#x.\n" , ret );
@@ -4995,12 +5008,13 @@ static void test_toupper(void)
4995
5008
errno = 0xdeadbeef ;
4996
5009
ret = p_toupper ((signed char )0xa5 );
4997
5010
ok (ret == 0xa5 , "Got %#x.\n" , ret );
4998
- ok (errno == EILSEQ , "Got errno %d.\n" , errno );
5011
+ skip_2k3_fail ok (errno == EILSEQ , "Got errno %d.\n" , errno );
4999
5012
errno = 0xdeadbeef ;
5000
5013
ret = p_toupper ((signed char )0xb9 );
5001
5014
ok (ret == 0xa5 , "Got %#x.\n" , ret );
5002
- ok (errno == EILSEQ , "Got errno %d.\n" , errno );
5015
+ skip_2k3_fail ok (errno == EILSEQ , "Got errno %d.\n" , errno );
5003
5016
5017
+ skip_2k3_fail {
5004
5018
ok (setlocale (LC_ALL , "Japanese_Japan.932" ) != NULL , "setlocale failed.\n" );
5005
5019
errno = 0xdeadbeef ;
5006
5020
ret = p_toupper ((signed char )0xf0 );
@@ -5020,6 +5034,7 @@ static void test_toupper(void)
5020
5034
ret = p_toupper (0xf0 );
5021
5035
ok (ret == 0xf0 , "Got %#x.\n" , ret );
5022
5036
ok (errno == 0xdeadbeef , "Got errno %d.\n" , errno );
5037
+ }
5023
5038
5024
5039
setlocale (LC_ALL , "C" );
5025
5040
}
0 commit comments