Bram Moolenaar | 461a7fc | 2018-12-22 13:28:07 +0100 | [diff] [blame] | 1 | " Tests for :messages, :echomsg, :echoerr |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 2 | |
Bram Moolenaar | 494e906 | 2020-05-31 21:28:02 +0200 | [diff] [blame] | 3 | source check.vim |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 4 | source shared.vim |
Bram Moolenaar | c6d539b | 2019-12-28 17:10:46 +0100 | [diff] [blame] | 5 | source term_util.vim |
Bram Moolenaar | b42c0d5 | 2020-05-29 22:41:41 +0200 | [diff] [blame] | 6 | source view_util.vim |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 7 | |
Bram Moolenaar | 49b2fb3 | 2020-04-25 17:13:56 +0200 | [diff] [blame] | 8 | func Test_messages() |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 9 | let oldmore = &more |
| 10 | try |
| 11 | set nomore |
| 12 | |
| 13 | let arr = map(range(10), '"hello" . v:val') |
| 14 | for s in arr |
| 15 | echomsg s | redraw |
| 16 | endfor |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 17 | |
Bram Moolenaar | bea1ede | 2016-04-14 19:44:36 +0200 | [diff] [blame] | 18 | " get last two messages |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 19 | redir => result |
| 20 | 2messages | redraw |
| 21 | redir END |
Bram Moolenaar | bea1ede | 2016-04-14 19:44:36 +0200 | [diff] [blame] | 22 | let msg_list = split(result, "\n") |
| 23 | call assert_equal(["hello8", "hello9"], msg_list) |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 24 | |
| 25 | " clear messages without last one |
| 26 | 1messages clear |
Bram Moolenaar | 49b2fb3 | 2020-04-25 17:13:56 +0200 | [diff] [blame] | 27 | let msg_list = GetMessages() |
Bram Moolenaar | bea1ede | 2016-04-14 19:44:36 +0200 | [diff] [blame] | 28 | call assert_equal(['hello9'], msg_list) |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 29 | |
| 30 | " clear all messages |
| 31 | messages clear |
Bram Moolenaar | 49b2fb3 | 2020-04-25 17:13:56 +0200 | [diff] [blame] | 32 | let msg_list = GetMessages() |
| 33 | call assert_equal([], msg_list) |
Bram Moolenaar | 451f849 | 2016-04-14 17:16:22 +0200 | [diff] [blame] | 34 | finally |
| 35 | let &more = oldmore |
| 36 | endtry |
Bram Moolenaar | 067297e | 2020-04-13 19:55:50 +0200 | [diff] [blame] | 37 | |
| 38 | call assert_fails('message 1', 'E474:') |
Bram Moolenaar | 49b2fb3 | 2020-04-25 17:13:56 +0200 | [diff] [blame] | 39 | endfunc |
Bram Moolenaar | 2abad54 | 2018-05-19 14:43:45 +0200 | [diff] [blame] | 40 | |
Bram Moolenaar | f52f9ea | 2018-06-27 20:49:44 +0200 | [diff] [blame] | 41 | " Patch 7.4.1696 defined the "clearmode()" function for clearing the mode |
Bram Moolenaar | 2abad54 | 2018-05-19 14:43:45 +0200 | [diff] [blame] | 42 | " indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message |
| 43 | " output could then be disturbed when 'cmdheight' was greater than one. |
| 44 | " This test ensures that the bugfix for this issue remains in place. |
Bram Moolenaar | 1e11536 | 2019-01-09 23:01:02 +0100 | [diff] [blame] | 45 | func Test_stopinsert_does_not_break_message_output() |
Bram Moolenaar | 2abad54 | 2018-05-19 14:43:45 +0200 | [diff] [blame] | 46 | set cmdheight=2 |
| 47 | redraw! |
| 48 | |
| 49 | stopinsert | echo 'test echo' |
| 50 | call assert_equal(116, screenchar(&lines - 1, 1)) |
| 51 | call assert_equal(32, screenchar(&lines, 1)) |
| 52 | redraw! |
| 53 | |
| 54 | stopinsert | echomsg 'test echomsg' |
| 55 | call assert_equal(116, screenchar(&lines - 1, 1)) |
| 56 | call assert_equal(32, screenchar(&lines, 1)) |
| 57 | redraw! |
| 58 | |
| 59 | set cmdheight& |
Bram Moolenaar | 1e11536 | 2019-01-09 23:01:02 +0100 | [diff] [blame] | 60 | endfunc |
Bram Moolenaar | b513d30 | 2018-12-02 14:55:08 +0100 | [diff] [blame] | 61 | |
| 62 | func Test_message_completion() |
| 63 | call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx') |
| 64 | call assert_equal('"message clear', @:) |
| 65 | endfunc |
Bram Moolenaar | 461a7fc | 2018-12-22 13:28:07 +0100 | [diff] [blame] | 66 | |
| 67 | func Test_echomsg() |
| 68 | call assert_equal("\nhello", execute(':echomsg "hello"')) |
| 69 | call assert_equal("\n", execute(':echomsg ""')) |
| 70 | call assert_equal("\n12345", execute(':echomsg 12345')) |
| 71 | call assert_equal("\n[]", execute(':echomsg []')) |
| 72 | call assert_equal("\n[1, 2, 3]", execute(':echomsg [1, 2, 3]')) |
Bram Moolenaar | db950e4 | 2020-04-22 19:13:19 +0200 | [diff] [blame] | 73 | call assert_equal("\n[1, 2, []]", execute(':echomsg [1, 2, test_null_list()]')) |
Bram Moolenaar | 461a7fc | 2018-12-22 13:28:07 +0100 | [diff] [blame] | 74 | call assert_equal("\n{}", execute(':echomsg {}')) |
| 75 | call assert_equal("\n{'a': 1, 'b': 2}", execute(':echomsg {"a": 1, "b": 2}')) |
| 76 | if has('float') |
| 77 | call assert_equal("\n1.23", execute(':echomsg 1.23')) |
| 78 | endif |
| 79 | call assert_match("function('<lambda>\\d*')", execute(':echomsg {-> 1234}')) |
| 80 | endfunc |
| 81 | |
| 82 | func Test_echoerr() |
| 83 | call test_ignore_error('IgNoRe') |
| 84 | call assert_equal("\nIgNoRe hello", execute(':echoerr "IgNoRe hello"')) |
| 85 | call assert_equal("\n12345 IgNoRe", execute(':echoerr 12345 "IgNoRe"')) |
| 86 | call assert_equal("\n[1, 2, 'IgNoRe']", execute(':echoerr [1, 2, "IgNoRe"]')) |
| 87 | call assert_equal("\n{'IgNoRe': 2, 'a': 1}", execute(':echoerr {"a": 1, "IgNoRe": 2}')) |
| 88 | if has('float') |
| 89 | call assert_equal("\n1.23 IgNoRe", execute(':echoerr 1.23 "IgNoRe"')) |
| 90 | endif |
Bram Moolenaar | ce90e36 | 2019-09-08 18:58:44 +0200 | [diff] [blame] | 91 | eval '<lambda>'->test_ignore_error() |
Bram Moolenaar | 461a7fc | 2018-12-22 13:28:07 +0100 | [diff] [blame] | 92 | call assert_match("function('<lambda>\\d*')", execute(':echoerr {-> 1234}')) |
| 93 | call test_ignore_error('RESET') |
| 94 | endfunc |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 95 | |
| 96 | func Test_mode_message_at_leaving_insert_by_ctrl_c() |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 97 | CheckFeature terminal |
| 98 | CheckNotGui |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 99 | |
| 100 | " Set custom statusline built by user-defined function. |
| 101 | let testfile = 'Xtest.vim' |
Bram Moolenaar | e7eb927 | 2019-06-24 00:58:07 +0200 | [diff] [blame] | 102 | let lines =<< trim END |
| 103 | func StatusLine() abort |
| 104 | return "" |
| 105 | endfunc |
| 106 | set statusline=%!StatusLine() |
| 107 | set laststatus=2 |
| 108 | END |
| 109 | call writefile(lines, testfile) |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 110 | |
| 111 | let rows = 10 |
| 112 | let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows}) |
Bram Moolenaar | 6a2c5a7 | 2020-04-08 21:50:25 +0200 | [diff] [blame] | 113 | call TermWait(buf, 100) |
Bram Moolenaar | abc7c7f | 2019-04-20 15:10:13 +0200 | [diff] [blame] | 114 | call assert_equal('run', job_status(term_getjob(buf))) |
| 115 | |
| 116 | call term_sendkeys(buf, "i") |
| 117 | call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, rows))}) |
| 118 | call term_sendkeys(buf, "\<C-C>") |
| 119 | call WaitForAssert({-> assert_match('^\s*$', term_getline(buf, rows))}) |
| 120 | |
| 121 | call term_sendkeys(buf, ":qall!\<CR>") |
| 122 | call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(buf)))}) |
| 123 | exe buf . 'bwipe!' |
| 124 | call delete(testfile) |
| 125 | endfunc |
Bram Moolenaar | 4c25bd7 | 2019-04-20 23:38:07 +0200 | [diff] [blame] | 126 | |
| 127 | func Test_mode_message_at_leaving_insert_with_esc_mapped() |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 128 | CheckFeature terminal |
| 129 | CheckNotGui |
Bram Moolenaar | 4c25bd7 | 2019-04-20 23:38:07 +0200 | [diff] [blame] | 130 | |
| 131 | " Set custom statusline built by user-defined function. |
| 132 | let testfile = 'Xtest.vim' |
Bram Moolenaar | e7eb927 | 2019-06-24 00:58:07 +0200 | [diff] [blame] | 133 | let lines =<< trim END |
| 134 | set laststatus=2 |
| 135 | inoremap <Esc> <Esc>00 |
| 136 | END |
| 137 | call writefile(lines, testfile) |
Bram Moolenaar | 4c25bd7 | 2019-04-20 23:38:07 +0200 | [diff] [blame] | 138 | |
| 139 | let rows = 10 |
| 140 | let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows}) |
Bram Moolenaar | 6a2c5a7 | 2020-04-08 21:50:25 +0200 | [diff] [blame] | 141 | call WaitForAssert({-> assert_match('0,0-1\s*All$', term_getline(buf, rows - 1))}) |
Bram Moolenaar | 4c25bd7 | 2019-04-20 23:38:07 +0200 | [diff] [blame] | 142 | call assert_equal('run', job_status(term_getjob(buf))) |
| 143 | |
| 144 | call term_sendkeys(buf, "i") |
| 145 | call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, rows))}) |
| 146 | call term_sendkeys(buf, "\<Esc>") |
| 147 | call WaitForAssert({-> assert_match('^\s*$', term_getline(buf, rows))}) |
| 148 | |
| 149 | call term_sendkeys(buf, ":qall!\<CR>") |
| 150 | call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(buf)))}) |
| 151 | exe buf . 'bwipe!' |
| 152 | call delete(testfile) |
| 153 | endfunc |
Bram Moolenaar | 37f4cbd | 2019-08-23 20:58:45 +0200 | [diff] [blame] | 154 | |
| 155 | func Test_echospace() |
| 156 | set noruler noshowcmd laststatus=1 |
| 157 | call assert_equal(&columns - 1, v:echospace) |
| 158 | split |
| 159 | call assert_equal(&columns - 1, v:echospace) |
| 160 | set ruler |
| 161 | call assert_equal(&columns - 1, v:echospace) |
| 162 | close |
| 163 | call assert_equal(&columns - 19, v:echospace) |
| 164 | set showcmd noruler |
| 165 | call assert_equal(&columns - 12, v:echospace) |
| 166 | set showcmd ruler |
| 167 | call assert_equal(&columns - 29, v:echospace) |
| 168 | |
| 169 | set ruler& showcmd& |
| 170 | endfunc |
Bram Moolenaar | c6d539b | 2019-12-28 17:10:46 +0100 | [diff] [blame] | 171 | |
| 172 | " Test more-prompt (see :help more-prompt). |
| 173 | func Test_message_more() |
Bram Moolenaar | 494e906 | 2020-05-31 21:28:02 +0200 | [diff] [blame] | 174 | CheckRunVimInTerminal |
Bram Moolenaar | c6d539b | 2019-12-28 17:10:46 +0100 | [diff] [blame] | 175 | let buf = RunVimInTerminal('', {'rows': 6}) |
| 176 | call term_sendkeys(buf, ":call setline(1, range(1, 100))\n") |
| 177 | |
| 178 | call term_sendkeys(buf, ":%p#\n") |
| 179 | call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) |
| 180 | call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |
| 181 | |
| 182 | call term_sendkeys(buf, '?') |
| 183 | call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) |
| 184 | call WaitForAssert({-> assert_equal('-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit ', term_getline(buf, 6))}) |
| 185 | |
| 186 | " Down a line with j, <CR>, <NL> or <Down>. |
| 187 | call term_sendkeys(buf, "j") |
| 188 | call WaitForAssert({-> assert_equal(' 6 6', term_getline(buf, 5))}) |
| 189 | call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |
| 190 | call term_sendkeys(buf, "\<NL>") |
| 191 | call WaitForAssert({-> assert_equal(' 7 7', term_getline(buf, 5))}) |
| 192 | call term_sendkeys(buf, "\<CR>") |
| 193 | call WaitForAssert({-> assert_equal(' 8 8', term_getline(buf, 5))}) |
| 194 | call term_sendkeys(buf, "\<Down>") |
| 195 | call WaitForAssert({-> assert_equal(' 9 9', term_getline(buf, 5))}) |
| 196 | |
| 197 | " Down a screen with <Space>, f, or <PageDown>. |
| 198 | call term_sendkeys(buf, 'f') |
| 199 | call WaitForAssert({-> assert_equal(' 14 14', term_getline(buf, 5))}) |
| 200 | call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |
| 201 | call term_sendkeys(buf, ' ') |
| 202 | call WaitForAssert({-> assert_equal(' 19 19', term_getline(buf, 5))}) |
| 203 | call term_sendkeys(buf, "\<PageDown>") |
| 204 | call WaitForAssert({-> assert_equal(' 24 24', term_getline(buf, 5))}) |
| 205 | |
| 206 | " Down a page (half a screen) with d. |
| 207 | call term_sendkeys(buf, 'd') |
| 208 | call WaitForAssert({-> assert_equal(' 27 27', term_getline(buf, 5))}) |
| 209 | |
| 210 | " Down all the way with 'G'. |
| 211 | call term_sendkeys(buf, 'G') |
| 212 | call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) |
| 213 | call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) |
| 214 | |
| 215 | " Up a line k, <BS> or <Up>. |
| 216 | call term_sendkeys(buf, 'k') |
| 217 | call WaitForAssert({-> assert_equal(' 99 99', term_getline(buf, 5))}) |
| 218 | call term_sendkeys(buf, "\<BS>") |
| 219 | call WaitForAssert({-> assert_equal(' 98 98', term_getline(buf, 5))}) |
| 220 | call term_sendkeys(buf, "\<Up>") |
| 221 | call WaitForAssert({-> assert_equal(' 97 97', term_getline(buf, 5))}) |
| 222 | |
| 223 | " Up a screen with b or <PageUp>. |
| 224 | call term_sendkeys(buf, 'b') |
| 225 | call WaitForAssert({-> assert_equal(' 92 92', term_getline(buf, 5))}) |
| 226 | call term_sendkeys(buf, "\<PageUp>") |
| 227 | call WaitForAssert({-> assert_equal(' 87 87', term_getline(buf, 5))}) |
| 228 | |
| 229 | " Up a page (half a screen) with u. |
| 230 | call term_sendkeys(buf, 'u') |
| 231 | call WaitForAssert({-> assert_equal(' 84 84', term_getline(buf, 5))}) |
| 232 | |
| 233 | " Up all the way with 'g'. |
| 234 | call term_sendkeys(buf, 'g') |
| 235 | call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) |
| 236 | call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |
| 237 | |
| 238 | " All the way down. Pressing f should do nothing but pressing |
| 239 | " space should end the more prompt. |
| 240 | call term_sendkeys(buf, 'G') |
| 241 | call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) |
| 242 | call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) |
| 243 | call term_sendkeys(buf, 'f') |
| 244 | call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) |
| 245 | call term_sendkeys(buf, ' ') |
| 246 | call WaitForAssert({-> assert_equal('100', term_getline(buf, 5))}) |
| 247 | |
| 248 | " Pressing g< shows the previous command output. |
| 249 | call term_sendkeys(buf, 'g<') |
| 250 | call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) |
| 251 | call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) |
| 252 | |
| 253 | call term_sendkeys(buf, ":%p#\n") |
| 254 | call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) |
| 255 | call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |
| 256 | |
| 257 | " Stop command output with q, <Esc> or CTRL-C. |
| 258 | call term_sendkeys(buf, 'q') |
| 259 | call WaitForAssert({-> assert_equal('100', term_getline(buf, 5))}) |
| 260 | |
Bram Moolenaar | 43c60ed | 2020-02-02 15:55:19 +0100 | [diff] [blame] | 261 | call StopVimInTerminal(buf) |
| 262 | endfunc |
| 263 | |
| 264 | func Test_ask_yesno() |
Bram Moolenaar | 494e906 | 2020-05-31 21:28:02 +0200 | [diff] [blame] | 265 | CheckRunVimInTerminal |
Bram Moolenaar | 43c60ed | 2020-02-02 15:55:19 +0100 | [diff] [blame] | 266 | let buf = RunVimInTerminal('', {'rows': 6}) |
| 267 | call term_sendkeys(buf, ":call setline(1, range(1, 2))\n") |
| 268 | |
| 269 | call term_sendkeys(buf, ":2,1s/^/n/\n") |
| 270 | call WaitForAssert({-> assert_equal('Backwards range given, OK to swap (y/n)?', term_getline(buf, 6))}) |
| 271 | call term_sendkeys(buf, "n") |
| 272 | call WaitForAssert({-> assert_match('^Backwards range given, OK to swap (y/n)?n *1,1 *All$', term_getline(buf, 6))}) |
| 273 | call WaitForAssert({-> assert_equal('1', term_getline(buf, 1))}) |
| 274 | |
| 275 | call term_sendkeys(buf, ":2,1s/^/Esc/\n") |
| 276 | call WaitForAssert({-> assert_equal('Backwards range given, OK to swap (y/n)?', term_getline(buf, 6))}) |
| 277 | call term_sendkeys(buf, "\<Esc>") |
| 278 | call WaitForAssert({-> assert_match('^Backwards range given, OK to swap (y/n)?n *1,1 *All$', term_getline(buf, 6))}) |
| 279 | call WaitForAssert({-> assert_equal('1', term_getline(buf, 1))}) |
| 280 | |
| 281 | call term_sendkeys(buf, ":2,1s/^/y/\n") |
| 282 | call WaitForAssert({-> assert_equal('Backwards range given, OK to swap (y/n)?', term_getline(buf, 6))}) |
| 283 | call term_sendkeys(buf, "y") |
| 284 | call WaitForAssert({-> assert_match('^Backwards range given, OK to swap (y/n)?y *2,1 *All$', term_getline(buf, 6))}) |
| 285 | call WaitForAssert({-> assert_equal('y1', term_getline(buf, 1))}) |
| 286 | call WaitForAssert({-> assert_equal('y2', term_getline(buf, 2))}) |
| 287 | |
Bram Moolenaar | c6d539b | 2019-12-28 17:10:46 +0100 | [diff] [blame] | 288 | call StopVimInTerminal(buf) |
| 289 | endfunc |
Bram Moolenaar | 9db2afe | 2020-01-08 18:56:20 +0100 | [diff] [blame] | 290 | |
| 291 | func Test_null() |
| 292 | echom test_null_list() |
| 293 | echom test_null_dict() |
| 294 | echom test_null_blob() |
Bram Moolenaar | 9db2afe | 2020-01-08 18:56:20 +0100 | [diff] [blame] | 295 | echom test_null_string() |
Bram Moolenaar | 92b83cc | 2020-04-25 15:24:44 +0200 | [diff] [blame] | 296 | echom test_null_function() |
Bram Moolenaar | 9db2afe | 2020-01-08 18:56:20 +0100 | [diff] [blame] | 297 | echom test_null_partial() |
Bram Moolenaar | da292b0 | 2020-01-08 19:27:40 +0100 | [diff] [blame] | 298 | if has('job') |
| 299 | echom test_null_job() |
| 300 | echom test_null_channel() |
| 301 | endif |
Bram Moolenaar | 9db2afe | 2020-01-08 18:56:20 +0100 | [diff] [blame] | 302 | endfunc |
Bram Moolenaar | 92b83cc | 2020-04-25 15:24:44 +0200 | [diff] [blame] | 303 | |
Bram Moolenaar | b42c0d5 | 2020-05-29 22:41:41 +0200 | [diff] [blame] | 304 | func Test_mapping_at_hit_return_prompt() |
| 305 | nnoremap <C-B> :echo "hit ctrl-b"<CR> |
| 306 | call feedkeys(":ls\<CR>", "xt") |
Bram Moolenaar | fccd93f | 2020-05-31 22:06:51 +0200 | [diff] [blame] | 307 | call feedkeys("\<*C-B>", "xt") |
Bram Moolenaar | b42c0d5 | 2020-05-29 22:41:41 +0200 | [diff] [blame] | 308 | call assert_match('hit ctrl-b', Screenline(&lines - 1)) |
| 309 | nunmap <C-B> |
| 310 | endfunc |
| 311 | |
Bram Moolenaar | 92b83cc | 2020-04-25 15:24:44 +0200 | [diff] [blame] | 312 | " vim: shiftwidth=2 sts=2 expandtab |