function isbn_check_digit_calculate_test ( )

%*****************************************************************************80
%
%% isbn_check_digit_calculate_test() tests isbn_check_digit_calculate().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 October 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'isbn_check_digit_calculate_test():\n' );
  fprintf ( 1, '  isbn_check_digit_calculate() calculates the 10-th digit\n' );
  fprintf ( 1, '  (the check digit) of a 10-digit ISBN.\n' );
  fprintf ( 1, '\n' );
%
%  Supply the full code, with dashes.
%
  s1 = '0-306-40615-2';
  c1 = '2';
  c2 = isbn_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, with spaces.
%
  s1 = '0 8493 9640';
  c1 = '9';
  c2 = isbn_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '158488059';
  c1 = '7';
  c2 = isbn_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '246897531';
  c1 = '6';
  c2 = isbn_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '135798642';
  c1 = '4';
  c2 = isbn_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is "%c", expecting "%c"\n', s1, c2, c1 );

  return
end
