>># 
>># 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: rmptlnrsrc.m,v 1.8 92/06/11 17:40:29 rws Exp $
>># 
>>#
>>TITLE XrmPutLineResource CH10
>>ASSERTION A XrmPutLineResource-1
When line is in ResourceLine format, then a call to
XrmPutLineResource adds a resource name and value pair from
the specified line to the specified database.
>>STRATEGY
Create empty database for testing.
Call XrmPutLineResource to add test lines to the database.
Verify the test lines were added to the database as expected.
Call XrmPutLineResource to test comments.
Verify that comments did not affect the database contents.
>>ASSERTION A XrmPutLineResource-2
When the database contains an entry for the resource name
specified by line, then a call to XrmPutLineResource
replaces the resource value in the database with the
resource value associated with line.
>>STRATEGY
Create empty database for testing.
Call XrmPutLineResource to add test lines to the database.
Call XrmPutLineResource to replace the database entries.
Verify the database entries were replaced as expected.
>>ASSERTION A XrmPutLineResource-3
When line is in ResourceLine format and database is NULL,
then a call to XrmPutLineResource creates a new database,
adds a resource name and value pair from the specified line
to the database, and returns a pointer to the database in
database.
>>STRATEGY
Call XrmPutLineResource to add data to a NULL database.
Verify that the database was created, and the data was added as expected.
>>ASSERTION A XrmPutLineResource-4
On a call to XrmPutLineResource, any white space before or
after the name or colon in the line argument is ignored.
>>STRATEGY
Create empty database for testing.
Call XrmPutLineResource to add an entry with white space around the name and colon.
Verify that the white space had no effect upon the entry.
>>ASSERTION A XrmPutLineResource-5
On a call to XrmPutLineResource, the processing of line is
terminated at a new-line or an ASCII nul character.
>>STRATEGY
Create empty database for testing.
Create a test string containing a new-line character.
Call XrmPutLineResource to add the data to the database.
Verify that only a single entry was added to the database.
Create a test string containing a nul character.
Call XrmPutLineResource to add the data to the database.
Verify that only a single entry was added to the database.
>>ASSERTION A XrmPutLineResource-6
When the line argument contains \n, then on a call to
XrmPutLineResource this is interpreted as the new-line
character.
>>STRATEGY
Create empty database for testing.
Call XrmPutLineResource to add an entry including a \n in the value.
Verify that the \n was treated as an embedded newline.
>>ASSERTION A XrmPutLineResource-7
When the line argument contains \nnn where n is a digit
from zero to seven, then on a call to XrmPutLineResource
this is interpreted as a single byte containing the
corresponding octal character.
>>STRATEGY
Create empty database for testing.
Call XrmPutLineResource to add an entry including a \100 in the value.
Verify that the \100 was treated as a character .
