1" Test for breakindent 2" 3" Note: if you get strange failures when adding new tests, it might be that 4" while the test is run, the breakindent caching gets in its way. 5" It helps to change the tabstop setting and force a redraw (e.g. see 6" Test_breakindent08()) 7source check.vim 8CheckOption breakindent 9 10source view_util.vim 11 12let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP" 13 14func s:screen_lines(lnum, width) abort 15 return ScreenLines([a:lnum, a:lnum + 2], a:width) 16endfunc 17 18func s:compare_lines(expect, actual) 19 call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) 20endfunc 21 22func s:test_windows(...) 23 call NewWindow(10, 20) 24 setl ts=4 sw=4 sts=4 breakindent 25 put =s:input 26 exe get(a:000, 0, '') 27endfunc 28 29func s:close_windows(...) 30 call CloseWindow() 31 exe get(a:000, 0, '') 32endfunc 33 34func Test_breakindent01() 35 " simple breakindent test 36 call s:test_windows('setl briopt=min:0') 37 let lines = s:screen_lines(line('.'),8) 38 let expect = [ 39 \ " abcd", 40 \ " qrst", 41 \ " GHIJ", 42 \ ] 43 call s:compare_lines(expect, lines) 44 call s:close_windows() 45endfunc 46 47func Test_breakindent01_vartabs() 48 " like 01 but with vartabs feature 49 if !has("vartabs") 50 return 51 endif 52 call s:test_windows('setl briopt=min:0 vts=4') 53 let lines = s:screen_lines(line('.'),8) 54 let expect = [ 55 \ " abcd", 56 \ " qrst", 57 \ " GHIJ", 58 \ ] 59 call s:compare_lines(expect, lines) 60 call s:close_windows('set vts&') 61endfunc 62 63func Test_breakindent02() 64 " simple breakindent test with showbreak set 65 set sbr=>> 66 call s:test_windows('setl briopt=min:0 sbr=') 67 let lines = s:screen_lines(line('.'),8) 68 let expect = [ 69 \ " abcd", 70 \ " >>qr", 71 \ " >>EF", 72 \ ] 73 call s:compare_lines(expect, lines) 74 call s:close_windows('set sbr=') 75endfunc 76 77func Test_breakindent02_vartabs() 78 if !has("vartabs") 79 return 80 endif 81 " simple breakindent test with showbreak set 82 call s:test_windows('setl briopt=min:0 sbr=>> vts=4') 83 let lines = s:screen_lines(line('.'),8) 84 let expect = [ 85 \ " abcd", 86 \ " >>qr", 87 \ " >>EF", 88 \ ] 89 call s:compare_lines(expect, lines) 90 call s:close_windows('set sbr= vts&') 91endfunc 92 93func Test_breakindent03() 94 " simple breakindent test with showbreak set and briopt including sbr 95 call s:test_windows('setl briopt=sbr,min:0 sbr=++') 96 let lines = s:screen_lines(line('.'),8) 97 let expect = [ 98 \ " abcd", 99 \ "++ qrst", 100 \ "++ GHIJ", 101 \ ] 102 call s:compare_lines(expect, lines) 103 " clean up 104 call s:close_windows('set sbr=') 105endfunc 106 107func Test_breakindent03_vartabs() 108 " simple breakindent test with showbreak set and briopt including sbr 109 if !has("vartabs") 110 return 111 endif 112 call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4') 113 let lines = s:screen_lines(line('.'),8) 114 let expect = [ 115 \ " abcd", 116 \ "++ qrst", 117 \ "++ GHIJ", 118 \ ] 119 call s:compare_lines(expect, lines) 120 " clean up 121 call s:close_windows('set sbr= vts&') 122endfunc 123 124func Test_breakindent04() 125 " breakindent set with min width 18 126 set sbr=<<< 127 call s:test_windows('setl sbr=NONE briopt=min:18') 128 let lines = s:screen_lines(line('.'),8) 129 let expect = [ 130 \ " abcd", 131 \ " qrstuv", 132 \ " IJKLMN", 133 \ ] 134 call s:compare_lines(expect, lines) 135 " clean up 136 call s:close_windows('set sbr=') 137 set sbr= 138endfunc 139 140func Test_breakindent04_vartabs() 141 " breakindent set with min width 18 142 if !has("vartabs") 143 return 144 endif 145 call s:test_windows('setl sbr= briopt=min:18 vts=4') 146 let lines = s:screen_lines(line('.'),8) 147 let expect = [ 148 \ " abcd", 149 \ " qrstuv", 150 \ " IJKLMN", 151 \ ] 152 call s:compare_lines(expect, lines) 153 " clean up 154 call s:close_windows('set sbr= vts&') 155endfunc 156 157func Test_breakindent05() 158 " breakindent set and shift by 2 159 call s:test_windows('setl briopt=shift:2,min:0') 160 let lines = s:screen_lines(line('.'),8) 161 let expect = [ 162 \ " abcd", 163 \ " qr", 164 \ " EF", 165 \ ] 166 call s:compare_lines(expect, lines) 167 call s:close_windows() 168endfunc 169 170func Test_breakindent05_vartabs() 171 " breakindent set and shift by 2 172 if !has("vartabs") 173 return 174 endif 175 call s:test_windows('setl briopt=shift:2,min:0 vts=4') 176 let lines = s:screen_lines(line('.'),8) 177 let expect = [ 178 \ " abcd", 179 \ " qr", 180 \ " EF", 181 \ ] 182 call s:compare_lines(expect, lines) 183 call s:close_windows('set vts&') 184endfunc 185 186func Test_breakindent06() 187 " breakindent set and shift by -1 188 call s:test_windows('setl briopt=shift:-1,min:0') 189 let lines = s:screen_lines(line('.'),8) 190 let expect = [ 191 \ " abcd", 192 \ " qrstu", 193 \ " HIJKL", 194 \ ] 195 call s:compare_lines(expect, lines) 196 call s:close_windows() 197endfunc 198 199func Test_breakindent06_vartabs() 200 " breakindent set and shift by -1 201 if !has("vartabs") 202 return 203 endif 204 call s:test_windows('setl briopt=shift:-1,min:0 vts=4') 205 let lines = s:screen_lines(line('.'),8) 206 let expect = [ 207 \ " abcd", 208 \ " qrstu", 209 \ " HIJKL", 210 \ ] 211 call s:compare_lines(expect, lines) 212 call s:close_windows('set vts&') 213endfunc 214 215func Test_breakindent07() 216 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr 217 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n') 218 let lines = s:screen_lines(line('.'),10) 219 let expect = [ 220 \ " 2 ab", 221 \ "? m", 222 \ "? x", 223 \ ] 224 call s:compare_lines(expect, lines) 225 " clean up 226 call s:close_windows('set sbr= cpo-=n') 227endfunc 228 229func Test_breakindent07_vartabs() 230 if !has("vartabs") 231 return 232 endif 233 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr 234 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n vts=4') 235 let lines = s:screen_lines(line('.'),10) 236 let expect = [ 237 \ " 2 ab", 238 \ "? m", 239 \ "? x", 240 \ ] 241 call s:compare_lines(expect, lines) 242 " clean up 243 call s:close_windows('set sbr= cpo-=n vts&') 244endfunc 245 246func Test_breakindent07a() 247 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr 248 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4') 249 let lines = s:screen_lines(line('.'),10) 250 let expect = [ 251 \ " 2 ab", 252 \ " ? m", 253 \ " ? x", 254 \ ] 255 call s:compare_lines(expect, lines) 256 " clean up 257 call s:close_windows('set sbr=') 258endfunc 259 260func Test_breakindent07a_vartabs() 261 if !has("vartabs") 262 return 263 endif 264 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr 265 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 vts=4') 266 let lines = s:screen_lines(line('.'),10) 267 let expect = [ 268 \ " 2 ab", 269 \ " ? m", 270 \ " ? x", 271 \ ] 272 call s:compare_lines(expect, lines) 273 " clean up 274 call s:close_windows('set sbr= vts&') 275endfunc 276 277func Test_breakindent08() 278 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr 279 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4') 280 " make sure, cache is invalidated! 281 set ts=8 282 redraw! 283 set ts=4 284 redraw! 285 let lines = s:screen_lines(line('.'),10) 286 let expect = [ 287 \ " 2 ^Iabcd", 288 \ "# opq", 289 \ "# BCD", 290 \ ] 291 call s:compare_lines(expect, lines) 292 call s:close_windows('set sbr= cpo-=n') 293endfunc 294 295func Test_breakindent08_vartabs() 296 if !has("vartabs") 297 return 298 endif 299 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr 300 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4 vts=4') 301 " make sure, cache is invalidated! 302 set ts=8 303 redraw! 304 set ts=4 305 redraw! 306 let lines = s:screen_lines(line('.'),10) 307 let expect = [ 308 \ " 2 ^Iabcd", 309 \ "# opq", 310 \ "# BCD", 311 \ ] 312 call s:compare_lines(expect, lines) 313 call s:close_windows('set sbr= cpo-=n vts&') 314endfunc 315 316func Test_breakindent08a() 317 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr 318 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list') 319 let lines = s:screen_lines(line('.'),10) 320 let expect = [ 321 \ " 2 ^Iabcd", 322 \ " # opq", 323 \ " # BCD", 324 \ ] 325 call s:compare_lines(expect, lines) 326 call s:close_windows('set sbr=') 327endfunc 328 329func Test_breakindent08a_vartabs() 330 if !has("vartabs") 331 return 332 endif 333 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr 334 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list vts=4') 335 let lines = s:screen_lines(line('.'),10) 336 let expect = [ 337 \ " 2 ^Iabcd", 338 \ " # opq", 339 \ " # BCD", 340 \ ] 341 call s:compare_lines(expect, lines) 342 call s:close_windows('set sbr= vts&') 343endfunc 344 345func Test_breakindent09() 346 " breakindent set and shift by 1, Number and list set sbr=# 347 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list') 348 let lines = s:screen_lines(line('.'),10) 349 let expect = [ 350 \ " 2 ^Iabcd", 351 \ " #op", 352 \ " #AB", 353 \ ] 354 call s:compare_lines(expect, lines) 355 call s:close_windows('set sbr=') 356endfunc 357 358func Test_breakindent09_vartabs() 359 if !has("vartabs") 360 return 361 endif 362 " breakindent set and shift by 1, Number and list set sbr=# 363 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list vts=4') 364 let lines = s:screen_lines(line('.'),10) 365 let expect = [ 366 \ " 2 ^Iabcd", 367 \ " #op", 368 \ " #AB", 369 \ ] 370 call s:compare_lines(expect, lines) 371 call s:close_windows('set sbr= vts&') 372endfunc 373 374func Test_breakindent10() 375 " breakindent set, Number set sbr=~ 376 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0') 377 " make sure, cache is invalidated! 378 set ts=8 379 redraw! 380 set ts=4 381 redraw! 382 let lines = s:screen_lines(line('.'),10) 383 let expect = [ 384 \ " 2 ab", 385 \ "~ mn", 386 \ "~ yz", 387 \ ] 388 call s:compare_lines(expect, lines) 389 call s:close_windows('set sbr= cpo-=n') 390endfunc 391 392func Test_breakindent10_vartabs() 393 if !has("vartabs") 394 return 395 endif 396 " breakindent set, Number set sbr=~ 397 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 vts=4') 398 " make sure, cache is invalidated! 399 set ts=8 400 redraw! 401 set ts=4 402 redraw! 403 let lines = s:screen_lines(line('.'),10) 404 let expect = [ 405 \ " 2 ab", 406 \ "~ mn", 407 \ "~ yz", 408 \ ] 409 call s:compare_lines(expect, lines) 410 call s:close_windows('set sbr= cpo-=n vts&') 411endfunc 412 413func Test_breakindent11() 414 " test strdisplaywidth() 415 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4') 416 let text = getline(2) 417 let width = strlen(text[1:]) + indent(2) + strlen(&sbr) * 3 " text wraps 3 times 418 call assert_equal(width, strdisplaywidth(text)) 419 call s:close_windows('set sbr=') 420 call assert_equal(4, strdisplaywidth("\t", 4)) 421endfunc 422 423func Test_breakindent11_vartabs() 424 if !has("vartabs") 425 return 426 endif 427 " test strdisplaywidth() 428 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4') 429 let text = getline(2) 430 let width = strlen(text[1:]) + 2->indent() + strlen(&sbr) * 3 " text wraps 3 times 431 call assert_equal(width, text->strdisplaywidth()) 432 call s:close_windows('set sbr= vts&') 433endfunc 434 435func Test_breakindent12() 436 " test breakindent with long indent 437 let s:input = "\t\t\t\t\t{" 438 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>-') 439 let lines = s:screen_lines(2,16) 440 let expect = [ 441 \ " 2 >--->--->--->", 442 \ " ---{ ", 443 \ "~ ", 444 \ ] 445 call s:compare_lines(expect, lines) 446 call s:close_windows('set nuw=4 listchars=') 447endfunc 448 449func Test_breakindent12_vartabs() 450 if !has("vartabs") 451 return 452 endif 453 " test breakindent with long indent 454 let s:input = "\t\t\t\t\t{" 455 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>- vts=4') 456 let lines = s:screen_lines(2,16) 457 let expect = [ 458 \ " 2 >--->--->--->", 459 \ " ---{ ", 460 \ "~ ", 461 \ ] 462 call s:compare_lines(expect, lines) 463 call s:close_windows('set nuw=4 listchars= vts&') 464endfunc 465 466func Test_breakindent13() 467 let s:input = "" 468 call s:test_windows('setl breakindent briopt=min:10 ts=8') 469 vert resize 20 470 call setline(1, [" a\tb\tc\td\te", " z y x w v"]) 471 1 472 norm! fbgj"ayl 473 2 474 norm! fygj"byl 475 call assert_equal('d', @a) 476 call assert_equal('w', @b) 477 call s:close_windows() 478endfunc 479 480func Test_breakindent13_vartabs() 481 if !has("vartabs") 482 return 483 endif 484 let s:input = "" 485 call s:test_windows('setl breakindent briopt=min:10 ts=8 vts=8') 486 vert resize 20 487 call setline(1, [" a\tb\tc\td\te", " z y x w v"]) 488 1 489 norm! fbgj"ayl 490 2 491 norm! fygj"byl 492 call assert_equal('d', @a) 493 call assert_equal('w', @b) 494 call s:close_windows('set vts&') 495endfunc 496 497func Test_breakindent14() 498 let s:input = "" 499 call s:test_windows('setl breakindent briopt= ts=8') 500 vert resize 30 501 norm! 3a1234567890 502 norm! a abcde 503 exec "norm! 0\<C-V>tex" 504 let lines = s:screen_lines(line('.'),8) 505 let expect = [ 506 \ "e ", 507 \ "~ ", 508 \ "~ ", 509 \ ] 510 call s:compare_lines(expect, lines) 511 call s:close_windows() 512endfunc 513 514func Test_breakindent14_vartabs() 515 if !has("vartabs") 516 return 517 endif 518 let s:input = "" 519 call s:test_windows('setl breakindent briopt= ts=8 vts=8') 520 vert resize 30 521 norm! 3a1234567890 522 norm! a abcde 523 exec "norm! 0\<C-V>tex" 524 let lines = s:screen_lines(line('.'),8) 525 let expect = [ 526 \ "e ", 527 \ "~ ", 528 \ "~ ", 529 \ ] 530 call s:compare_lines(expect, lines) 531 call s:close_windows('set vts&') 532endfunc 533 534func Test_breakindent15() 535 let s:input = "" 536 call s:test_windows('setl breakindent briopt= ts=8 sw=8') 537 vert resize 30 538 norm! 4a1234567890 539 exe "normal! >>\<C-V>3f0x" 540 let lines = s:screen_lines(line('.'),20) 541 let expect = [ 542 \ " 1234567890 ", 543 \ "~ ", 544 \ "~ ", 545 \ ] 546 call s:compare_lines(expect, lines) 547 call s:close_windows() 548endfunc 549 550func Test_breakindent15_vartabs() 551 if !has("vartabs") 552 return 553 endif 554 let s:input = "" 555 call s:test_windows('setl breakindent briopt= ts=8 sw=8 vts=8') 556 vert resize 30 557 norm! 4a1234567890 558 exe "normal! >>\<C-V>3f0x" 559 let lines = s:screen_lines(line('.'),20) 560 let expect = [ 561 \ " 1234567890 ", 562 \ "~ ", 563 \ "~ ", 564 \ ] 565 call s:compare_lines(expect, lines) 566 call s:close_windows('set vts&') 567endfunc 568 569func Test_breakindent16() 570 " Check that overlong lines are indented correctly. 571 let s:input = "" 572 call s:test_windows('setl breakindent briopt=min:0 ts=4') 573 call setline(1, "\t".repeat("1234567890", 10)) 574 resize 6 575 norm! 1gg$ 576 redraw! 577 let lines = s:screen_lines(1,10) 578 let expect = [ 579 \ " 789012", 580 \ " 345678", 581 \ " 901234", 582 \ ] 583 call s:compare_lines(expect, lines) 584 let lines = s:screen_lines(4,10) 585 let expect = [ 586 \ " 567890", 587 \ " 123456", 588 \ " 7890 ", 589 \ ] 590 call s:compare_lines(expect, lines) 591 call s:close_windows() 592endfunc 593 594func Test_breakindent16_vartabs() 595 if !has("vartabs") 596 return 597 endif 598 " Check that overlong lines are indented correctly. 599 let s:input = "" 600 call s:test_windows('setl breakindent briopt=min:0 ts=4 vts=4') 601 call setline(1, "\t".repeat("1234567890", 10)) 602 resize 6 603 norm! 1gg$ 604 redraw! 605 let lines = s:screen_lines(1,10) 606 let expect = [ 607 \ " 789012", 608 \ " 345678", 609 \ " 901234", 610 \ ] 611 call s:compare_lines(expect, lines) 612 let lines = s:screen_lines(4,10) 613 let expect = [ 614 \ " 567890", 615 \ " 123456", 616 \ " 7890 ", 617 \ ] 618 call s:compare_lines(expect, lines) 619 call s:close_windows('set vts&') 620endfunc 621 622func Test_breakindent17_vartabs() 623 if !has("vartabs") 624 return 625 endif 626 let s:input = "" 627 call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++') 628 call setline(1, "\t" . repeat('a', 63)) 629 vert resize 30 630 norm! 1gg$ 631 redraw! 632 let lines = s:screen_lines(1, 30) 633 let expect = [ 634 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", 635 \ " +++aaaaaaaaaaaaaaaaaaaaaaa", 636 \ " +++aaaaaaaaaaaaaa ", 637 \ ] 638 call s:compare_lines(expect, lines) 639 call s:close_windows('set breakindent& list& listchars& showbreak&') 640endfunc 641 642func Test_breakindent18_vartabs() 643 if !has("vartabs") 644 return 645 endif 646 let s:input = "" 647 call s:test_windows('setl breakindent list listchars=tab:<->') 648 call setline(1, "\t" . repeat('a', 63)) 649 vert resize 30 650 norm! 1gg$ 651 redraw! 652 let lines = s:screen_lines(1, 30) 653 let expect = [ 654 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", 655 \ " aaaaaaaaaaaaaaaaaaaaaaaaaa", 656 \ " aaaaaaaaaaa ", 657 \ ] 658 call s:compare_lines(expect, lines) 659 call s:close_windows('set breakindent& list& listchars&') 660endfunc 661 662func Test_breakindent19_sbr_nextpage() 663 let s:input = "" 664 call s:test_windows('setl breakindent briopt=shift:2,sbr,min:18 sbr=>') 665 call setline(1, repeat('a', 200)) 666 norm! 1gg 667 redraw! 668 let lines = s:screen_lines(1, 20) 669 let expect = [ 670 \ "aaaaaaaaaaaaaaaaaaaa", 671 \ "> aaaaaaaaaaaaaaaaaa", 672 \ "> aaaaaaaaaaaaaaaaaa", 673 \ ] 674 call s:compare_lines(expect, lines) 675 " Scroll down one screen line 676 setl scrolloff=5 677 norm! 5gj 678 redraw! 679 let lines = s:screen_lines(1, 20) 680 let expect = [ 681 \ "> aaaaaaaaaaaaaaaaaa", 682 \ "> aaaaaaaaaaaaaaaaaa", 683 \ "> aaaaaaaaaaaaaaaaaa", 684 \ ] 685 call s:compare_lines(expect, lines) 686 687 setl breakindent briopt=min:18 sbr=> 688 norm! 5gj 689 let lines = s:screen_lines(1, 20) 690 let expect = [ 691 \ ">aaaaaaaaaaaaaaaaaaa", 692 \ ">aaaaaaaaaaaaaaaaaaa", 693 \ ">aaaaaaaaaaaaaaaaaaa", 694 \ ] 695 call s:compare_lines(expect, lines) 696 call s:close_windows('set breakindent& briopt& sbr&') 697endfunc 698 699func Test_breakindent20_cpo_n_nextpage() 700 let s:input = "" 701 call s:test_windows('setl breakindent briopt=min:14 cpo+=n number') 702 call setline(1, repeat('a', 200)) 703 norm! 1gg 704 redraw! 705 let lines = s:screen_lines(1, 20) 706 let expect = [ 707 \ " 1 aaaaaaaaaaaaaaaa", 708 \ " aaaaaaaaaaaaaaaa", 709 \ " aaaaaaaaaaaaaaaa", 710 \ ] 711 call s:compare_lines(expect, lines) 712 " Scroll down one screen line 713 setl scrolloff=5 714 norm! 5gj 715 redraw! 716 let lines = s:screen_lines(1, 20) 717 let expect = [ 718 \ "--1 aaaaaaaaaaaaaaaa", 719 \ " aaaaaaaaaaaaaaaa", 720 \ " aaaaaaaaaaaaaaaa", 721 \ ] 722 call s:compare_lines(expect, lines) 723 724 setl briopt+=shift:2 725 norm! 1gg 726 let lines = s:screen_lines(1, 20) 727 let expect = [ 728 \ " 1 aaaaaaaaaaaaaaaa", 729 \ " aaaaaaaaaaaaaa", 730 \ " aaaaaaaaaaaaaa", 731 \ ] 732 call s:compare_lines(expect, lines) 733 " Scroll down one screen line 734 norm! 5gj 735 let lines = s:screen_lines(1, 20) 736 let expect = [ 737 \ "--1 aaaaaaaaaaaaaa", 738 \ " aaaaaaaaaaaaaa", 739 \ " aaaaaaaaaaaaaa", 740 \ ] 741 call s:compare_lines(expect, lines) 742 743 call s:close_windows('set breakindent& briopt& cpo& number&') 744endfunc 745 746" vim: shiftwidth=2 sts=2 expandtab 747