Skip to content

Commit

Permalink
Add back the toplevel test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drup committed Apr 11, 2018
1 parent 04d75d3 commit 3e69bb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 96 deletions.
86 changes: 5 additions & 81 deletions test/html_fail.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ Characters 6-14:
div [a [a []]] ;;
^^^^^^^^
Error: This expression has type
([> `A of [> `A of 'c ] as 'b ] as 'a) Tyxml.Html.elt =
'a Tyxml_html.elt
([> 'b Html_types.a ] as 'a) Tyxml.Html.elt = 'a Tyxml_html.elt
but an expression was expected of type
([< Html_types.div_content_fun ] as 'd) Tyxml.Html.elt =
'd Tyxml_html.elt
Type [> `A of 'b ] as 'a is not compatible with type
Type 'a = [> `A of 'b ] is not compatible with type
'd =
[< `A of Html_types.flow5_without_interactive
| `Abbr
Expand Down Expand Up @@ -92,82 +91,7 @@ Error: This expression has type
| `Video of Html_types.flow5_without_media
| `Video_interactive of Html_types.flow5_without_media
| `Wbr ]
Type [> `A of 'c ] as 'b is not compatible with type
Html_types.flow5_without_interactive =
[ `Abbr
| `Address
| `Article
| `Aside
| `Audio of Html_types.flow5_without_media
| `B
| `Bdo
| `Blockquote
| `Br
| `Button
| `Canvas of Html_types.flow5
| `Cite
| `Code
| `Command
| `Datalist
| `Del of Html_types.flow5
| `Dfn
| `Div
| `Dl
| `Em
| `Fieldset
| `Figure
| `Footer
| `Form
| `H1
| `H2
| `H3
| `H4
| `H5
| `H6
| `Header
| `Hgroup
| `Hr
| `I
| `Img
| `Input
| `Ins of Html_types.flow5
| `Kbd
| `Keygen
| `Label
| `Main
| `Map of Html_types.flow5
| `Mark
| `Menu
| `Meter
| `Nav
| `Noscript of Html_types.flow5_without_noscript
| `Object of Html_types.flow5
| `Ol
| `Output
| `P
| `PCDATA
| `Pre
| `Progress
| `Q
| `Ruby
| `Samp
| `Script
| `Section
| `Select
| `Small
| `Span
| `Strong
| `Style
| `Sub
| `Sup
| `Svg
| `Table
| `Textarea
| `Time
| `U
| `Ul
| `Var
| `Video of Html_types.flow5_without_media
| `Wbr ]
The second variant type does not allow tag(s) `A
Type 'b = [> `A of 'c ] is not compatible with type
Html_types.flow5_without_interactive
Types for tag `A are incompatible

8 changes: 0 additions & 8 deletions test/html_fail.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#use "topfind" ;;
#require "uutf" ;;
#require "re" ;;
#directory "lib" ;;
#directory "implem" ;;
#load "tyxml_f.cma" ;;
#load "tyxml.cma" ;;

open Tyxml.Html ;;

div [a [a []]] ;;
14 changes: 7 additions & 7 deletions test/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

(rule
((targets (html_fail.result))
(deps (html_fail.ml))
(action (system "TERM=dumb ${OCAML} -noinit -noprompt -ppx ./${exe:ppx.exe} < ${<} 2>&1 | tail -n +2 > ${@}"))
(deps (ppx.exe html_fail.ml))
(action (system "TERM=dumb ${OCAML} -I ../implem/.tyxml.objs/ -noinit -noprompt -ppx './${exe:ppx.exe} --as-ppx' < html_fail.ml 2>&1 | tail -n +3 > ${@}"))
))

; (alias
; ((name runtest)
; (deps (html_fail.result html_fail.expected))
; (action (run diff -dEbZBt html_fail.result html_fail.expected))
; ))
(alias
((name runtest)
(deps (html_fail.result html_fail.expected))
(action (diff html_fail.result html_fail.expected))
))

0 comments on commit 3e69bb2

Please sign in to comment.