view src/testdir/test_fileformat.vim @ 10603:df1abc85b169 v8.0.0191

patch 8.0.0191: can't build with Ruby on some systems commit https://github.com/vim/vim/commit/4f391796b7de78a434a2cc7107034603df414905 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 15 16:59:07 2017 +0100 patch 8.0.0191: can't build with Ruby on some systems Problem: Some systems do not have ruby_sysinit(), causing the build to fail. Solution: Clean up how ruby_sysinit() and NtInitialize() are used. (Taro Muraoka)
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Jan 2017 17:00:05 +0100
parents c55a7232fb48
children 6a252c6afd5b
line wrap: on
line source

" Test behavior of fileformat after bwipeout of last buffer

func Test_fileformat_after_bw()
  bwipeout
  set fileformat&
  if &fileformat == 'dos'
    let test_fileformats = 'unix'
  elseif &fileformat == 'unix'
    let test_fileformats = 'mac'
  else  " must be mac
    let test_fileformats = 'dos'
  endif
  exec 'set fileformats='.test_fileformats
  bwipeout!
  call assert_equal(test_fileformats, &fileformat)
  set fileformats&
endfunc