endfunc
" Test for term_gettitle()
+" Known to be flaky on Mac-OS X and the GH runners
func Test_term_gettitle()
" term_gettitle() returns an empty string for a non-terminal buffer
" and for a non-existing buffer.
if !has('title') || empty(&t_ts)
throw "Skipped: can't get/set title"
endif
+ if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+ " This test often fails with the following error message on Github runners
+ " MacOS-14
+ " '^\\[No Name\\] - VIM\\d*$' does not match 'e] - VIM'
+ " Why? Is the terminal that runs Vim too small?
+ throw 'Skipped: FIXME: Running this test on M1 Mac fails on GitHub Actions'
+ endif
let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title'])
call TermWait(term)