@c *************************************************************************
@c CHAPTER: How to test VVcode
@c *************************************************************************
@c    node-name, next, previous,  up
@node Testing Guide, Testing Guide, Top, Top
@chapter How to test VVcode


@c =========================================================================
@c SECTION: Testing VVencode
@c =========================================================================
@section Testing VVencode


@subsection User Help
@itemize @bullet
  @item @samp{help} qualifier should cause ``usage'' message to be displayed
  @item invalid qualifier (e.g. @samp{ZZZZ}) should cause ``usage'' message
        to be displayed
@end itemize


@subsection User Information (@samp{log} & @samp{debug} qualifiers)
@itemize @bullet
  @item @samp{log} with no qualifier value writes to @code{stderr}
  @item @samp{log} qualifier value specifying invalid output file
  @item @samp{log} file spec missing @file{.log} extension component
        @file{.log} added if @code{STICKY_DEFAULTS} defined)
  @item @samp{debug} writes extra information to @code{stderr}
  @item @samp{debug} assumes @samp{log} even if @samp{log} not specified
@end itemize


@subsection File overwriting (@samp{overwrite_files} qualifier)
@itemize @bullet
  @item @samp{overwrite_files} should always overwrite unless the operating
        system objects
  @item should ask before overwriting an existing file
  @item don't ask whether to overwrite if reading from @code{stdin} - just
        fail
@end itemize


@subsection VVE header file specification (@samp{header_file} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item if @samp{header_file} not specified, the input file specification
        is used, stripped of any preamble and postamble components
  @item check that command line value overrides input file specification
        and is used without modification
@end itemize


@subsection Maximum VVE file size (@samp{split_size} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier (less than 4)
  @item check that O/P files are really no greater than this size
  @item file splitting disabled when writing to @code{stdout}, a pipe or
        non-file device
@end itemize


@subsection Input file examination
@itemize @bullet
  @item mode
  @item format
  @item modification time (unsupported timestamps ``normalized'')
  @item maximum record length
  @item longest record length
  @item unsupported file organizations rejected (mainly by format and
        record length)
@end itemize


@subsection File mode (@samp{mode} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value
  @item check that command line value overrides @code{examine_file()} and
        default mode values
  @item check that @code{examine_file()} mode value overrides default
@end itemize


@subsection File format (@samp{format} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value
  @item check that command line value overrides @code{examine_file()} and
        default format values
  @item check that @code{examine_file()} format value overrides default
@end itemize


@subsection File record length (@samp{record_length} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value (within OS limits and < 65536)
  @item check that command line value overrides @code{examine_file()} and
        default format values and also resets longest record length
  @item check that @code{examine_file()} format value overrides default
@end itemize


@subsection File timestamp (@samp{timestamp} qualifier)
@itemize @bullet
  @item missing qualifier value (optional on some systems, required on
        others)
  @item invalid qualifier value (before 1970 or after 2037)
  @item check that command line value overrides @code{examine_file()} value 
@end itemize


@subsection Encoding table (@samp{encoding_table} qualifier)
@itemize @bullet
  @item missing qualifier file spec
  @item non-existent file specified
  @item file spec missing @file{.enc} extension component 
  @item short encoding table file: @file{tooshort.enc}
  @item long encoding table file: @file{toolong.enc}
  @item correct encoding table file: @file{uucode.enc}
  @item duplication of character(s) in encoding file: @file{duplicat.enc}
  @item contents of file specified on command line overrides default
        table
@end itemize


@subsection Character set translation (@samp{translation_file} qualifier)
@itemize @bullet
  @item missing qualifier file spec
  @item non-existent file specified
  @item file spec missing @file{.xlt} extension component
  @item comment handling
  @item correct translation table file: @file{encode.xlt}
  @item short translation table file: @file{tooshort.xlt}
  @item long translation table file: @file{toolong.xlt}
  @item translation table with invalid values: @file{badvalue.xlt}
  @item translation of unsupported characters: @file{toascii.xlt}
  @item missing @file{xlt-from} header: @file{frommiss.xlt}
  @item invalid @file{xlt-from} header value: @file{frombad.xlt}
  @item missing @file{xlt-to} header: @file{tomiss.xlt}
  @item invalid @file{xlt-to} header value: @file{tobad.xlt}
  @item missing @file{xlt-substchar} header: @file{submiss.xlt}
  @item invalid @file{xlt-substchar} header value: @file{subbad.xlt}
  @item @file{xlt-from} character set different to the local character set:
        @file{difffrom.xlt}
@end itemize


@subsection Input file
@itemize @bullet
  @item missing command line value
  @item non-existent file specified
  @item file opened using the correct parameters (mode, format etc)
  @item rejection of unsupported file types
  @item specify null device (@code{NUL}, @code{NL:}, @code{/dev/null} etc)
  @item specify zero length (empty) file
  @item specify @code{stdin}
@end itemize


@subsection Output file
@itemize @bullet
  @item missing command line value - use input file name plus @file{.vve}
        extension
  @item invalid or unwritable file specification
  @item check correct application of file specification defaults when
        partial specification is supplied (if @code{STICKY_DEFAULTS}
        defined) 
  @item O/P file opened using the correct parameters (mode, format etc)
  @item specify null device (@code{NUL}, @code{NL:}, @code{/dev/null} etc)
  @item specify @code{stdout}
@end itemize


@subsection Internal
@itemize @bullet
  @item for variable length records, check that zero and maximum length
        records are handled and recorded correctly
  @item total byte count - may be different for text/binary
  @item CRC-32 value (check with ZIP or ARJ) - may be different for
        text/binary
  @item internal buffer allocation
  @item file closing
  @item running out of memory
  @item log information
@end itemize
      


@c =========================================================================
@c SECTION: Testing VVdecode
@c =========================================================================
@section Testing VVdecode

@subsection User Help
@itemize @bullet
  @item @samp{help} qualifier should cause ``usage'' message to be displayed
  @item invalid qualifier (e.g. @samp{ZZZZ}) should cause ``usage'' message
        to be displayed
@end itemize


@subsection User Information (@samp{log} & @samp{debug} qualifiers)
@itemize @bullet
  @item @samp{log} with no qualifier value
  @item @samp{log} qualifier value specifying invalid output file
  @item @samp{log} file spec missing @file{.log} extension component
  @item @samp{debug} generates extra information
  @item @samp{debug} assumes @samp{log} even if @samp{log} not specified
@end itemize


@subsection File overwriting (@samp{overwrite_files} qualifier)
@itemize @bullet
  @item @samp{overwrite_files} should always overwrite unless the operating
        system objects
  @item should ask before overwriting an existing file
  @item when reading from a pipe or non-file device, don't ask whether
        to overwrite - just fail
@end itemize


@subsection VVE input file examination
@itemize @bullet
  @item @code{decodeversion}
  @item @code{operatingsystem}
  @item @code{characterset}
  @item @code{comment}
  @item @code{mode}
  @item @code{format}
  @item @code{modification time}
  @item @code{recordlength}
  @item @code{table}
@end itemize


@subsection File mode (@samp{mode qualifier})
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value
  @item check that command line value overrides VVE file and default
        mode values
  @item check that VVE file mode value overrides default
@end itemize


@subsection File format (@samp{format qualifier})
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value
  @item check that command line value overrides VVE file and default
        format values
  @item check that VVE file format value overrides default
@end itemize


@subsection File record length (@samp{record_length} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier value (within OS limits and < 65536)
  @item check that command line value overrides VVE file and default
        format values and also resets longest record length
  @item check that VVE file format value overrides default
@end itemize


@subsection File timestamp (@samp{timestamp} qualifier)
@itemize @bullet
  @item missing qualifier value (optional on some systems, required on
        others)
  @item invalid qualifier value (before 1970 or after 2037)
  @item check that command line value overrides VVE file value 
@end itemize


@subsection Encoding table (@samp{encoding_table} qualifier)
@itemize @bullet
  @item missing qualifier file spec
  @item non-existent file specified
  @item file spec missing @file{.enc} extension component 
  @item short encoding table file: @file{tooshort.enc}
  @item long encoding table file: @file{toolong.enc}
  @item correct encoding table file: @file{uucode.enc}
  @item duplication of character(s) in encoding file: @file{duplicat.enc}
  @item contents of file specified on command line overrides VVE table
        and default table
  @item VVE table overrides default table
@end itemize


@subsection Character set translation (@samp{translation_file} qualifier)
@itemize @bullet
  @item missing qualifier file spec
  @item non-existent file specified
  @item file spec missing @file{.xlt} extension component
  @item comment handling
  @item correct translation table file: @file{decode.xlt}
  @item short translation table file: @file{tooshort.xlt}
  @item long translation table file: @file{toolong.xlt}
  @item translation table with invalid values: @file{badvalue.xlt}
  @item translation of unsupported characters: @file{toascii.xlt}
  @item missing @samp{xlt-from} header: @file{frommiss.xlt}
  @item invalid @samp{xlt-from} header value: @file{frombad.xlt}
  @item missing @samp{xlt-to} header: @file{tomiss.xlt}
  @item invalid @samp{xlt-to} header value: @file{tobad.xlt}
  @item missing @samp{xlt-substchar} header: @file{submiss.xlt}
  @item invalid @samp{xlt-substchar} header value: @file{subbad.xlt}
  @item @samp{xlt-from} character set different to the VVE character set:
        @file{difffrom.xlt}
  @item @samp{xlt-to} character set different to the local character set:
        @file{diffto.xlt}
  @item @samp{xlt-from} character set different to the VVE character set
        and @samp{xlt-to} character set different to the local character
        set: @file{diffboth.xlt}
@end itemize


@subsection File padding character (@samp{pad_character} qualifier)
@itemize @bullet
  @item missing qualifier value
  @item invalid qualifier
  @item qualifier value overrides default values
  @item use of different default values for text and binary files
@end itemize


@subsection UUdecoding (@samp{uudecode} qualifier)
@itemize @bullet
  @item correct decoding of UUencoded file without @samp{Vv} line start
  @item error if file contains VVcode specific headers
@end itemize


@subsection XXdecoding (@samp{xxdecode} qualifier)
@itemize @bullet
  @item correct decoding of XXencoded file without @samp{Vv} line start
  @item error if file contains VVcode specific headers
@end itemize


@subsection Input file
@itemize @bullet
  @item missing command line value
  @item non-existent file specified
  @item file opened using the correct parameters (mode, format etc)
  @item specify null device (@code{NUL}, @code{NL:}, @code{/dev/null} etc)
  @item specify zero length (empty) file
  @item specify @code{stdin}
@end itemize


@subsection Output file
@itemize @bullet
  @item missing command line value - use of VVE header
  @item invalid or unwritable file specification
  @item check correct application of file specification defaults (for those
        systems that use support them)
  @item file opened using the correct parameters (mode, format etc)
  @item specify null device (@code{NUL}, @code{NL:}, @code{/dev/null} etc)
  @item specify @code{stdout}
@end itemize


@subsection Internal
@itemize @bullet
  @item for variable length records, check that zero and maximum length
        records in the VVE file are handled and recorded correctly
  @item total byte count
  @item CRC-32 value (check with ZIP or ARJ)
  @item internal buffer allocation
  @item file closing
  @item running out of memory
@end itemize
      

@c =========================================================================
@c SECTION: Testing file interchnage
@c =========================================================================
@section Testing file interchange


@c -------------------------------------------------------------------------
@c SUBSECTION: Interchange of Common Files between Operating Systems
@c -------------------------------------------------------------------------
@subsection Interchange of Common Files between Operating Systems
@itemize @bullet
  @item text file
  @item @TeX{} @file{.dvi}file
  @item @TeX{} @file{.tfm} file
  @item @TeX{} @file{.pk} file
@end itemize


@c -------------------------------------------------------------------------
@c SUBSECTION: Operating System-specific Files
@c -------------------------------------------------------------------------
@subsection Operating System-specific Files

@subsubsection MS-DOS
@itemize @bullet
  @item @file{.zip} file
  @item @file {.Z} @code{compress} file
@end itemize

@subsubsection OS/2
@itemize @bullet
  @item @file{.zip} file
  @item @file {.Z} @code{compress} file
@end itemize

@subsubsection Unix
@itemize @bullet
  @item @file{.tar} file
  @item @file {.Z} @code{compress} file
@end itemize

@subsubsection VAX/VMS
@itemize @bullet
  @item backup save set (fixed length 32256 byte records)
  @item @file{.obj} file (variable length binary)
  @item @file{.exe} file (fixed length 512 byte records)
  @item text file (@code{STREAM_LF} format)
  @item compress @file{.Z} file (variable length binary)
@end itemize

@subsubsection VM/CMS
@itemize @bullet
  @item @code{EXEC} file
  @item @code{MODULE} file (variable length 65535 byte records)
@end itemize
