function bank_check_digit_calculate_test ( )

%*****************************************************************************80
%
%% bank_check_digit_calculate_test() tests bank_check_digit_calculate().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 October 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'bank_check_digit_calculate_test():\n' );
  fprintf ( 1, '  bank_check_digit_calculate() calculates the 9-th digit\n' );
  fprintf ( 1, '  (the check digit) of a bank checksum.\n' );
  fprintf ( 1, '\n' );
%
%  Supply the full code, with dashes.
%
  s1 = '123-456-780';
  d1 = 0;
  d2 = bank_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is %d, expecting %d\n', s1, d2, d1 );
%
%  Supply a partial code, with spaces.
%
  s1 = '123 456 78';
  d1 = 0;
  d2 = bank_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is %d, expecting %d\n', s1, d2, d1 );
%
%  Supply the full code, with dashes.
%
  s1 = '323-371-076';
  d1 = 6;
  d2 = bank_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is %d, expecting %d\n', s1, d2, d1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '87654321';
  d1 = 2;
  d2 = bank_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is %d, expecting %d\n', s1, d2, d1 );
%
%  Supply a partial code, no spaces.
%
  s1 = '13579864';
  d1 = 3;
  d2 = bank_check_digit_calculate ( s1 );
  fprintf ( 1, '  Check digit of "%s" is %d, expecting %d\n', s1, d2, d1 );

  return
end
