Design: 03.05/P04

This is an abstract, language-independent design. Grim details may be found in the corresponding source code. You may return to the documentation for the module containing this program design, or to the entire hierarchical table of topics covered by the PVT.


PROGRAM 4: Deleting from archive when multiple archive files are open

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test.

DESIGN:

<inquire phigs facilities> to determine
   mxarno = maximum number of simultaneously open archive files
if (mxarno <= 1) then
   informative message that skippping tests, can't open multiple
      archive files
   goto done
endif

set up standard networks in CSS
open new archive file, with arid1 = archive identifier
open 2nd archive file, with arid2 = archive identifier

<archive all structures>, into arid1
<archive all structures>, into arid2
expstr = expected structures  = 100,101,102,103,104,105,106,107,108,109,
                                110,111,113,114,115,120,130,140,142
spcstr = specified structures = 114,102,100,140,107

<delete structures from archive> with arid1, spcstr
<retrieve structure identifiers> with arid2
   to determine newstr = new list of archived structures
TEST: #SR 1 4
      "If more than one archive file is open, <delete structures
       from archive> should not affect any open archive file other
       than the file specified."
pass/fail depending on (newstr = expstr)

<delete all structures from archive> arid1
<retrieve structure identifiers> with arid2
   to determine newstr
TEST: #SR 3 4
      "If more than one archive file is open, <delete all structures
       from archive> should not affect any open archive file other
       than the file specified."
pass/fail depending on (newstr = expstr)

<archive all structures> into arid1
spcstr = specified structures = 107, 114, 105
<delete structure networks from archive> with arid1, spcstr
<retrieve structure identifiers> with arid2
   to determine newstr
TEST: #SR 2 4
      "If more than one archive file is open, <delete structure
       networks from archive> should not affect any open archive
       file other than the file specified."
pass/fail depending on (newstr = expstr)

<close archive file> with arid1
<close archive file> with arid2

done:

END PROGRAM 4