diff options
| author | Niklas Eicker <git@nikl.me> | 2025-01-08 10:38:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 09:38:34 +0000 |
| commit | 0a374d238016c0101d11cbc3f4bc621f3895ad36 (patch) | |
| tree | 5799e3c279e70a371fe7d737ac3ff37655827910 /tests | |
| parent | 265df6c29f4d142a372917dd708bfba780f7cfbc (diff) | |
Embed files associated with the document as a whole (#5221)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/pdf/embed.typ | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/suite/pdf/embed.typ b/tests/suite/pdf/embed.typ new file mode 100644 index 00000000..bb5c9316 --- /dev/null +++ b/tests/suite/pdf/embed.typ @@ -0,0 +1,30 @@ +// Test file embeddings. The tests here so far are unsatisfactory because we +// have no PDF testing infrastructure. That should be improved in the future. + +--- pdf-embed --- +#pdf.embed("/assets/text/hello.txt") +#pdf.embed( + "/assets/data/details.toml", + relationship: "supplement", + mime-type: "application/toml", + description: "Information about a secret project", +) + +--- pdf-embed-invalid-relationship --- +#pdf.embed( + "/assets/text/hello.txt", + // Error: 17-23 expected "source", "data", "alternative", "supplement", or none + relationship: "test", + mime-type: "text/plain", + description: "A test file", +) + +--- pdf-embed-decode --- +#pdf.embed.decode("hello.txt", read("/assets/text/hello.txt")) +#pdf.embed.decode( + "a_file_name.txt", + read("/assets/text/hello.txt"), + relationship: "supplement", + mime-type: "text/plain", + description: "A description", +) |
