comparison src/testdir/test_options.vim @ 14617:56ceaa0ad239 v8.1.0322

patch 8.1.0322: Test_copy_winopt() does not restore 'hidden' commit https://github.com/vim/vim/commit/7cb33a14c943c0b87dc61c1da438a443f8a43782 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 23 22:20:35 2018 +0200 patch 8.1.0322: Test_copy_winopt() does not restore 'hidden' Problem: Test_copy_winopt() does not restore 'hidden'. Solution: Restore the option, fix indent. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/3367)
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Aug 2018 22:30:06 +0200
parents b6b2f7d69c7f
children cf4d6489c9eb
comparison
equal deleted inserted replaced
14616:9cdbe847b184 14617:56ceaa0ad239
348 endif 348 endif
349 endfor 349 endfor
350 endfunc 350 endfunc
351 351
352 func Test_copy_winopt() 352 func Test_copy_winopt()
353 set hidden 353 set hidden
354 354
355 " Test copy option from current buffer in window 355 " Test copy option from current buffer in window
356 split 356 split
357 enew 357 enew
358 setlocal numberwidth=5 358 setlocal numberwidth=5
359 wincmd w 359 wincmd w
360 call assert_equal(4,&numberwidth) 360 call assert_equal(4,&numberwidth)
361 bnext 361 bnext
362 call assert_equal(5,&numberwidth) 362 call assert_equal(5,&numberwidth)
363 bw! 363 bw!
364 call assert_equal(4,&numberwidth) 364 call assert_equal(4,&numberwidth)
365 365
366 " Test copy value from window that used to be display the buffer 366 " Test copy value from window that used to be display the buffer
367 split 367 split
368 enew 368 enew
369 setlocal numberwidth=6 369 setlocal numberwidth=6
370 bnext 370 bnext
371 wincmd w 371 wincmd w
372 call assert_equal(4,&numberwidth) 372 call assert_equal(4,&numberwidth)
373 bnext 373 bnext
374 call assert_equal(6,&numberwidth) 374 call assert_equal(6,&numberwidth)
375 bw! 375 bw!
376 376
377 " Test that if buffer is current, don't use the stale cached value 377 " Test that if buffer is current, don't use the stale cached value
378 " from the last time the buffer was displayed. 378 " from the last time the buffer was displayed.
379 split 379 split
380 enew 380 enew
381 setlocal numberwidth=7 381 setlocal numberwidth=7
382 bnext 382 bnext
383 bnext 383 bnext
384 setlocal numberwidth=8 384 setlocal numberwidth=8
385 wincmd w 385 wincmd w
386 call assert_equal(4,&numberwidth) 386 call assert_equal(4,&numberwidth)
387 bnext 387 bnext
388 call assert_equal(8,&numberwidth) 388 call assert_equal(8,&numberwidth)
389 bw! 389 bw!
390 390
391 " Test value is not copied if window already has seen the buffer 391 " Test value is not copied if window already has seen the buffer
392 enew 392 enew
393 split 393 split
394 setlocal numberwidth=9 394 setlocal numberwidth=9
395 bnext 395 bnext
396 setlocal numberwidth=10 396 setlocal numberwidth=10
397 wincmd w 397 wincmd w
398 call assert_equal(4,&numberwidth) 398 call assert_equal(4,&numberwidth)
399 bnext 399 bnext
400 call assert_equal(4,&numberwidth) 400 call assert_equal(4,&numberwidth)
401 bw! 401 bw!
402
403 set hidden&
402 endfunc 404 endfunc
403 405
404 func Test_shortmess_F() 406 func Test_shortmess_F()
405 new 407 new
406 call assert_match('\[No Name\]', execute('file')) 408 call assert_match('\[No Name\]', execute('file'))