Patch 8.2.0234
Problem:    Message test fails on SunOS.
Solution:   Adjust expectation for printf "%p". (Ozaki Kiichi, closes #5595)
Files:      src/message_test.c


*** ../vim-8.2.0233/src/message_test.c  2020-01-14 22:01:38.866994004 +0100
--- src/message_test.c  2020-02-08 16:58:12.139260686 +0100
***************
*** 240,253 ****
  
        // %p format is not tested in vim script tests Test_printf*()
        // as it only makes sense in C code.
        n = vim_snprintf(buf, bsize, "%p", ptr);
!       assert(n == 10);
!       assert(bsize == 0 || STRNCMP(buf, "0x87654321", bsize_int) == 0);
        assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
  
        n = vim_snprintf(buf, bsize, fmt_012p, ptr);
        assert(n == 12);
!       assert(bsize == 0 || STRNCMP(buf, "0x0087654321", bsize_int) == 0);
        assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
  
        free(buf);
--- 240,265 ----
  
        // %p format is not tested in vim script tests Test_printf*()
        // as it only makes sense in C code.
+       // NOTE: SunOS libc doesn't use the prefix "0x" on %p.
+ #ifdef SUN_SYSTEM
+ # define PREFIX_LEN  0
+ # define PREFIX_STR1 ""
+ # define PREFIX_STR2 "00"
+ #else
+ # define PREFIX_LEN  2
+ # define PREFIX_STR1 "0x"
+ # define PREFIX_STR2 "0x"
+ #endif
        n = vim_snprintf(buf, bsize, "%p", ptr);
!       assert(n == 8 + PREFIX_LEN);
!       assert(bsize == 0
!                    || STRNCMP(buf, PREFIX_STR1 "87654321", bsize_int) == 0);
        assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
  
        n = vim_snprintf(buf, bsize, fmt_012p, ptr);
        assert(n == 12);
!       assert(bsize == 0
!                  || STRNCMP(buf, PREFIX_STR2 "0087654321", bsize_int) == 0);
        assert(bsize == 0 || buf[MIN(n, bsize_int)] == '\0');
  
        free(buf);
*** ../vim-8.2.0233/src/version.c       2020-02-08 16:39:45.427835657 +0100
--- src/version.c       2020-02-08 16:57:06.819526802 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     234,
  /**/

-- 
Never overestimate a man's ability to underestimate a woman.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202002081615.018GFW6d032211%40masaka.moolenaar.net.

Raspunde prin e-mail lui