>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: gtdflt.m,v 1.17 92/07/01 11:37:17 rws Exp $
>># 
>>#
>>TITLE XGetDefault CH10
>>ASSERTION A XGetDefault-1
A call to XGetDefault reads and returns from the resource
manager database the entry specified by the program and
option arguments.
>>STRATEGY
Set the RESOURCE_MANAGER property on the default root window of screen 0 to contain the string XT.OPT.VAL
Open a display using XOpenDisplay.
Obtain the value of the XT.OPT resource using XGetDefault.
Verify that the returned value is "OPT".
>>ASSERTION A XGetDefault-2
When the option specified by the program and option
arguments does not exist in the resource manager database,
then a call to XGetDefault returns NULL.
>>STRATEGY
Set the RESOURCE_MANAGER property on the default root window to contain some valid strings not containing XT.Cal*
Open a display using XOpenDisplay.
Obtain the value of the XT.Cal resource using XGetDefault.
Verify that the call returned NULL.
>>ASSERTION C XGetDefault-3
If the system is POSIX compliant: When the RESOURCE_MANAGER
property was defined at the time display was opened, then
the default resource manager database is taken from the
value of that property, otherwise the default resource
manager database is taken from the file $HOME/.Xdefaults in
the client's home directory.
>>STRATEGY
Fork a new  process using tet_fork.
In the child process:
   Execute the file ./Test3 using tet_exec with the HOME environment variable set to ".".
   In Test3:
      Delete the RESOURCE_MANAGER property using XDeleteProperty.
      Open a new display using XOpenDisplay.
      Obtain the value of the XTest.testval32 resource using XGetDefault.
      Verify that the returned value is "VAL_b".
      Set the RESOURCE_MANAGER property using XChangeProperty.
      Open a new display using XOpenDisplay.
      Obtain the value of the XTest.testval32 resource using XGetDefault.
      Verify that the returned value is "pval_b".
>>ASSERTION C XGetDefault-4
If the system is POSIX compliant: When the XENVIRONMENT
environment variable is defined, then the file named by the
XENVIRONMENT environment variable is merged to update the
default resource database.
>>STRATEGY
Fork a new process using tet_fork.
In the child process:
   Execute the file ./Test4 using tet_exec with the XENVIRONMENT variable set to ./EnvXdefaults.
   In Test4:
      Set the RESOURCE_MANAGER property using XChangeProperty.
      Open a display using XOpenDisplay.
      Obtain the value of resources set by the ChangeProperty request and by the XENVIRONMENT file using XGetDefault.
      Verify that the resources are set from each source.
      Verify that the XENVIRONMENT resources updated those of the ChangeProperty request.
>>ASSERTION C XGetDefault-5
If the system is POSIX compliant: When the XENVIRONMENT
environment variable is not defined, then the file
$HOME/.Xdefaults-<name> is merged to update the default
resource database, where <name> specifies the name of the
machine on which the application is running.
>>STRATEGY
Fork a new process using tet_fork.
In the child process:
   Remove XENVIRONMENT from the environment
   Execute the file ./Test5 using tet_exec with the HOME variable set to ".".
   In Test5:
      Set the RESOURCE_MANAGER property using XChangeProperty.
      Open a display using XOpenDisplay.
      Obtain the value of resources set by the ChangeProperty request and by the file $HOME/.Xdefaults-<name> using XGetDefault.
      Verify that the resources are set from each source.
      Verify that the .Xdefaults-<name> resources updated those of the ChangeProperty request.
