Correct pull request
This pull request will work. I will need to make an additional test for a key that lacks a private key, but that's the only thing lacking now as far as I know.
I'm sorry for wasting your time with the previous pull request. I did some formatting changes that I had to undo and while cherry-picking I merged the wrong things and didn't notice because I forgot to run make clean. So it was reusing the old compiled version.
~/git/jwt_io make check
swipl -s tests/jwt_io_unit.plt -g run_tests -t halt
% PL-Unit: jwt_io_unit ....................................... done
% All 39 tests passed
swipl -s tests/jwt_io_args.plt -g run_tests -t halt
% PL-Unit: jwt_args ... done
% All 3 tests passed
swipl -s tests/jwt_io_jwt.plt -g run_tests -t halt
% PL-Unit: jwt_io .................................. done
% All 34 tests passed