diff --git a/test/qr.groovy b/test/qr.groovy index 20b5a79..25dfdb3 100644 --- a/test/qr.groovy +++ b/test/qr.groovy @@ -1,7 +1,7 @@ #!/usr/bin/env groovy -import com.google.zxing.BarcodeFormat -import com.google.zxing.qrcode.QRCodeWriter - -def w = new QRCodeWriter() -def m = w.encode("unsandbox-qr-ok", BarcodeFormat.QR_CODE, 0, 0) -println "QR:unsandbox-qr-ok:ROWS:${m.height}" +// Use qrencode CLI via ProcessBuilder (libqrencode wrapper) +def proc = ["qrencode", "-t", "UTF8", "-m", "0", "unsandbox-qr-ok"].execute() +def output = proc.text +proc.waitFor() +def rows = output.split('\n').findAll { it.trim() }.size() +println "QR:unsandbox-qr-ok:ROWS:${rows}"