/////////////////////////////////////////////////////////////////// // // // qlpage2.txt - qualification test #2a // // // // set_params process/initialization // // // /////////////////////////////////////////////////////////////////// // // // Process Description: // // The set_params process accepts parameter commands, one // // for each process invocation, and modifies one or more // // parameters, as identified in the command. // // // /////////////////////////////////////////////////////////////////// // // // Requirements: // // // // A-Specification Requirement - 3.3 // // Default values for parameter setting shall be: // // b = 1, e = 99, l = 55, m = 5, t = 2, T = 8, w = 70 // // // // B-Specification Requirement - 3.3.a.1: // // The set_params process shall initialize parameters to: // // b = 1 number of first page printed // // e = 99 number of end page printed // // l = 55 number of text lines/page // // m = 5 number of characters in left margin // // s = 1 sequential numbering is reset with each file // // t = 2 number of lines in top margin, below header // // T = 8 tab size in characters // // w = 70 number of text characters in line width // // // /////////////////////////////////////////////////////////////////// // // // Test Description: // // Invoke page with no command line arguments. In that case // // PAGE invokes showCmds(params) with the default settings. // // Function showCmds(params) uses params values in display. // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // Preconditions: // // - run from DOS command line // // // /////////////////////////////////////////////////////////////////// // // // Test Procedure - demonstration // // // // 1. run PAGE with no arguments // // // // Expected test results: // // // // PAGE will print out a usage message detailing each of the // // default values which will be identical to the requirment. // // // /////////////////////////////////////////////////////////////////// // // // Signature: Date: // // ---------------------------- ------------- // // // /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // // // QLPAGE1A.LOG // // // // usage: cmdline [-V][-Ln] pattern1 [pattern2..] // // // // creates paged text for each valid filename matched // // -bn sets first page number to n (1) // // -en sets last page number to n (99) // // -ln sets lines to n per page (55) // // -mn sets left margin to n chars (5) // // -tn sets top margin to n lines (2) // // -Tn sets tabsize to n chars (8) // // -wn sets line width to n chars (70) // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // qlpage2.txt - qualification test #2b // // // // set_params process/invalid commands // // // /////////////////////////////////////////////////////////////////// // // // Process Description: // // The set_params process accepts parameter commands, one // // for each process invocation, and modifies one or more // // parameters, as identified in the command. // // // /////////////////////////////////////////////////////////////////// // // // Requirements: // // // // A-Specification Requirement - none // // // // B-Specification Requirement - 3.3.a.2: // // The set_params process shall reject parameter commands // // not in valid range and issue an invalid command error // // message. Valid ranges are non-negative integers for m // // and t, and positive integers for b, e, l, T, and w. The // // parameter s may take only the values 0 or 1, indicating // // that page numbering is or is not reset between files, // // respectively. // // // /////////////////////////////////////////////////////////////////// // // // Test Description: // // Invoke page with command fragments and non-existant com- // // mands. Invoke page with complete commands which are not // // in valid ranges. // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // Preconditions: // // - run from DOS command line // // // /////////////////////////////////////////////////////////////////// // // // Test Procedure - demonstration // // // // 1. run PAGE with command fragments // // page - qlpage2.tst // // page -b qlpage2.tst // // // // 2. run PAGE with commands that do not exist // // page -q qlpage2.tst // // page -1 qlpage2.tst // // // // 3. run PAGE with invalid command ranges // // page -b0 qlpage2.tst // // page -b0e0 qlpage2.tst // // // // Expected test results: // // // // 1. page prints out invalid command message for - argument // // and missing argument message for -b argument // // // // 2. page prints out invalid command messages for both argu- // // ments // // // // 3. page prints invalid range message for -b0 argument and // // two invalid range messages for -b0e0 argument // // // // 2. page prints out unrecognized command error messages // // // /////////////////////////////////////////////////////////////////// // // // Signature: Date: // // ---------------------------- ------------- // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // qlpage2.txt - qualification test #2c // // // // set_params process/parameter setting // // // /////////////////////////////////////////////////////////////////// // // // Process Description: // // The set_params process accepts parameter commands, one // // for each process invocation, and modifies one or more // // parameters, as identified in the command. // // // /////////////////////////////////////////////////////////////////// // // // Requirements: // // // // A-Specification Requirement - 3.2 // // These parameter setting commands shall be accepted: // // -bn sets first page printed to n // // -en sets last page printed to n // // -ln sets number of lines printed per page to n // // -mn sets left margin to n character spaces // // -s disables (enables) page number reset between files // // -tn sets top margin to n lines between header and text // // -Tn sets tab spacing to n characters // // -wn sets line width to n characters // // // // B-Specification Requirement - 3.3.a.3: // // The set_params process shall interpret commands as: // // -bn sets b to the positive integer n // // -en sets e to the positive integer n // // -ln sets l to the positive integer n // // -mn sets m to the non-negative integer n // // -s toggles s between 0 and 1 // // -tn sets t to the non-negative integer n // // -Tn sets T to the positive integer n // // -wn sets w to the positive integer n // // // // A-Specification Requirement - 3.2 // // Page shall accept parameter setting commands initiated // // with a hyphen and terminated with one or more spaces. A // // single command may contain more than one parameter setting // // by concatenating the parameters' character and value. // // // // B-Specification Requirement - 3.3.a.4 // // Page shall accept parameter setting commands initiated // // with a hyphen and terminated with one or more spaces. A // // single command may contain more than one parameter setting // // by concatenating the parameters' character and value. // // // /////////////////////////////////////////////////////////////////// // // // Test Description: // // Invoke page with an interleaved series of commands and // // filenames to test setting of pagination parameters. // // The filenames will all cite a test file designed to make // // pagination attributes obvious. // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // Preconditions: // // - run from DOS command line // // - test file qlpage1.tst must be in default directory // // - test file qlpage2.tst must be in default directory // // // /////////////////////////////////////////////////////////////////// // // // Test Procedure - demonstration // // // // 1. alternate valid commands and file patterns to demonstrate // // order of processing // // 2. // // // // // // page -b2e2 qlpage1.tst -b1e1 qlpage1.tst // // page -l40e1 qlpage1.tst -l30e1 qlpage1.tst // // page -m3t0e1 qlpage1.tst -m0t3e1 qlpage1.tst // // page -w65e1 qlpage1.tst -w55e1 qlpage1.tst // // page -T5 qlpage2.tst -T3 qlpage2.tst // // // // Expected test results: // // // // 1. only second page printed, then only first printed // // 2. first printed with 40 lines/page then with 30 lines/page // // 3. first printed with 3 char left margin and no top margin // // then printed with 0 char left margin and 3 line top // // 4. first printed with 65 chars/line then with 55 chars/line // // 5. first uses tab stops set 5 chars apart then 3 char apart // // // /////////////////////////////////////////////////////////////////// // // // Signature: Date: // // ---------------------------- ------------- // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // qlpage2.txt - qualification test #2d // // // // make_page process // // // /////////////////////////////////////////////////////////////////// // // // Process Description: // // For each file processed, make_page process requests the // // creation of a header line with w characters. It then // // builds a page by issuing l requests for w width lines. // // // /////////////////////////////////////////////////////////////////// // // // Requirements: // // // // A-Specification Requirement - 3.7 // // When file opening is successful, PAGE shall: // // -read file_time and file_date, the time and date of // // last file modification. // // -compose a single header line for each page with file- // // name on the left, file_time and file_date in middle // // and current page number on the right. // // -compose a page with header line, top margin t, and l // // lines of text, each with margin m and width w. // // -transmit each page between b and e, inclusive to // // redirectable output. // // // // B-Specification Requirement - 3.4.1.a.1 // // The make_page process shall: // // -send a sequence of pages to redirectable output until // // all characters from source have been exhausted. // // -configure each page with a margin of m characters, // // header of w charactrs with the filename on left, file // // time and date of last modification in the middle, and // // page number on the right. // // -reset the page number with each file when s has the // // default value of one, else continuoutsly increase. // // -follow header with a margin of t lines and then l // // lines of w characters. Each line shall be preceded // // by m characters in the left margin. // // -terminate processing a page if a line is encountered // // containing only a formfeed character. // // -send only pages numbered from b through e inclusive to // // the output. // // // /////////////////////////////////////////////////////////////////// // // // Test Description: // // Invoke PAGE on a test file designed so that pagination // // attributes are obvious. Invoke PAGE on a file with // // formfeeds in known locations. // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // Preconditions: // // - run from DOS command line // // - test file qlpage1.tst must be in default directory // // - test file qlpage3.tst must be in default directory // // // /////////////////////////////////////////////////////////////////// // // // Test Procedure - demonstration // // // // 1. invoke PAGE on qlpage1.tst which is designed to make // // pagination attributes obvious. // // // // page -b1e1 qlpage1.tst // // // // 2. invoke PAGE on qlpage3.tst which has formfeeds after // // the 3rd, 5th, and 6th lines. // // // // Expected test results: // // // // 1. only first page of qlpage1.tst is printed with length of // // 55 lines, left margin of 5 chars, top margin of 2 lines, // // and width of 70 chars. // // // // 2. the first three pages of output consists of 3 lines, 2 // // lines, and 1 line, respectively. // // // /////////////////////////////////////////////////////////////////// // // // Signature: Date: // // ---------------------------- ------------- // // // ///////////////////////////////////////////////////////////////////