@@ -37,6 +37,33 @@ let%expect_test _ =
37
37
(table (syntax heavy) (data ((row ((header () ))))) (align () )))))
38
38
(warnings () )) | }]
39
39
40
+ let bad_data =
41
+ test " {table absurd content}" ;
42
+ [% expect
43
+ {|
44
+ ((output (((f.ml (1 0 ) (1 22 )) (table (syntax heavy) (data () ) (align () )))))
45
+ (warnings
46
+ ( " File \" f.ml\" , line 1, characters 7-13:\
47
+ \n 'absurd' is not allowed in '{table ...}' (table).\
48
+ \n Suggestion: Move outside of {table ...}, or inside {tr ...}"
49
+ " File \" f.ml\" , line 1, characters 14-21:\
50
+ \n 'content' is not allowed in '{table ...}' (table).\
51
+ \n Suggestion: Move outside of {table ...}, or inside {tr ...}" ))) | }]
52
+
53
+ let bad_row =
54
+ test " {table {tr absurd content}}" ;
55
+ [% expect
56
+ {|
57
+ ((output
58
+ (((f.ml (1 0 ) (1 27 )) (table (syntax heavy) (data ((row () ))) (align () )))))
59
+ (warnings
60
+ ( " File \" f.ml\" , line 1, characters 11-17:\
61
+ \n 'absurd' is not allowed in '{tr ...}' (table row).\
62
+ \n Suggestion: Move outside of {table ...}, or inside {td ...} or {th ...}"
63
+ " File \" f.ml\" , line 1, characters 18-25:\
64
+ \n 'content' is not allowed in '{tr ...}' (table row).\
65
+ \n Suggestion: Move outside of {table ...}, or inside {td ...} or {th ...}" ))) | }]
66
+
40
67
let multiple_headers =
41
68
test " {table {tr {th}} {tr {th}} {tr {td}}}" ;
42
69
[% expect
0 commit comments