function word_range_test ( )

%*****************************************************************************80
%
%% word_range_test() tests word_range().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 December 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_range_test():\n' );
  fprintf ( 1, '  word_range() finds the minimum and maximum I and J\n' );
  fprintf ( 1, '  coordinates of a polyabolo drawn from its boundary word\n' );
  fprintf ( 1, '  and starting at P.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '        Name  Imin  Imax  Jmin  Jmax  Pi  Pj  Word\n' );
  fprintf ( 1, '\n' );

  name = 'gort';
  [ w, p ] = gort_word ( );
  [ imin, imax, jmin, jmax ] = word_range ( w, p );
  fprintf ( 1, '  %10s  %4d  %4d  %4d  %4d  %2d  %2d  %s\n', ...
    name, imin, imax, jmin, jmax, p(1,1:2), ['"', w, '"'] );

  name = 'tiny';
  [ w, p ] = tiny_word ( );
  [ imin, imax, jmin, jmax ] = word_range ( w, p );
  fprintf ( 1, '  %10s  %4d  %4d  %4d  %4d  %2d  %2d  %s\n', ...
    name, imin, imax, jmin, jmax, p(1,1:2), ['"', w, '"'] );

  for index = 1 : 14
    [ gname, fname ] = tetrabolo_name ( index );
    [ w, p ] = tetrabolo_word ( index );
    [ imin, imax, jmin, jmax ] = word_range ( w, p );
    fprintf ( 1, '  %10s  %4d  %4d  %4d  %4d  %2d  %2d  %s\n', ...
      gname, imin, imax, jmin, jmax, p(1,1:2), ['"', w, '"'] );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_range_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

