function isbn_is_valid_test ( )

%*****************************************************************************80
%
%% isbn_is_valid_test() tests isbn_is_valid().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'isbn_is_valid_test():\n' );
  fprintf ( 1, '  isbn_is_valid() reports whether a ISBN is valid.\n' );
  fprintf ( 1, '\n' );
%
%  Supply a valid code, with dashes.
%
  s1 = '0-306-40615-2';
  value1 = 1;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Modify one digit.
%
  s1 = '0-326-40615-2';
  value1 = 0;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Supply a valid code, with spaces.
%
  s1 = '0 8493 9640 9';
  value1 = 1;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Modify the check digit.
%
  s1 = '0 8493 9640 3';
  value1 = 0;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Supply a valid code, with final digit 'X'.
%
  s1 = '0-3870-9654-X';
  value1 = 1;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Supply a valid code, with final digit 'x'.
%
  s1 = '0-201-38597-x';
  value1 = 1;
  value2 = isbn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );

  return
end
