diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-04-09 22:54:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-04-09 22:54:13 +0200 |
commit | f803a7697808f63949ea26fc256d4c9a8647089e (patch) | |
tree | fdb5111ee3c37f8eb81eb9c0f7065b4d538a8e4f /src/testdir/test_options.vim | |
parent | cd5c8f82507822467232ab71e1ebbaae19595916 (diff) | |
download | vim-git-f803a7697808f63949ea26fc256d4c9a8647089e.tar.gz |
patch 8.0.0559: setting ttytype to xxx does not always failv8.0.0559
Problem: Setting ttytype to xxx does not always fail as expected. (Marvin
Schmidt)
Solution: Catch both possible errors. (closes #1601)
Diffstat (limited to 'src/testdir/test_options.vim')
-rw-r--r-- | src/testdir/test_options.vim | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index 9cf5e5f11..d72ca74b2 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -280,10 +280,22 @@ func Test_set_ttytype() set ttytype=xterm call assert_equal('xterm', &ttytype) call assert_equal(&ttytype, &term) - " FIXME: "set ttytype=" gives E522 instead of E529 - " in travis on some builds. Why? Commented out this test for now. - " call assert_fails('set ttytype=', 'E529:') - call assert_fails('set ttytype=xxx', 'E522:') + " "set ttytype=" gives E522 instead of E529 + " in travis on some builds. Why? Catch both for now + try + set ttytype= + call assert_report('set ttype= did not fail') + catch /E529\|E522/ + endtry + + " Some systems accept any terminal name and return dumb settings, + " check for failure of finding the entry and for missing 'cm' entry. + try + set ttytype=xxx + call assert_report('set ttype=xxx did not fail') + catch /E522\|E437/ + endtry + set ttytype& call assert_equal(&ttytype, &term) endif |