function isbn13_is_valid_test ( )

%*****************************************************************************80
%
%% isbn13_is_valid_test() tests isbn13_is_valid().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 May 2026
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'isbn13_is_valid_test():\n' );
  fprintf ( 1, '  isbn13_is_valid() reports whether a ISBN13 is valid.\n' );
  fprintf ( 1, '\n' );
%
%  Supply a valid code, with dashes.
%
  s1 = '978-0-306-40615-7';
  value1 = true;
  value2 = isbn13_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Modify one digit.
%
  s1 = '978-0-326-80615-7';
  value1 = false;
  value2 = isbn13_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Supply a valid code, with spaces.
%
  s1 = '978 0 8493 9640 3';
  value1 = true;
  value2 = isbn13_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Modify the check digit.
%
  s1 = '978 0 8493 9640 9';
  value1 = false;
  value2 = isbn13_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Supply a valid code, with final digit '0'.
%
  s1 = '978-0-3878-9654-0';
  value1 = true;
  value2 = isbn13_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );

  return
end
