mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-09 19:29:34 +08:00
Move test and supplementary files to nearest package testdata.
This commit is contained in:
parent
96f358543a
commit
e254fd763c
@ -30,15 +30,15 @@ func init() {
|
||||
common.SetLogger(common.NewConsoleLogger(common.LogLevelDebug))
|
||||
}
|
||||
|
||||
const testPdfFile1 = "../../testfiles/minimal.pdf"
|
||||
const testPdfLoremIpsumFile = "../../testfiles/lorem.pdf"
|
||||
const testPdfTemplatesFile1 = "../../testfiles/templates1.pdf"
|
||||
const testImageFile1 = "../../testfiles/logo.png"
|
||||
const testImageFile2 = "../../testfiles/signature.png"
|
||||
const testRobotoRegularTTFFile = "../../testfiles/roboto/Roboto-Regular.ttf"
|
||||
const testRobotoBoldTTFFile = "../../testfiles/roboto/Roboto-Bold.ttf"
|
||||
const testWts11TTFFile = "../../testfiles/wts11.ttf"
|
||||
const testFreeSansTTFFile = "../../testfiles/FreeSans.ttf"
|
||||
const testPdfFile1 = "./testdata/minimal.pdf"
|
||||
const testPdfLoremIpsumFile = "./testdata/lorem.pdf"
|
||||
const testPdfTemplatesFile1 = "./testdata/templates1.pdf"
|
||||
const testImageFile1 = "./testdata/logo.png"
|
||||
const testImageFile2 = "./testdata/signature.png"
|
||||
const testRobotoRegularTTFFile = "./testdata/roboto/Roboto-Regular.ttf"
|
||||
const testRobotoBoldTTFFile = "./testdata/roboto/Roboto-Bold.ttf"
|
||||
const testWts11TTFFile = "./testdata/wts11.ttf"
|
||||
const testFreeSansTTFFile = "./testdata/FreeSans.ttf"
|
||||
|
||||
func TestTemplate1(t *testing.T) {
|
||||
creator := New()
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@ -156,7 +156,7 @@ func TestCharcodeBytesToUnicode(t *testing.T) {
|
||||
|
||||
var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
fontFragmentTest{"Helvetica built-in",
|
||||
"../../contrib/testdata/font/simple.txt", 1,
|
||||
"./testdata/font/simple.txt", 1,
|
||||
[]byte{32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
||||
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||||
@ -174,7 +174,7 @@ var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
"¸¹º»¼½¾¿ÀÁÂÃÄÅAEÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞfzàáâãäåaeçèéêëìíîïðñòóôõö÷øùúûüýþÿ",
|
||||
},
|
||||
fontFragmentTest{"Symbol built-in",
|
||||
"../../contrib/testdata/font/simple.txt", 3,
|
||||
"./testdata/font/simple.txt", 3,
|
||||
[]byte{32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
||||
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97,
|
||||
@ -188,7 +188,7 @@ var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
"ξψζ{|}∼€ϒ′≤⁄∞ƒ♣♦♥♠↔←↑→↓°±″≥×∝∂•÷≠≡≈…↵ℵℑℜ℘⊗⊕∅∩∪⊃⊇⊄⊂⊆∈∉∠∇∏√⋅¬∧∨⇔⇐⇑⇒⇓◊〈∑〉∫⌠⌡",
|
||||
},
|
||||
fontFragmentTest{"ZapfDingbats built-in",
|
||||
"../../contrib/testdata/font/simple.txt", 4,
|
||||
"./testdata/font/simple.txt", 4,
|
||||
[]byte{32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
||||
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||||
@ -204,7 +204,7 @@ var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
"➘➙➚➛➜➝➞➟➠➡➢➣➤➥➦➧➨➩➪➫➬➭➮➯➱➲➳➴➵➶➷➸➹➺➻➼➽➾",
|
||||
},
|
||||
fontFragmentTest{"MacRoman encoding",
|
||||
"../../contrib/testdata/font/axes.txt", 10,
|
||||
"./testdata/font/axes.txt", 10,
|
||||
[]byte{32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
||||
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||||
@ -222,7 +222,7 @@ var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
"±≤≥¥µ∂∑∏π∫ªºΩaeø¿¡¬√ƒ≈∆«»…ÀÃÕOEoe–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
|
||||
},
|
||||
fontFragmentTest{"Test beginbfchar and beginbfrange cmap entries",
|
||||
"../../contrib/testdata/font/Yemeni.txt", 470,
|
||||
"./testdata/font/Yemeni.txt", 470,
|
||||
[]byte{0x1, 0xa8, 0x1, 0xb3, 0x1, 0xc2, 0x1, 0xcc, 0x1, 0xe7, 0x1, 0xef, 0x1, 0xf3, 0x0,
|
||||
0x20, 0x1, 0xa2, 0x1, 0xfc, 0x2, 0x8, 0x1, 0xa6, 0x1, 0xe7, 0x0, 0x20, 0x2, 0xb, 0x0,
|
||||
0x20, 0x2, 0xf, 0x0, 0x20, 0x0, 0x20, 0x1, 0xdd, 0x0, 0x20, 0x0, 0xcd, 0x0, 0xce, 0x0,
|
||||
@ -230,23 +230,23 @@ var charcodeBytesToUnicodeTest = []fontFragmentTest{
|
||||
"ﺔﺟﺮﺸﻓﻛﻟ ﺎﻨﻴﺒﻓ ﻷ ﻻ ﻉ ٠١٢٣٤ﺍ ﺕﻭ",
|
||||
},
|
||||
fontFragmentTest{"TrueType font with ToUnicode cmap",
|
||||
"../../contrib/testdata/font/print_alerts.txt", 9,
|
||||
"./testdata/font/print_alerts.txt", 9,
|
||||
[]byte{43, 40, 41, 34, 37, 42, 38, 49, 36, 38, 48, 34, 35, 36, 37, 35, 36, 58},
|
||||
"Alerts on printing",
|
||||
},
|
||||
fontFragmentTest{"Type0 font with ToUnicode cmap",
|
||||
"../../contrib/testdata/font/CollazoBio.txt", 7,
|
||||
"./testdata/font/CollazoBio.txt", 7,
|
||||
[]byte{255, 50, 255, 65, 255, 78, 255, 68, 255, 79, 255, 77, 0, 32, 0, 32, 255, 77, 255, 65,
|
||||
255, 84, 255, 82, 255, 73, 255, 67, 255, 69, 255, 83, 0, 46},
|
||||
"Random matrices.",
|
||||
},
|
||||
fontFragmentTest{"Type1 font with FontFile entry",
|
||||
"../../contrib/testdata/font/lm.txt", 7,
|
||||
"./testdata/font/lm.txt", 7,
|
||||
[]byte{102, 65, 106, 66, 103},
|
||||
"{A|B}",
|
||||
},
|
||||
fontFragmentTest{"Type1 font with /Encoding with /Differences",
|
||||
"../../contrib/testdata/font/noise-invariant.txt", 102,
|
||||
"./testdata/font/noise-invariant.txt", 102,
|
||||
[]byte{96, 247, 39, 32, 147, 231, 148, 32, 232, 32, 193, 111, 180, 32, 105, 116,
|
||||
169, 115, 32, 204, 195, 196, 197, 198, 199, 168, 202, 206, 226, 234, 172, 244, 173, 151,
|
||||
177, 151, 178, 179, 183, 185, 188, 205, 184, 189},
|
||||
|
0
contrib/testdata/font/CollazoBio.txt → pdf/model/testdata/font/CollazoBio.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/CollazoBio.txt → pdf/model/testdata/font/CollazoBio.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/Yemeni.txt → pdf/model/testdata/font/Yemeni.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/Yemeni.txt → pdf/model/testdata/font/Yemeni.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/axes.txt → pdf/model/testdata/font/axes.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/axes.txt → pdf/model/testdata/font/axes.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/noise-invariant.txt → pdf/model/testdata/font/noise-invariant.txt
vendored
Executable file → Normal file
0
contrib/testdata/font/noise-invariant.txt → pdf/model/testdata/font/noise-invariant.txt
vendored
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user