function isbn13_check_digit_test ( )

%*****************************************************************************80
%
%% isbn13_check_digit__test() tests isbn13_check_digit_().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 May 2026
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'isbn13_check_digit__test():\n' );
  fprintf ( 1, '  isbn13_check_digit() calculates the 13-th digit\n' );
  fprintf ( 1, '  (the check digit) of a 13-digit ISBN.\n' );
  fprintf ( 1, '\n' );
%
%  Supply the full code, with dashes.
%
  s1 = '978-0-306-40615-2?';
  c1 = '7';
  c2 = isbn13_check_digit ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, with spaces.
%
  s1 = '978 0 8493 9640?';
  c1 = '3';
  c2 = isbn13_check_digit ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '978158488059?';
  c1 = '2';
  c2 = isbn13_check_digit ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '978246897531?';
  c1 = '1';
  c2 = isbn13_check_digit ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '978135798642?';
  c1 = '1';
  c2 = isbn13_check_digit ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );

  return
end
