Patch 8.1.1501
Problem:    New behavior of b:changedtick not tested.
Solution:   Add a few test cases. (Daniel Hahler)
Files:      src/testdir/test_changedtick.vim


*** ../vim-8.1.1500/src/testdir/test_changedtick.vim    2017-02-21 
20:39:05.000000000 +0100
--- src/testdir/test_changedtick.vim    2019-06-08 20:43:52.668814069 +0200
***************
*** 55,57 ****
--- 55,95 ----
    call assert_fails('unlet d["changedtick"]', 'E46:')
  
  endfunc
+ 
+ func Test_changedtick_not_incremented_with_write()
+   new
+   let fname = "XChangeTick"
+   exe 'w ' .. fname
+ 
+   " :write when the buffer is not changed does not increment changedtick
+   let expected = b:changedtick
+   w
+   call assert_equal(expected, b:changedtick)
+ 
+   " :write when the buffer IS changed DOES increment changedtick
+   let expected = b:changedtick + 1
+   setlocal modified
+   w
+   call assert_equal(expected, b:changedtick)
+ 
+   " Two ticks: change + write
+   let expected = b:changedtick + 2
+   call setline(1, 'hello')
+   w
+   call assert_equal(expected, b:changedtick)
+ 
+   " Two ticks: start insert + write
+   let expected = b:changedtick + 2
+   normal! o
+   w
+   call assert_equal(expected, b:changedtick)
+ 
+   " Three ticks: start insert + change + write
+   let expected = b:changedtick + 3
+   normal! ochanged
+   w
+   call assert_equal(expected, b:changedtick)
+ 
+   bwipe
+   call delete(fname)
+ endfunc
*** ../vim-8.1.1500/src/version.c       2019-06-08 20:17:14.656519328 +0200
--- src/version.c       2019-06-08 20:47:54.335629423 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1501,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
126. You brag to all of your friends about your date Saturday night...but
     you don't tell them it was only in a chat room.

 /// 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/201906081848.x58Imqjt027817%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui