diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
commit | 4b795f65d52cde0d136c0175ce20101946378b54 (patch) | |
tree | 07b9b0c89193d379ff6971be01a8ca1e3e6931ca /macros/luatex/generic/barracuda/test/test-i2of5 | |
parent | fc358ce7332053945afe16ced2a271556cdccfb7 (diff) |
CTAN sync 202002050303
Diffstat (limited to 'macros/luatex/generic/barracuda/test/test-i2of5')
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.pdf | bin | 19127 -> 19136 bytes | |||
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.tex | 22 | ||||
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.pdf | bin | 0 -> 16052 bytes | |||
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.tex | 53 |
4 files changed, 64 insertions, 11 deletions
diff --git a/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.pdf b/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.pdf Binary files differindex 3aa107681c..f2dbd6f9ea 100644 --- a/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.pdf +++ b/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.pdf diff --git a/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.tex b/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.tex index 43c652d66a..0062b74d3e 100644 --- a/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.tex +++ b/macros/luatex/generic/barracuda/test/test-i2of5/001-i2of5-test.tex @@ -1,5 +1,5 @@ % !TeX program = LuaTeX -% Copyright (C) 2019 Roberto Giacomelli +% Copyright (C) 2020 Roberto Giacomelli \newbox\mybox \nopagenumbers @@ -11,7 +11,7 @@ Interleaved 2 of 5 encoder test. Test 1: one simple barcode with default parameters: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:new_encoder("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(54654681); assert(not err, err) @@ -25,7 +25,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 2: one simple barcode with default parameter: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(1234567895); assert(not err, err) local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) @@ -57,7 +57,7 @@ local code = { 5317837, 4117698, } -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) for _, n in ipairs(code) do local smbl, err = enc:from_uint(n, {check_digit_policy="verify"}) @@ -86,7 +86,7 @@ local code = { ["531783"] = 7, ["411769"] = 8, } -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) for sc, ck in pairs(code) do local n = tonumber(sc) @@ -100,7 +100,7 @@ end Test 3: one simple barcode with check digit automatically added: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(454473, {check_digit_policy="add"}) assert(not err, err) @@ -114,7 +114,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 4: a second simple barcode with check digit automatically added: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(74223, {check_digit_policy="add"}) assert(not err, err) @@ -128,7 +128,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 5: a symbol with native check digits: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(121891259, {check_digit_policy="verify"}) assert(not err, err) @@ -142,7 +142,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 6: bearer bars please: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(747867239, {bearer_bars_enabled = true}) assert(not err, err) @@ -156,7 +156,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 7: bearer bars all around the symbol: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_uint(986790868, {bearer_bars_enabled = true, bearer_bars_layout="frame"}) assert(not err, err) @@ -170,7 +170,7 @@ drv:ga_to_hbox(canvas, "mybox") Test 8: bearer bars all around the symbol (with string costructor): \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) local symbo, err = enc:from_string("986790868", {bearer_bars_enabled = true, bearer_bars_layout="frame"}) assert(not err, err) diff --git a/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.pdf b/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.pdf Binary files differnew file mode 100644 index 0000000000..79a05eca42 --- /dev/null +++ b/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.pdf diff --git a/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.tex b/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.tex new file mode 100644 index 0000000000..52784b66bb --- /dev/null +++ b/macros/luatex/generic/barracuda/test/test-i2of5/002-ITF14-test.tex @@ -0,0 +1,53 @@ +% !TeX program = LuaTeX +% Copyright (C) 2020 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +\directlua{barracuda = require "barracuda"} + + +Test 2: Interleaved 2 of 5 encoder test for ITF14 variant. + +\directlua{ +local barcode = barracuda:barcode() +local enc = assert(barcode:new_encoder("i2of5-ITF14")) +local s1 = assert(enc:from_uint(1234567890123)) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vskip 10pt +12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule + +\directlua{ +local barcode = barracuda:barcode() +local enc = assert(barcode:enc_by_name("i2of5-ITF14")) +local s1 = assert(enc:from_string("1234567890123")) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vskip 10pt +12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule + +\directlua{ +local barcode = barracuda:barcode() +local enc = assert(barcode:enc_by_name("i2of5-ITF14")) +local s1 = assert(enc:from_string("(12) 34 56 78 90 12 3")) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vskip 10pt +12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule + +\bye + + |