Blame tests/Toolkit/README

Packit b099d7
/* $XConsortium: README /main/4 1996/07/15 14:25:32 drk $ */
Packit b099d7
3.  OSF/Motif Toolkit Tests
Packit b099d7
Packit b099d7
This README describes the OSF/Motif Toolkit tests.  It pro-
Packit b099d7
vides information about the individual tests, and offers
Packit b099d7
instructions for running and interpreting the tests and test
Packit b099d7
output.
Packit b099d7
Packit b099d7
                            Note
Packit b099d7
Packit b099d7
Throughout this README, we use the path ./tests/Toolkit to
Packit b099d7
identify the top directory of the Toolkit tests.  The ./
Packit b099d7
indicates the testing tree root and is not an actual path
Packit b099d7
designation.  For example, if you installed the Motif 1.1
Packit b099d7
release software at /source/Motif, then ./tests/Toolkit
Packit b099d7
translates to /source/Motif/tests/Toolkit at your site.
Packit b099d7
Packit b099d7
3.1  Overview and Directory Structure
Packit b099d7
Packit b099d7
The OSF/Motif Toolkit test directory, ./tests/Toolkit, con-
Packit b099d7
sists of several files and subdirectories:
Packit b099d7
Packit b099d7
   * The file Imakefile is used to build Makefile, which in it's turn
Packit b099d7
	is used to build the tests.
Packit b099d7
Packit b099d7
   * The subdirectory ./tests/Toolkit/bitmaps contains bit-
Packit b099d7
     maps used by some of the Toolkit tests.
Packit b099d7
Packit b099d7
   * The Buttons subdirectory contains the toolkit tests of
Packit b099d7
     Button widgets and gadgets.  This test subdirectory
Packit b099d7
     contains the following tests.
Packit b099d7
Packit b099d7
     ArrowBGad1   ArrowBtn4   PushBtn2
Packit b099d7
     ArrowBGad2   DrawnBtn1   ToggleBGad1
Packit b099d7
     ArrowBGad3   DrawnBtn2   ToggleBGad2
Packit b099d7
     ArrowBGad4   PushBGad1   ToggleBGad3
Packit b099d7
     ArrowBGad5   PushBGad2   ToggleBGad4
Packit b099d7
     ArrowBtn1    PushBGad3   ToggleBtn1
Packit b099d7
     ArrowBtn2    PushBGad4   ToggleBtn2
Packit b099d7
     ArrowBtn3    PushBtn1
Packit b099d7
Packit b099d7
   * The Constraint subdirectory contains the toolkit tests
Packit b099d7
     of Form and PanedWindow constraints.  This test sub-
Packit b099d7
     directory contains the following tests.
Packit b099d7
Packit b099d7
     Form1    Form16      PanedWin1
Packit b099d7
     Form2    Form17      PanedWin2
Packit b099d7
     Form3    Form18      PanedWin3
Packit b099d7
     Form4    Form19      PanedWin4
Packit b099d7
     Form5    Form20      PanedWin5
Packit b099d7
     Form6    Form21      PanedWin6
Packit b099d7
     Form7    Form22      PanedWin7
Packit b099d7
     Form8    Form23      PanedWin8
Packit b099d7
     Form9    Form24      PanedWin9
Packit b099d7
     Form10   Form25      PanedWin10
Packit b099d7
     Form11   Form26      PanedWin11
Packit b099d7
     Form12   Form27      PanedWin12
Packit b099d7
     Form13   Form28      PanedWin13
Packit b099d7
     Form14   FormDia1    PanedWin14
Packit b099d7
     Form15   PanedWin1
Packit b099d7
Packit b099d7
   * The CutPaste subdirectory contains the toolkit tests of
Packit b099d7
     the cut and paste mechanisms.  This test subdirectory
Packit b099d7
     contains the following tests.
Packit b099d7
Packit b099d7
     Cutpaste1    Cutpaste3    icccm
Packit b099d7
     Cutpaste2a   Cutpaste4a   multi
Packit b099d7
     Cutpaste2b   Cutpaste4b
Packit b099d7
Packit b099d7
   * The List subdirectory contains the toolkit tests of the
Packit b099d7
     List widget.  This test subdirectory contains the fol-
Packit b099d7
     lowing tests.
Packit b099d7
Packit b099d7
     List1   List5         ScrollList2
Packit b099d7
     List2   List6         ScrollList3
Packit b099d7
     List3   List7         ScrollList4
Packit b099d7
     List4   ScrollList1
Packit b099d7
Packit b099d7
   * The Manager subdirectory contains the toolkit tests of
Packit b099d7
     the various manager widgets.  This test subdirectory
Packit b099d7
     contains the following tests.
Packit b099d7
Packit b099d7
     BBoard1   BBoard7     Frame1
Packit b099d7
     BBoard2   DrawArea1   Frame2
Packit b099d7
     BBoard3   DrawArea2   Frame3
Packit b099d7
     BBoard4   RowCol1     Frame4
Packit b099d7
     BBoard5   RowCol2
Packit b099d7
     BBoard6   RowCol3
Packit b099d7
Packit b099d7
   * The Menus subdirectory contains the toolkit tests of
Packit b099d7
     Menus and Menu systems.  This test subdirectory con-
Packit b099d7
     tains the following tests.
Packit b099d7
Packit b099d7
     Menu1   MenuBar1      PopupMenu1
Packit b099d7
     Menu2   MenuGad1      PopupMenu2
Packit b099d7
     Menu3   OptionMenu1   RowCol1
Packit b099d7
     Menu4   OptionMenu2   RowCol2
Packit b099d7
     Menu5   OptionMenu3   Simple1
Packit b099d7
     Menu6   OptionMenu4   WindowMenu1
Packit b099d7
Packit b099d7
   * The Message subdirectory contains the toolkit tests of
Packit b099d7
     MessageBoxes.  This test subdirectory contains the fol-
Packit b099d7
     lowing tests.
Packit b099d7
Packit b099d7
     ErrorDia1     MessageBox5   QuestionDia1
Packit b099d7
     InfoDia1      MessageBox6   QuestionDia2
Packit b099d7
     MessageBox1   MessageBox7   WarningDia1
Packit b099d7
     MessageBox2   MessageBox8   WorkingDia1
Packit b099d7
     MessageBox3   MessageDia1
Packit b099d7
     MessageBox4   MessageDia2
Packit b099d7
Packit b099d7
   * The Other subdirectory contains the toolkit tests of
Packit b099d7
     miscellaneous toolkit functions.  This test subdirec-
Packit b099d7
     tory contains the following tests.
Packit b099d7
Packit b099d7
     Color1        Navigation5    Navigation11
Packit b099d7
     Grab1         Navigation6    ResPartOff
Packit b099d7
     Navigation1   Navigation7    TrackingLoc1
Packit b099d7
     Navigation2   Navigation8    Conversion1
Packit b099d7
     Navigation3   Navigation9    Conversion2
Packit b099d7
     Navigation4   Navigation10
Packit b099d7
Packit b099d7
   * The Primitive subdirectory contains the toolkit tests
Packit b099d7
     of primitive Motif widgets and gadgets.  This test sub-
Packit b099d7
     directory contains the following tests.
Packit b099d7
Packit b099d7
     Label1      Scrollbar1   Scrollbar8
Packit b099d7
     Label2      Scrollbar2   Scrollbar9
Packit b099d7
     Label3      Scrollbar3   Scrollbar10
Packit b099d7
     Label4      Scrollbar4   Scrollbar11
Packit b099d7
     Label5      Scrollbar5   Separ1
Packit b099d7
     Label6      Scrollbar6   SeparGad1
Packit b099d7
     LabelGad1   Scrollbar7
Packit b099d7
Packit b099d7
   * The Select subdirectory contains the toolkit tests of
Packit b099d7
     selection dialogs and Scale.  This test subdirectory
Packit b099d7
     contains the following tests.
Packit b099d7
Packit b099d7
     Command1      Scale1   Scale7
Packit b099d7
     Command2      Scale2   Scale8
Packit b099d7
     Command3      Scale3   Scale9
Packit b099d7
     FileSelect1   Scale4   Scale10
Packit b099d7
     FileSelect2   Scale5   SelectBox1
Packit b099d7
     PromptDia1    Scale6
Packit b099d7
Packit b099d7
   * The Shells subdirectory contains the toolkit tests of
Packit b099d7
     shells.  This test subdirectory contains the following
Packit b099d7
     tests.
Packit b099d7
Packit b099d7
     DiaShell1   DiaShell2
Packit b099d7
Packit b099d7
   * The Text subdirectory contains the toolkit tests of the
Packit b099d7
     Text and TextField widgets.  This test subdirectory
Packit b099d7
     contains the following tests.
Packit b099d7
Packit b099d7
     ScrollText1   Text3   Text8
Packit b099d7
     ScrollText2   Text4   Text9
Packit b099d7
     ScrollText3   Text5   TextField1
Packit b099d7
     Text1         Text6   TextField2
Packit b099d7
     Text2         Text7
Packit b099d7
Packit b099d7
   * The Windows subdirectory contains the toolkit tests of
Packit b099d7
     MainWindows and ScrolledWindows.  This test subdirec-
Packit b099d7
     tory contains the following tests.
Packit b099d7
Packit b099d7
     MainWin1     ScrollWin2   ScrollWin5
Packit b099d7
     MainWin2     ScrollWin3
Packit b099d7
     ScrollWin1   ScrollWin4
Packit b099d7
Packit b099d7
Each test subdirectory contains the following common files.
Packit b099d7
Each test subdirectory may not contain all of the different
Packit b099d7
files.
Packit b099d7
Packit b099d7
   * The file Imakefile is used to build Makefile, which in it's turn
Packit b099d7
	is used to build the tests.
Packit b099d7
Packit b099d7
   * The README file contains information specific to that
Packit b099d7
     test directory's build and run procedure.  A README
Packit b099d7
     file will only exist if the test subdirectory has a
Packit b099d7
     nonstandard build or run procedure, or if a bug exists
Packit b099d7
     in one of the tests.
Packit b099d7
Packit b099d7
   * The file RUN is used to run all the Toolkit tests in
Packit b099d7
     series.  In some instances the RUN script also initial-
Packit b099d7
     izes a test before running it.
Packit b099d7
Packit b099d7
   * Test source files consisting of the suffixes .c, .h,
Packit b099d7
     and .uil.
Packit b099d7
Packit b099d7
   * The file allheaders.h contains declarations used by
Packit b099d7
     most of the tests.
Packit b099d7
Packit b099d7
3.2  Compiling the Tests
Packit b099d7
Packit b099d7
All the tests must be compiled before you can run them.
Packit b099d7
Packit b099d7
   * If you used the global build process after installing
Packit b099d7
     the software, the tests should already be built.  We do
Packit b099d7
     not recommend building the tests with global build pro-
Packit b099d7
     cess because of the size of the test suite.  (This
Packit b099d7
     assumes that you did not move the test suite files
Packit b099d7
     prior to invoking the make commands.)
Packit b099d7
Packit b099d7
   * If you did not include the test suite files in your
Packit b099d7
     initial global build process, you can build the tests
Packit b099d7
     now using the make all command from the ./tests/Toolkit
Packit b099d7
     directory.
Packit b099d7
Packit b099d7
   * You can build just the tests in one test subdirectory
Packit b099d7
     using the make all command from the specific test sub-
Packit b099d7
     directory.  For example, to build the tests in the List
Packit b099d7
     subdirectory, enter the make all command from the
Packit b099d7
     ./tests/Toolkit/List test subdirectory.
Packit b099d7
Packit b099d7
The compiled tests use a large amount of disk space.  You
Packit b099d7
may prefer to build each test separately if disk space is
Packit b099d7
limited at your site. You can build each test individually
Packit b099d7
using the make command for each test.  For example, to build
Packit b099d7
the Text4 test in the Text test subdirectory, enter the com-
Packit b099d7
mand make Text4 from the ./tests/Toolkit/Text test subdirec-
Packit b099d7
tory.
Packit b099d7
Packit b099d7
3.3  Running the Toolkit Tests
Packit b099d7
Packit b099d7
The tests in this section are interactive tests.  They
Packit b099d7
include a MessageBox with instructions for running and
Packit b099d7
interpreting the test.  The MessageBox provides step-by-step
Packit b099d7
instructions for running each test.  The instructions assume
Packit b099d7
you have a general knowledge of Motif behavior, and often
Packit b099d7
omit simple descriptions of what to expect after each step.
Packit b099d7
For example, if the instructions say that you should resize
Packit b099d7
a window, they assume that you know to look for problems in
Packit b099d7
resizing, such as improper layout after the resize, or
Packit b099d7
visual corruption of the elements.
Packit b099d7
Packit b099d7
The instructions also often omit repetitive instructions or
Packit b099d7
results.  For example, if the instructions say that you
Packit b099d7
should press the button marked Clear and that this should
Packit b099d7
clear a text area, they assume that you will look for the
Packit b099d7
text area to clear every time you are instructed to press
Packit b099d7
the Clear button in that test.
Packit b099d7
Packit b099d7
You can run all the tests in a test subdirectory in series
Packit b099d7
with the RUN script in the specific test subdirectory.  In
Packit b099d7
some cases the RUN script initializes a test or cleans up
Packit b099d7
after a test is executed.  These initialization and cleanup
Packit b099d7
procedures are described where appropriate in the following
Packit b099d7
information about running the tests individually.
Packit b099d7
Packit b099d7
To run most of the tests individually, simply enter the name
Packit b099d7
of the compiled test in the appropriate test subdirectory.
Packit b099d7
For example, enter PushBtn1 in the ./tests/Toolkit/Buttons
Packit b099d7
test subdirectory to run the PushBtn1 test.
Packit b099d7
Packit b099d7
The following tests require special initialization and
Packit b099d7
cleanup procedures.
Packit b099d7
Packit b099d7
CutPaste/CutPaste2*
Packit b099d7
                  This test requires multiple clients to
Packit b099d7
                  test cut and paste interaction among mul-
Packit b099d7
                  tiple clients.  First, two instances of
Packit b099d7
                  Cutpaste2a should be started up.  Second,
Packit b099d7
                  Cutpaste2b should be started up.  Then the
Packit b099d7
                  instructions can be followed correctly.
Packit b099d7
                  The RUN script simply insures that after
Packit b099d7
                  the test is completed, all the clients are
Packit b099d7
                  properly killed.  The script RUN_CP2 runs
Packit b099d7
                  this test independently.
Packit b099d7
Packit b099d7
CutPaste/Cutpaste4*
Packit b099d7
                  This test requires two clients to test cut
Packit b099d7
                  and paste interaction between clients.
Packit b099d7
                  Both Cutpaste4a and Cutpaste4b should be
Packit b099d7
                  started up, then the instructions can be
Packit b099d7
                  followed correctly.  The RUN script simply
Packit b099d7
                  insures that after the test is completed,
Packit b099d7
                  both clients are properly killed.  The
Packit b099d7
                  script RUN_CP4 runs this test indepen-
Packit b099d7
                  dently.
Packit b099d7
Packit b099d7
List/List3
Packit b099d7
                  This test requires special resources
Packit b099d7
                  located in the file List3DB.  The RUN
Packit b099d7
                  script saves the current resources, merges
Packit b099d7
                  in the new resources, runs the test, and
Packit b099d7
                  then restores the old resources using the
Packit b099d7
                  following commands.
Packit b099d7
Packit b099d7
                  xrdb -e /tmp/$$tmp1
Packit b099d7
                  xrdb -merge List3DB
Packit b099d7
                  List3
Packit b099d7
                  xrdb -load /tmp/$$tmp1
Packit b099d7
Packit b099d7
Other/Conversion1 This test is not interactive.  The results
Packit b099d7
                  of the test are sent to the standard out-
Packit b099d7
                  put.  The RUN script simply redirects the
Packit b099d7
                  results to the file conversion1.out.  This
Packit b099d7
                  test should produce a series of warning
Packit b099d7
                  messages.
Packit b099d7
Packit b099d7
Other/Conversion2 This test is not interactive.  The results
Packit b099d7
                  of the test are sent to the standard out-
Packit b099d7
                  put.  The RUN script simply redirects the
Packit b099d7
                  results to the file conversion2.out.  This
Packit b099d7
                  test should produce a series of warning
Packit b099d7
                  messages.
Packit b099d7
Packit b099d7
Select/FileSelect* This test relies on the file structure in
Packit b099d7
                  the directory ./tests/Toolkit/Select/FS
Packit b099d7
                  being available in the directory /tmp.
Packit b099d7
                  The RUN script executes the
Packit b099d7
                  ./tests/Toolkit/Select/setup script, which
Packit b099d7
                  copies the FS directory structure into
Packit b099d7
                  /tmp.  The RUN script then executes the
Packit b099d7
                  tests FileSelect1 and FileSelect2, and
Packit b099d7
                  finally executes the
Packit b099d7
                  ./tests/Toolkit/Select/clean script, which
Packit b099d7
                  removes the FS directory structure from
Packit b099d7
                  /tmp.
Packit b099d7
Packit b099d7
The program icccm is a simple client that is implemented
Packit b099d7
using the clipboard mechanism described by the ICCCM.  It
Packit b099d7
does not use any Motif clipboard mechanisms.  It contains
Packit b099d7
the following six PushButtons:
Packit b099d7
Packit b099d7
Request TARGETS   Prints to the standard output the results
Packit b099d7
                  of XConvertSelection from the clipboard
Packit b099d7
                  with ICCCM XA_TARGETS atom as the type
Packit b099d7
                  selected.
Packit b099d7
Packit b099d7
Request formats   Prints the results of XConvertSelection
Packit b099d7
                  through a loop of any data in the clip-
Packit b099d7
                  board found during the TARGETS request.
Packit b099d7
Packit b099d7
Request MULTIPLE  Does the same thing as Request formats
Packit b099d7
                  except it uses the ICCCM atom XA_MULTIPLE
Packit b099d7
                  and makes only one XConvertSelection call
Packit b099d7
                  to get all the TARGETS data.
Packit b099d7
Packit b099d7
Request TIMESTAMP Prints the results of XConvertSelection
Packit b099d7
                  using the ICCCM XA_TIMESTAMP atom.
Packit b099d7
Packit b099d7
Own CLIPBOARD     Calls XSetSelectionOwner setting itself as
Packit b099d7
                  the owner of the clipboard.
Packit b099d7
Packit b099d7
Quit              Quits the icccm application.
Packit b099d7
Packit b099d7
The program multi is a typical Motif client that uses the
Packit b099d7
clipboard.  It contains elements that can be cut or pasted
Packit b099d7
to the clipboard using the applications Popup Menu, which is
Packit b099d7
usually popped-up using mouse button 3.
Packit b099d7
Packit b099d7
Using icccm and multi together we test the interaction
Packit b099d7
between the Motif clipboard and standard ICCCM clipboards.
Packit b099d7
Run the test by starting up two multi clients and one icccm
Packit b099d7
client.  Verify that the clipboard operates properly between
Packit b099d7
two Motif clients by cutting and pasting between the two
Packit b099d7
multi clients.  You can then use the icccm client to verify
Packit b099d7
that the items cut from the Motif application can be prop-
Packit b099d7
erly recognized by a non-Motif client.  Verify that this
Packit b099d7
works correctly for regular cutting and cutting by name, and
Packit b099d7
that it works correctly for cutting strings, integers, pix-
Packit b099d7
maps, and various combinations of the three.  Also verify
Packit b099d7
that items cut from the icccm client can be pasted into the
Packit b099d7
multi clients by choosing Own CLIPBOARD from the icccm
Packit b099d7
client and then use the Inquire and Paste options in the
Packit b099d7
multi client.  Inquire should return STRING and INTEGER.
Packit b099d7
Paste should return ICCCM Clipboard Text and 911.