function random_permutation_test ( )

%*****************************************************************************80
%
%% RANDOM_PERMUTATION_TEST tests RANDOM_PERMUTATION.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    21 February 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'RANDOM_PERMUTATION_TEST\n' );
  fprintf ( 1, '  RANDOM_PERMUTATION randomly permutes entries 1 through\n' );
  fprintf ( 1, '  N of a vector X[0:N+1].\n' );

  n = 5;
  x = zeros ( n + 2, 1 );
  for i = 0 : n + 1
    x(i+1) = i;
  end
  seed = 123456789;
  r8vec_print ( n + 2, x, '  Initial X:' )
  [ x, seed ] = random_permutation ( n, x, seed );
  r8vec_print ( n + 2, x, '  Permuted X:' );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'RANDOM_PERMUTATION_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

