@@ -377,6 +377,51 @@ describe('table', function()
377377 end )
378378 end )
379379
380+ it (' wrapped aligns unwrapped cells' , function ()
381+ util .setup .text ({
382+ ' ' ,
383+ ' |Left|Right|Center|Long|' ,
384+ ' |:---|----:|:----:|----|' ,
385+ ' |a|2|mid|one two three four five six seven|' ,
386+ }, {
387+ pipe_table = { max_table_width = 40 },
388+ win_options = { wrap = { default = false , rendered = true } },
389+ })
390+
391+ util .assert_screen ({
392+ ' ┌──────┬───────┬────────┬──────────────┐' ,
393+ ' │ Left │ Right │ Center │ Long │' ,
394+ ' ├━─────┼──────━┼━──────━┼──────────────┤' ,
395+ ' │ a │ 2 │ mid │ one two │' ,
396+ ' │ │ │ │ three four │' ,
397+ ' │ │ │ │ five six │' ,
398+ ' │ │ │ │ seven │' ,
399+ ' └──────┴───────┴────────┴──────────────┘' ,
400+ })
401+ end )
402+
403+ it (' wrapped aligns wrapped cells' , function ()
404+ util .setup .text ({
405+ ' ' ,
406+ ' | L | R | C |' ,
407+ ' |:--|--:|:-:|' ,
408+ ' | a | one two three four five six | one two three four five six |' ,
409+ }, {
410+ pipe_table = { max_table_width = 40 },
411+ win_options = { wrap = { default = false , rendered = true } },
412+ })
413+
414+ util .assert_screen ({
415+ ' ┌─────┬───────────────┬───────────────┐' ,
416+ ' │ L │ R │ C │' ,
417+ ' ├━────┼──────────────━┼━─────────────━┤' ,
418+ ' │ a │ one two │ one two │' ,
419+ ' │ │ three four │ three four │' ,
420+ ' │ │ five six │ five six │' ,
421+ ' └─────┴───────────────┴───────────────┘' ,
422+ })
423+ end )
424+
380425 it (' wrapped long delimiter' , function ()
381426 util .setup .text ({
382427 ' ' ,
0 commit comments