From 779420b240bcb56289805aa451635e7aad8830a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 27 Dec 2023 16:32:49 +0000 Subject: [PATCH] test(docx): add PNG fallback generation test for SVG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just look at --trace output. Can't use a golden test because the actual .png will be different depending on rsvg-convert version. Signed-off-by: Edwin Török --- test/command/9288.md | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/command/9288.md diff --git a/test/command/9288.md b/test/command/9288.md new file mode 100644 index 0000000000000..359367d04d91f --- /dev/null +++ b/test/command/9288.md @@ -0,0 +1,49 @@ +``` +% pandoc -f native -t docx -o 9288.docx --trace --quiet +[ Figure + ( "" , [] , [] ) + (Caption Nothing [ Plain [ Str "5in" ] ]) + [ Plain + [ Image + ( "" , [] , [ ( "width" , "5in" ) ] ) + [ Str "5in" ] + ( "command/SVG_logo.svg" , "" ) + ] + ] +, Figure + ( "" , [] , [] ) + (Caption Nothing [ Plain [ Str "5in" ] ]) + [ Plain + [ Image + ( "" , [] , [ ( "width" , "5in" ) ] ) + [ Str "5in" ] + ( "command/SVG_logo.svg" , "" ) + ] + ] +, Figure + ( "" , [] , [] ) + (Caption Nothing [ Plain [ Str "80%" ] ]) + [ Plain + [ Image + ( "" , [] , [ ( "width" , "80%" ) ] ) + [ Str "5in" ] + ( "command/SVG_logo.svg" , "" ) + ] + ] +, Figure + ( "" , [] , [] ) + (Caption Nothing [ Plain [ Str "default" ] ]) + [ Plain + [ Image + ( "" , [] , [] ) + [ Str "5in" ] + ( "command/SVG_logo.svg" , "" ) + ] + ] +] +^D +2> [trace] rsvg-convert -f png -a --dpi-x 96 --dpi-y 96 --width 360.000000pt --height 360.000000pt +2> [trace] rsvg-convert -f png -a --dpi-x 96 --dpi-y 96 --width 360.000000pt --height 360.000000pt +2> [trace] rsvg-convert -f png -a --dpi-x 96 --dpi-y 96 --width 75.000000pt --height 75.000000pt +2> [trace] rsvg-convert -f png -a --dpi-x 96 --dpi-y 96 --width 75.000000pt --height 75.000000pt +```