summaryrefslogtreecommitdiff
path: root/mnv/src/testdir/test_terminal_fail.mnv
blob: 68aac087f41742d3307fbb98a6d9e484d91e6c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
" This test is in a separate file, because it usually causes reports for memory
" leaks under valgrind.  That is because when fork/exec fails memory is not
" freed.  Since the process exits right away it's not a real leak.

CheckFeature terminal

func Test_terminal_redir_fails()
  CheckUnix

  let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'})
  call TermWait(buf)
  call WaitFor('len(readfile("Xfile")) > 0')
  call assert_match('executing job failed', readfile('Xfile')[0])
  call WaitFor('!&modified')
  call delete('Xfile')
  bwipe
endfunc

" mnv: shiftwidth=2 sts=2 expandtab