Skip to content

Commit

Permalink
adding a test for varying number of cells
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Feb 13, 2023
1 parent bd19b75 commit d72b51c
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions test/test_tables.ml
Original file line number Diff line number Diff line change
Expand Up @@ -681,5 +681,65 @@ let%expect_test _ =
(warnings
( "File \"f.ml\", line 3, characters 11-18:\
\n'{[...]}' (code block) is not allowed in '{t ...}' (table)."))) |}]

let more_cells_later =
test
{|
{t
| x | y |
|---|---|
| x | y | z |
}
|};
[%expect
{|
((output
(((f.ml (2 6) (6 7))
(table (syntax light)
(data
((row
((header
(((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
(header
(((f.ml (3 13) (3 14))
(paragraph (((f.ml (3 13) (3 14)) (word y)))))))))
(row
((data
(((f.ml (5 9) (5 10)) (paragraph (((f.ml (5 9) (5 10)) (word x)))))))
(data
(((f.ml (5 13) (5 14))
(paragraph (((f.ml (5 13) (5 14)) (word y)))))))
(data
(((f.ml (5 17) (5 18))
(paragraph (((f.ml (5 17) (5 18)) (word z)))))))))))
(align (center center))))))
(warnings ())) |}]

let less_cells_later =
test
{|
{t
| x | y |
|---|---|
x
}
|};
[%expect
{|
((output
(((f.ml (2 6) (6 7))
(table (syntax light)
(data
((row
((header
(((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
(header
(((f.ml (3 13) (3 14))
(paragraph (((f.ml (3 13) (3 14)) (word y)))))))))
(row
((data
(((f.ml (5 7) (5 8)) (paragraph (((f.ml (5 7) (5 8)) (word x)))))))))))
(align (center center))))))
(warnings ())) |}]
end in
()

0 comments on commit d72b51c

Please sign in to comment.