Skip to content

Commit

Permalink
add test resource
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitkugler committed Nov 18, 2024
1 parent da6385e commit cab3414
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions html/document/draw_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package document

import (
"fmt"
"io"
"os"
"testing"
Expand Down Expand Up @@ -190,15 +189,25 @@ func TestLeaderCrash(t *testing.T) {
}

func TestDebug(t *testing.T) {
// baseUrl, _ := utils.PathToURL("../../resources_test/")

input := fmt.Sprintf(`
input := `
<style>
@page { size: 140px 110px }
table { width: 100px; height: 70px; margin: 10px; font-family: DejaVuSans;
border-collapse: collapse; border: 10px %s blue }
@page {
size: 20px 6px;
margin: 1px;
}
@font-face {
src: url(../resources_test/weasyprint.otb_fixed);
font-family: weasyprint-otb;
}
body {
color: red;
font-family: weasyprint-otb;
font-size: 4px;
line-height: 0.8;
}
</style>
<table><td>abc</td>`, "inset")
AaA`

doc, err := tree.NewHTML(utils.InputString(input), baseUrl, nil, "")
if err != nil {
t.Fatal(err)
Expand Down
Binary file added resources_test/weasyprint.otb_fixed
Binary file not shown.

0 comments on commit cab3414

Please sign in to comment.