diff options
Diffstat (limited to 'macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex')
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex index eeaf60e483..b5c081659e 100644 --- a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex +++ b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex @@ -1,5 +1,5 @@ % !TeX program = LuaTeX -% Copyright (C) 2019 Roberto Giacomelli +% Copyright (C) 2020 Roberto Giacomelli \newbox\mybox \nopagenumbers @@ -13,7 +13,7 @@ barracuda = require "barracuda" } \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local c128, err = barcode:new_encoder("code128") assert(not err, err) @@ -34,7 +34,7 @@ second one) takes the anchor parameters from the super class Barcode, while the second one takes anchors from itself: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local ok, err = barcode:set_param{ax = 1, ay = 1} % super class set up assert(ok, err) assert(barcode.ax == 1, "barcode ax is "..tostring(barcode.ax)) @@ -63,8 +63,9 @@ will take to super class Barcode, previously set to 1.0. So, the symbols will be aligned to the top: \directlua{ -local c128, err = barracuda:get_barcode_class() - :enc_by_name "code128"; assert(c128, err) +local c128, err = barracuda:barcode() + :enc_by_name "code128"; +assert(c128, err) local s, err = c128:from_string("123456"); assert(s, err) local canvas = barracuda:new_canvas() @@ -84,7 +85,7 @@ Test 4: set up vertical anchor globally to 0.0, locally to the encoder to 0.5 and locally to 1.0: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() % set ay globally to 0.0 local ok, err = barcode:set_param("ay", 0); assert(ok, err) @@ -108,8 +109,9 @@ drv:ga_to_hbox(canvas, "mybox") Test 5: uint() costructor and save a file with PDF literal code: \directlua{ -local barcode = barracuda:get_barcode_class() -local c128, err = barcode:enc_by_name("code128"); assert(c128, err) +local barcode = barracuda:barcode() +local c128, err = barcode:enc_by_name("code128"); +assert(c128, err) local s, e = c128:from_uint(1234567890); assert(s, e) local canvas = barracuda:new_canvas() local _, errc = s:append_ga(canvas); assert(not errc, errc) @@ -118,7 +120,7 @@ drv:ga_to_hbox(canvas, "mybox") drv:save("native", canvas, "02-05-pdfliteral") }\box\mybox -That's all folk! +That's all folks! \bye |