Mercurial > vim
comparison src/testdir/test_termcodes.vim @ 28552:90d57cd76564 v8.2.4800
patch 8.2.4800: missing test update for adjusted t_8u behavior
Commit: https://github.com/vim/vim/commit/d0eaf675aa1f00bf7a10fd15b562098530a94991
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 20 19:55:37 2022 +0100
patch 8.2.4800: missing test update for adjusted t_8u behavior
Problem: Missing test update for adjusted t_8u behavior.
Solution: Update and extend the test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 20 Apr 2022 21:00:07 +0200 |
parents | b9e8f3674090 |
children | ce202d2984a0 |
comparison
equal
deleted
inserted
replaced
28551:1c4958ff5542 | 28552:90d57cd76564 |
---|---|
1781 | 1781 |
1782 set t_RV= | 1782 set t_RV= |
1783 call test_override('term_props', 0) | 1783 call test_override('term_props', 0) |
1784 endfunc | 1784 endfunc |
1785 | 1785 |
1786 func Do_check_t_8u_set_reset(set_by_user) | |
1787 set ttymouse=xterm | |
1788 call test_option_not_set('ttymouse') | |
1789 let default_value = "\<Esc>[58;2;%lu;%lu;%lum" | |
1790 let &t_8u = default_value | |
1791 if !a:set_by_user | |
1792 call test_option_not_set('t_8u') | |
1793 endif | |
1794 let seq = "\<Esc>[>0;279;0c" | |
1795 call feedkeys(seq, 'Lx!') | |
1796 call assert_equal(seq, v:termresponse) | |
1797 call assert_equal('sgr', &ttymouse) | |
1798 | |
1799 call assert_equal(#{ | |
1800 \ cursor_style: 'u', | |
1801 \ cursor_blink_mode: 'u', | |
1802 \ underline_rgb: 'u', | |
1803 \ mouse: 's' | |
1804 \ }, terminalprops()) | |
1805 call assert_equal(a:set_by_user ? default_value : '', &t_8u) | |
1806 endfunc | |
1807 | |
1786 " This checks the xterm version response. | 1808 " This checks the xterm version response. |
1787 " This must be after other tests, because it has side effects to xterm | 1809 " This must be after other tests, because it has side effects to xterm |
1788 " properties. | 1810 " properties. |
1789 func Test_xx07_xterm_response() | 1811 func Test_xx07_xterm_response() |
1790 " Termresponse is only parsed when t_RV is not empty. | 1812 " Termresponse is only parsed when t_RV is not empty. |
1845 \ cursor_blink_mode: 'u', | 1867 \ cursor_blink_mode: 'u', |
1846 \ underline_rgb: 'u', | 1868 \ underline_rgb: 'u', |
1847 \ mouse: 's' | 1869 \ mouse: 's' |
1848 \ }, terminalprops()) | 1870 \ }, terminalprops()) |
1849 | 1871 |
1850 " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset | 1872 " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset, |
1851 set ttymouse=xterm | 1873 " except when it was set by the user |
1852 call test_option_not_set('ttymouse') | 1874 call Do_check_t_8u_set_reset(0) |
1853 let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum" | 1875 call Do_check_t_8u_set_reset(1) |
1854 let seq = "\<Esc>[>0;279;0c" | |
1855 call feedkeys(seq, 'Lx!') | |
1856 call assert_equal(seq, v:termresponse) | |
1857 call assert_equal('sgr', &ttymouse) | |
1858 | |
1859 call assert_equal(#{ | |
1860 \ cursor_style: 'u', | |
1861 \ cursor_blink_mode: 'u', | |
1862 \ underline_rgb: 'u', | |
1863 \ mouse: 's' | |
1864 \ }, terminalprops()) | |
1865 call assert_equal('', &t_8u) | |
1866 | 1876 |
1867 set t_RV= | 1877 set t_RV= |
1868 call test_override('term_props', 0) | 1878 call test_override('term_props', 0) |
1869 endfunc | 1879 endfunc |
1870 | 1880 |