function boundary_sort_test ( )

%*****************************************************************************80
%
%% boundary_sort_test() tests boundary_sort().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_sort_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_sort() is given a polyiamond boundary word\n' );
  fprintf ( 1, '  and sorts it to have lexically smallest base point.\n' );

  w = '432105'; 
  p = [ 5, 10 ];
  boundary_print ( w, p, '  hexagon boundary word (rotated)' );

  [ w2, p2 ] = boundary_sort ( w, p );
  boundary_print ( w2, p2, '  sorted hexagon boundary word' );

  [ w, p ] = boundary_hexiamond ( 10 );
  boundary_print ( w, p, '  snake boundary word' );

  [ w2, p2 ] = boundary_sort ( w, p );
  boundary_print ( w2, p2, '  sorted snake boundary word' );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_sort_test()\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

