@@ -767,37 +767,47 @@ tests =
767767 , "#+END_COMMENT"] =?>
768768 (mempty::Blocks)
769769
770− , "Figure" =:
771− unlines [ "#+caption: A very courageous man."
772− , "#+name: goodguy"
773− , "[[edward.jpg]]"
774− ] =?>
775− para (image "edward.jpg" "fig:goodguy" "A very courageous man.")
776−
777− , "Figure with no name" =:
778− unlines [ "#+caption: I've been through the desert on this"
779− , "[[horse.png]]"
780− ] =?>
781− para (image "horse.png" "fig:" "I've been through the desert on this")
782−
783− , "Figure with `fig:` prefix in name" =:
784− unlines [ "#+caption: Used as a metapher in evolutionary biology."
785− , "#+name: fig:redqueen"
786− , "[[the-red-queen.jpg]]"
787− ] =?>
788− para (image "the-red-queen.jpg" "fig:redqueen"
789− "Used as a metapher in evolutionary biology.")
790−
791− , "Figure with HTML attributes" =:
792− unlines [ "#+CAPTION: mah brain just explodid"
793− , "#+NAME: lambdacat"
794− , "#+ATTR_HTML: :style color: blue :role button"
795− , "[[lambdacat.jpg]]"
796− ] =?>
797− let kv = [("style", "color: blue"), ("role", "button")]
798− name = "fig:lambdacat"
799− caption = "mah brain just explodid"
800− in para (imageWith (mempty, mempty, kv) "lambdacat.jpg" name caption)
770+ , testGroup "Figures" $
771+ [ "Figure" =:
772+ unlines [ "#+caption: A very courageous man."
773+ , "#+name: goodguy"
774+ , "[[edward.jpg]]"
775+ ] =?>
776+ para (image "edward.jpg" "fig:goodguy" "A very courageous man.")
777+
778+ , "Figure with no name" =:
779+ unlines [ "#+caption: I've been through the desert on this"
780+ , "[[horse.png]]"
781+ ] =?>
782+ para (image "horse.png" "fig:" "I've been through the desert on this")
783+
784+ , "Figure with `fig:` prefix in name" =:
785+ unlines [ "#+caption: Used as a metapher in evolutionary biology."
786+ , "#+name: fig:redqueen"
787+ , "[[the-red-queen.jpg]]"
788+ ] =?>
789+ para (image "the-red-queen.jpg" "fig:redqueen"
790+ "Used as a metapher in evolutionary biology.")
791+
792+ , "Figure with HTML attributes" =:
793+ unlines [ "#+CAPTION: mah brain just explodid"
794+ , "#+NAME: lambdacat"
795+ , "#+ATTR_HTML: :style color: blue :role button"
796+ , "[[lambdacat.jpg]]"
797+ ] =?>
798+ let kv = [("style", "color: blue"), ("role", "button")]
799+ name = "fig:lambdacat"
800+ caption = "mah brain just explodid"
801+ in para (imageWith (mempty, mempty, kv) "lambdacat.jpg" name caption)
802+
803+ , "Labelled figure" =:
804+ unlines [ "#+CAPTION: My figure"
805+ , "#+LABEL: fig:myfig"
806+ , "[[blub.png]]"
807+ ] =?>
808+ let attr = ("fig:myfig", mempty, mempty)
809+ in para (imageWith attr "blub.png" "fig:" "My figure")
810+ ]
801811
802812 , "Footnote" =:
803813 unlines [ "A footnote[1]"