Blob Blame History Raw
/* $XConsortium: StringToCT.dat /main/4 1995/07/17 10:25:45 drk $ */
/*
 * Motif
 *
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
 *
 * These libraries and programs are free software; you can
 * redistribute them and/or modify them under the terms of the GNU
 * Lesser General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * These libraries and programs are distributed in the hope that
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with these librararies and programs; if not, write
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA 02110-1301 USA
 * 
 */
/*
 * HISTORY
 */

#) An XmString is created with direction, charset, text and separator
   components.  The function XmStringGetNextComponent() is then called
   to traverse the XmString and retrieve each component along with
   its values.  The component types and values should be printed
   to stdout.

#) Verify that the following values are printed:

@) XmSTRING_COMPONENT_CHARSET: ISO8859-1
@) XmSTRING_COMPONENT_DIRECTION: XmSTRING_DIRECTION_R_TO_L
@) XmSTRING_COMPONENT_TEXT: This is a test.
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_DIRECTION: XmSTRING_DIRECTION_L_TO_R
@) XmSTRING_COMPONENT_TEXT: This is only a test.

C)

#) The function XmCvtXmStringToCT() is called to convert the
   XmString to a (char *) string in compound text format.
   The converted string should be printed to stdout. 

#) Verify that the following string is printed:

@) 2]This is a test.
@)
@) 1]This is only a test.

#) There should be two blank lines between the lines of text.

C)

#) The function XmCvtCTToXmString() is then called to convert the
   (char *) string in compound text format to an XmString.
   XmStringGetNextComponent() is then called to traverse the XmString
   and retrieve each of the components and their values.
   The components obtained and their values should be printed to stdout.

#) Verify that the following values are printed:

@) XmSTRING_COMPONENT_DIRECTION: XmSTRING_DIRECTION_R_TO_L
@) XmSTRING_COMPONENT_CHARSET: ISO8859-1
@) XmSTRING_COMPONENT_TEXT: This is a test.
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_SEPARATOR: True
@) XmSTRING_COMPONENT_DIRECTION: XmSTRING_DIRECTION_L_TO_R
@) XmSTRING_COMPONENT_CHARSET: ISO8859-1
@) XmSTRING_COMPONENT_TEXT: This is only a test.

#) The component types and component values are then compared
   to the component types and values in the original XmString.
   A message will be printed to stdout indicating whether
   XmCvtCTToXmString() passed or failed based on these
   comparison tests.

C)
E)