Skip to content

Commit

Permalink
test(docx): add PNG fallback generation test for SVG
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
edwintorok committed Dec 27, 2023
1 parent 0892709 commit 779420b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/command/9288.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 779420b

Please sign in to comment.