summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex')
-rw-r--r--macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex19
1 files changed, 8 insertions, 11 deletions
diff --git a/macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex b/macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex
index a4ba3d6e81..884cdd0df4 100644
--- a/macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex
+++ b/macros/luatex/generic/barracuda/test/test-code39/003-code39-test.tex
@@ -1,20 +1,18 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
-Test 3: the same Code 39 symbol drawing multiple time on the same canvas
+Test 1: the same Code 39 symbol drawing multiple time on the same canvas
\directlua{
local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
- :new_encoder("code39")
-assert(not err, err)
-local err
-local symbol
-symbol, err = c39:from_string("ABCDEF12QJ31+")
-assert(not err, err)
+local c39 = assert(
+ barracuda:barcode()
+ :new_encoder("code39")
+)
+local symbol = assert(c39:from_string("ABCDEF12QJ31+"))
local ok, err = c39:set_param("text_vpos", "top")
assert(ok, err)
@@ -46,8 +44,7 @@ symbol:append_ga(canvas, tex.sp "9.0cm", tex.sp "-2.0cm")
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
\bye