function perm1_unrank_test ( )

%*****************************************************************************80
%
%% perm1_unrank_test() tests perm1_unrank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 June 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;
  fprintf ( 1, '\n' );
  fprintf ( 1, 'perm1_unrank_test():\n' );
  fprintf ( 1, '  perm1_unrank() given a rank, computes the\n' );
  fprintf ( 1, '  corresponding permutation of (1,...,N).\n' );
  fprintf ( 1, '\n' );
  rank = 6;
  fprintf ( 1, '  The requested rank is %d\n', rank );
 
  p = perm1_unrank ( n, rank );
 
  perm1_print ( n, p, '  The permutation:' );
 
  return
end
