function s_to_caesar_test ( )

%*****************************************************************************80
%
%% s_to_caesar_test() tests s_to_caesar().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 January 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 's_to_caesar_test():\n' );
  fprintf ( 1, '  s_to_caesar() applies a Caesar Shift cipher to a string.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  S2 = S_TO_CAESAR ( S1, K ), varying K.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   K  ---------------S1----------------  ---------------S2----------------\n' );
  fprintf ( 1, '\n' );
  for k = -5 : 5
    s1 = 'A man, a plan, a canal: Panama!';
    s2 = s_to_caesar ( s1, k );
    fprintf ( 1, '  %2d  "%s"  "%s"\n', k, s1, s2 );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  S2 = S_TO_CAESAR ( S1,  K ).\n' );
  fprintf ( 1, '  S3 = S_TO_CAESAR ( S2, -K )\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   K  ------------S1------------  ------------S2------------  ------------S3------------\n' );
  fprintf ( 1, '\n' );
  for k = -5 : 5
    s1 = 'The key is under the mat';
    s2 = s_to_caesar ( s1, k );
    s3 = s_to_caesar ( s2, -k );
    fprintf ( 1, '  %2d  "%s"  "%s"  "%s"\n', k, s1, s2, s3 );
  end

  return
end

