function luhn_is_valid_test ( )

%*****************************************************************************80
%
%% luhn_is_valid_test() tests luhn_is_valid().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'luhn_is_valid_test():\n' );
  fprintf ( 1, '  LUHN_IS_VALID determines whether a string with final\n' );
  fprintf ( 1, '  Luhn check digit is valid.\n' );
  fprintf ( 1, '\n' );

  s1 = '79927398713';
  value1 = 1;
  value2 = luhn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Change a digit.
%
  s1 = '79924398713';
  value1 = 0;
  value2 = luhn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );
%
%  Change a check digit.
%
  s1 = '79927398711';
  value1 = 0;
  value2 = luhn_is_valid ( s1 );
  fprintf ( 1, '  Validity of "%s" is %d, expecting %d\n', s1, value2, value1 );

  return
end
