home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-05-03 | 61.9 KB | 1,763 lines |
- ::::::::::
- vt_tst.dis
- ::::::::::
- --
- -- Test files
- --
- screen_test4.ada
- vt_test.ada
- ::::::::::
- screen_test4.ada
- ::::::::::
- WITH
- text_io,
- page_terminal;
-
- PROCEDURE screen_test4 IS
-
- PACKAGE vt RENAMES page_terminal;
-
- input_buffer : string( 1..80 );
- input_buffer_length : natural;
- keys : vt.function_key_descriptor( 4 );
- dimensions : vt.xy_position;
-
- terminal_name : string( 1..4 ) := "none";
-
- BEGIN -- page_test2
-
- -- ----------------------
- vt.open( terminal_name );
- dimensions := vt.size;
- vt.erase_in_display( vt.all_positions );
- -- ----------------------
- vt.set_position( vt.xy_position'( 1,1 ) );
- vt.get( input_buffer, input_buffer_length, keys );
-
- -- ----------------------
- vt.erase_in_display( vt.all_positions );
-
- FOR i IN 1..dimensions.line
- LOOP
- vt.set_position( vt.xy_position'( i, 1 ) );
- vt.put( string'( 1..10 => '#' ) );
- vt.select_graphic_rendition( vt.reverse_image );
- vt.put(positive'image(i));
- vt.select_graphic_rendition( vt.primary_rendition );
- END LOOP;
- vt.update_screen( 1,dimensions.line );
- vt.get( input_buffer, input_buffer_length, keys );
-
- -- ---------------------
- vt.set_position( vt.xy_position'( 2,1 ) );
- vt.delete_line( 22);
- vt.set_position(vt.xy_position'(2,1));
- vt.insert_line(22);
- -- vt.update_screen(1,dimensions.line);
- -- vt.get(input_buffer, input_buffer_length, keys);
- -- ---------------------
-
- FOR I IN 1..dimensions.line
- LOOP
- vt.set_position(vt.xy_position'(i,1));
- vt.put(string'(1..10 => '?' ));
- vt.put(string'(25..27 => 'b' ));
- END LOOP;
- vt.update_screen( 1,dimensions.line );
- vt.get( input_buffer, input_buffer_length, keys );
- -- ---------------------
- vt.set_position(vt.xy_position'(3,1));
- vt.insert_line(1);
- vt.update_screen(3,24);
- vt.get(input_buffer, input_buffer_length, keys);
- -- --------------------
- vt.set_position(vt.xy_position'(1,1));
- vt.insert_line(2);
- vt.update_screen(1,24);
- vt.get(input_buffer,input_buffer_length, keys);
- -- --------------------
- vt.set_position(vt.xy_position'(23,13));
- vt.delete_line(5);
- vt.set_position(vt.xy_position'(24,45));
- vt.put("STRIKE ANY KEY");
- vt.update_screen(1,dimensions.line);
- vt.get(input_buffer,input_buffer_length,keys);
- -- --------------------
- vt.set_position( vt.xy_position'(1,1));
- vt.insert_line(1);
- vt.update_screen(1,dimensions.line);
- -- ---------------------
- vt.set_position(vt.xy_position'(1,1));
- vt.delete_line(1);
- vt.update_screen(1,dimensions.line);
- vt.get(input_buffer, input_buffer_length,keys);
- -- --------------------
- vt.set_position( vt.xy_position'( 2,5 ) );
- vt.erase_in_line( vt.from_xy_position_to_end );
- vt.update_screen( 5,6 );
- vt.get( input_buffer, input_buffer_length, keys );
- -- --------------------
- vt.set_position( vt.xy_position'( 5,1 ) );
- vt.enter_insert_mode;
- vt.select_graphic_rendition( vt.reverse_image );
- vt.put( "------------------------------->" );
- vt.select_graphic_rendition( vt.primary_rendition );
- vt.update_screen( 5,10 );
- vt.get( input_buffer, input_buffer_length, keys );
- -- --------------------
- vt.set_position( vt.xy_position'( 2,1 ) );
- vt.put("hi there");
- vt.update_screen( 2,2 );
- vt.get( input_buffer, input_buffer_length, keys );
- -- --------------------
- vt.set_position(vt.xy_position'(24,24));
- vt.put( "**************************");
- vt.update_screen(1,dimensions.line);
- -- --------------------
- vt.get( input_buffer, input_buffer_length, keys );
-
- vt.set_position(vt.xy_position'(3,1));
- vt.delete_line(4);
- vt.update_screen(1, 10 );
- -- vt.update_screen(1,dimensions.line);
- -- --------------------
- vt.set_position( vt.xy_position'( 24,1 ) );
- vt.put( "This is a test of the Virtual terminal line 24 ********" );
- vt.update_screen( 20,24 );
- --
- vt.set_position( vt.xy_position'( 2,1 ) );
- vt.delete_line( 22);
- vt.set_position(vt.xy_position'(2,1));
- vt.insert_line(22);
- -- ---------------------
- vt.select_graphic_rendition( vt.reverse_image );
- FOR I IN 5..10
- LOOP
- vt.set_position(vt.xy_position'(i,1));
- vt.put( "test test test test test test test test test test " );
- END LOOP;
- vt.update_screen( 1,dimensions.line );
- vt.select_graphic_rendition( vt.primary_rendition );
- vt.get( input_buffer, input_buffer_length, keys );
-
- vt.close;
-
- END screen_test4;
- PRAGMA main;
- ::::::::::
- vt_test.ada
- ::::::::::
- --
- --
- -- Abstract: The following test file contains the Acceptance Test
- -- Procedures for the NOSC Virtual Terminal. The testing
- -- is divided logically into 3 sections, the first is the
- -- page terminal section followed by the scroll terminal
- -- and finally the form terminal.
- --
- --
- --
- --
- --
- -- testing set tab procedures
- --
- --
- --
- with
- text_io,
- vt_content,
- driver,
- vt_input,
- scroll_terminal,
- form_terminal,
- PAGE_TERMINAL ;
-
- procedure vt_test IS
-
-
- package st renames scroll_terminal ;
- package VT renames PAGE_TERMINAL ;
- package form renames form_terminal ;
- PACKAGE int_io IS NEW text_io.integer_io(form.termination_key_range) ;
-
- TERMINAL_NAME : string( 1..4 ) := "none";
- IN_BUFFER : string( 1..80) ;
- IN_BUFFER_LEN : natural ;
- data : string(1..5) ;
- last : natural ;
- keys : vt.function_key_descriptor(32) ;
- keys2: st.function_key_descriptor(32) ;
- key_last : natural ;
- key_name : string(1..11) ;
- prev_pos : natural ;
- key_id2: vt.function_key_enum ;
- key_id : st.function_key_enum ;
- last_position : natural ;
- num_function_keys : natural ;
- left_arrow : string(1..1) := string'( 1 => '<' ) ;
- right_arrow: string(1..1) := string'( 1 => '>' ) ;
- value : form.termination_key_range ;
- buffer: string(1..10) ;
-
-
- PROCEDURE create_form1 IS
- BEGIN
-
- form.set_position( form.xy_position'( 3, 10) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 3,51 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 5,10 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 5,51 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 7, 7 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 7,28 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 7,37 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 7,40 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 7,46 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.numerics );
-
- form.set_position( form.xy_position'( 7,54 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 11, 1 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 11,62 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 12, 1 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 12,62 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 13, 1 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 13, 62) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 14, 1 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 14,62 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 42,100) ); --just a test!
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 3, 1 ) );
- form.put( "NAME :" );
-
- form.set_position( form.xy_position'( 5, 1 ) );
- form.put( "ADDRESS :" );
-
- form.set_position( form.xy_position'( 7, 1 ) );
- form.put( "CITY :" );
-
- form.set_position( form.xy_position'( 7, 30 ) );
- form.put( "STATE :" );
-
- form.set_position( form.xy_position'( 7, 41 ) );
- form.put( "ZIP :" );
-
- form.set_position( form.xy_position'( 10, 1 ) );
- form.put( "DESCRIPTION:" );
-
- form.set_position( form.xy_position'(17,1 ) ) ;
- form.put("Enter any data you wish in this present form. Data entered");
- form.set_position( form.xy_position'(18,1 ) ) ;
- form.put("in protected areas or areas where that type of input is not") ;
- form.set_position( form.xy_position'(19,1 ) ) ;
- form.put("allowed( such as letters in a numeric field ) will cause the ") ;
- form.set_position( form.xy_position'(20,1 ) ) ;
- form.put("bell to ring. You, the user, will have to test the local") ;
- form.set_position( form.xy_position'(21,1 ) ) ;
- form.put("editing functions while the form is active. The local editing ") ;
- form.set_position( form.xy_position'(22,1 ) ) ;
- form.put("functions include: arrow keys, carraige return, delete key, and");
- form.set_position( form.xy_position'(23,1 ) ) ;
- form.put("the tab key. Strike a function key when finished....") ;
-
- END create_form1 ;
-
- PROCEDURE modify_form1 IS
-
- BEGIN
- form.set_position( form.xy_position'(3,10) ) ;
- form.erase_area ;
- form.tab; form.tab ;
- form.erase_area ;
- form.tab; form.tab ;
- form.erase_area ;
- form.tab; form.tab ;
- form.erase_area ;
- form.tab; form.tab ;
- form.erase_area ;
- form.tab ;
- form.erase_area ;
- form.tab ; form.erase_area ;
- form.clear_qualified_area ;
- form.tab; form.clear_qualified_area ;
- form.tab ;
- form.erase_area ;
- form.clear_qualified_area ;
- form.tab; form.clear_qualified_area ; form.tab ;
- form.erase_area ;
- form.clear_qualified_area ;
- form.tab; form.clear_qualified_area ; form.tab ;
- form.erase_area ;
- form.clear_qualified_area ;
- form.set_position( form.xy_position'(17,5) ) ;
- form.erase_area ;
-
- form.set_position( form.xy_position'(12, 1) ) ;
- form.put("The previous form was modified using the tab, erase area, and") ;
- form.set_position( form.xy_position'(13, 1) ) ;
- form.put("clear area functionalities of the form terminal.") ;
- form.set_position( form.xy_position'(15, 1) ) ;
- form.put("Strike a function key to continue...") ;
-
- form.set_position( form.xy_position'( 14, 20 ) ) ;
- form.tab ; form.clear_qualified_area ;
-
- END modify_form1 ;
-
- PROCEDURE create_form2 IS
-
- BEGIN
- form.set_position( form.xy_position'( 12, 5 ) );
- form.erase_area ;
-
- form.set_position( form.xy_position'( 9, 6 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 9,15 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 9 ,25 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 9,27 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 9,35 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 9,46 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 11,16 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters );
-
- form.set_position( form.xy_position'( 16,1 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
- form.set_position( form.xy_position'( 17,19 ) );
- form.define_qualified_area( intensity => form.high,
- protection => form.unprotected,
- input => form.graphic_characters ) ;
-
- form.set_position( form.xy_position'( 20, 1 ) );
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected );
-
-
- form.set_position( form.xy_position'( 9, 1) ) ;
- form.put("DATE:") ;
-
- form.set_position( form.xy_position'( 9,21) ) ;
- form.put("SEX:") ;
-
- form.set_position( form.xy_position'( 9,30) ) ;
- form.put("RACE:") ;
-
- form.set_position( form.xy_position'(11, 1) ) ;
- form.put("JOB EXPERIENCE:") ;
-
- form.set_position( form.xy_position'(17, 1) ) ;
- form.put("INTERESTS/HOBBIES:") ;
-
- form.set_position( form.xy_position'( 22, 10 ) ) ;
- form.put("Again, test the local editing as you wish.");
-
- form.set_position( form.xy_position'( 23, 5 ) ) ;
- form.put("Strike a function key to exit the test of the virtual terminal!");
-
- END create_form2 ;
-
- -- start of body for all the tests
- --
- --
-
- begin
- VT.OPEN ;
- --
- -- This Ada program produces the introduction for the complete
- -- testing to be done by the user.
- --
-
- VT.SET_POSITION( VT.XY_POSITION'(12, 18) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.REVERSE_IMAGE ) ;
-
- VT.PUT(" INTERACTIVE TEST OF THE VIRTUAL TERMINAL ") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 50) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.PRIMARY_RENDITION ) ;
-
- VT.PUT("...strike any key to continue." ) ;
- vt.update_screen(1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- vt.erase_in_display( vt.all_positions ) ;
- vt.update_screen(1, vt_content.height ) ;
-
- --
- --
- -- Abstract : The first section of this test file will fully test the
- -- functionalities of the page terminal, as stated in the
- -- Requirements Specification Document.
- --
- -- The person performing these tests can refer back to the
- -- Specification document to verify the correctness of each test.
- --
-
-
- --
- -- This Ada program produces the introduction for the page_mode
- -- testing to be done by the user.
- --
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 18) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.REVERSE_IMAGE ) ;
-
- VT.PUT(" INTERACTIVE TEST FOR THE PAGE MODE TERMINAL ") ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 28) ) ;
- VT.PUT(" OF THE VIRTUAL TERMINAL ") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 50) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.PRIMARY_RENDITION ) ;
-
- VT.PUT("...strike any key to continue." ) ;
- vt.update_screen(1, vt_content.height) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- vt.erase_in_display( vt.all_positions ) ;
- vt.update_screen( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for set_tab and move by tabs for ") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("the page_mode terminal, refer to sections 3.3.3.9") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("and 3.3.3.11 of the test document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 15) ) ;
- VT.SET_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 25) ) ;
- VT.SET_TAB ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
- VT.PUT("123456789012345678901234567890123456789012345678901234567890") ;
- VT.SET_POSITION( VT.XY_POSITION'(5, 40) ) ;
- VT.PUT("Tabs have been set in columns 15 and 25.") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 32) ) ;
- VT.PUT("We will tab over to those spots and print a 'C'.") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 32) ) ;
- VT.PUT("Strike a key when ready...") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 1) ) ;
- VT.TAB ;
- VT.PUT('C') ;
- VT.TAB ;
- VT.PUT('C') ;
- VT.UPDATE_SCREEN( 10, 10 ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 50) ) ;
- VT.PUT("..strike any key to continue.") ;
- VT.UPDATE_SCREEN( 24, 24 ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
-
- VT.erase_in_display( vt.all_positions ) ;
- --
- -- testing clear tab and set tab procedures
- --
- --
- --
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for clear_tab and set tabs for ") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("the page_mode terminal, refer to sections 3.3.3.9") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("and 3.3.3.10 of the Test Procedures document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 15) ) ;
- VT.SET_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 25) ) ;
- VT.SET_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
- VT.PUT("123456789012345678901234567890123456789012345678901234567890") ;
- VT.SET_POSITION( VT.XY_POSITION'(5, 35) ) ;
- VT.PUT("Tabs have been set in columns 15 and 25.") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 30) ) ;
- VT.PUT("The 'C's denote these spots.") ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 30) ) ;
-
- VT.PUT("Strike a key when ready...") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -- ----------------------------------------------
- VT.SET_POSITION( VT.XY_POSITION'(10, 1) ) ;
- VT.TAB ;
- VT.PUT('C') ;
-
- VT.TAB ;
- VT.PUT('C') ;
- VT.UPDATE_SCREEN( 10, 10 ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(12, 35) ) ;
- VT.PUT("We will now tab over to the first tab stop,") ;
- VT.SET_POSITION( VT.XY_POSITION'(13, 30) ) ;
- VT.PUT("clear it, and position the cursor in column 1.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(16, 1) ) ;
- VT.TAB ;
- VT.CLEAR_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(19, 30) ) ;
- VT.PUT("We will now tab to the first tab stop on the") ;
- VT.SET_POSITION( VT.XY_POSITION'(20, 25) ) ;
- VT.PUT("line and print a 'C', it should be in column") ;
- VT.SET_POSITION( VT.XY_POSITION'(21, 25) ) ;
- VT.PUT("25. Stike a key to show the result.") ;
-
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(16, 1) ) ;
- VT.TAB ;
- VT.PUT('C') ;
- VT.UPDATE_SCREEN( 16, 16 ) ;
-
-
- VT.SET_POSITION( VT.XY_POSITION'(24,50) ) ;
- VT.PUT("..strike any key to continue.");
- VT.UPDATE_SCREEN( 24, 24 ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
-
- VT.erase_in_display( vt.all_positions ) ;
- vt.update_screen( 1, vt_content.height ) ;
- --
- -- testing moving by tab stops, inserting new lines
- -- on the display, and moving to a new page
- --
- --
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for move by tabs, insert_line and moving") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 12) ) ;
- VT.PUT("to a new page, refer to sections 3.3.3.12, 3.3.3.22") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 12) ) ;
- VT.PUT("and 3.3.3.13 of the Test Procedures document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(10, 20) ) ;
- VT.PUT("Erase_in_display will also be tested here,") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 12) ) ;
- VT.PUT("refer to section 3.3.3.19 of the document.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
-
- VT.PUT("There are no tab stops set on the display, so a call on") ;
- VT.SET_POSITION( VT.XY_POSITION'(2, 1) ) ;
- VT.PUT("TAB should produce no operation. Let's try it.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(6, 25) ) ;
- VT.PUT("Strike a key to invoke the tab...") ;
- VT.SET_POSITION( VT.XY_POSITION'(4, 1) ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(8, 25) ) ;
- VT.PUT("As you can see no operation has occurred.") ;
- VT.SET_POSITION( VT.XY_POSITION'(9, 25) ) ;
- VT.PUT("Strike a key to continue...") ;
- VT.SET_POSITION( VT.XY_POSITION'(4, 1) ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- ------------------------------------------------------
- VT.SET_POSITION( VT.XY_POSITION'(12, 25) ) ;
- VT.PUT("Tab stops will be set in columns 5 and 25,") ;
- VT.SET_POSITION( VT.XY_POSITION'(13, 25) ) ;
- VT.PUT("first we will TAB(2) to move to the second") ;
- VT.SET_POSITION( VT.XY_POSITION'(14, 25) ) ;
- VT.PUT("tab stop then move down a line and do a") ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 25) ) ;
- VT.PUT("single tab. Strike a key to show results.") ;
- VT.UPDATE_SCREEN( 12, 15 ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 5) ) ;
- VT.SET_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 25) ) ;
- VT.SET_TAB ;
-
- VT.SET_POSITION( VT.XY_POSITION'(17, 1) ) ;
- VT.TAB( 2 ) ;
- VT.PUT('C') ;
- VT.SET_POSITION( VT.XY_POSITION'(21, 15) ) ;
- VT.PUT("The first 'C' indicates the cursor position after TAB(2).") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 1) ) ;
- VT.TAB ;
- VT.PUT('C') ;
- VT.SET_POSITION( VT.XY_POSITION'(22, 15) ) ;
- VT.PUT("The second 'C' indicates the cursor position after a single tab.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 31) ) ;
- VT.PUT("Strike a key to continue...") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- ------------------------------------------------------------------
-
- VT.SET_POSITION( VT.XY_POSITION'(3, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 25) ) ;
- VT.PUT("We left the top two lines to help illustrate ") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 25) ) ;
- VT.PUT("the insert_line functionality of the VT.") ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 25) ) ;
- VT.PUT("We will insert one line on the top of the display.") ;
- VT.SET_POSITION( VT.XY_POSITION'(9, 25) ) ;
- VT.PUT("Strike a key to show results.") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -- --------------------------------------------------
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ; --one new line should be
- VT.INSERT_LINE ; --inserted at the top
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
-
- VT.SET_POSITION( VT.XY_POSITION'(13,10) ) ;
- VT.PUT("Notice how the display scrolls down when lines are inserted.") ;
- VT.SET_POSITION( VT.XY_POSITION'(15,25) ) ;
- VT.PUT("Strike a key to continue...") ;
-
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --then 3 more
- VT.SET_POSITION( VT.XY_POSITION'(18, 25) ) ;
- VT.PUT("Now 3 more lines inserted at the top.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 25) ) ;
- VT.PUT("Strike a key to continue...") ;
- VT.SET_POSITION( VT.XY_POSITION'(1 ,1) ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -------------------------------------------------
- VT.INSERT_LINE( 3 ) ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 25) ) ;
- VT.PUT("Hit another key to move on...") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- ---------------------
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- ---------------------
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ; --top of the display.
- vt.put("Top of the display.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 1) ) ; --bottom of the display.
- VT.PUT("This is the bottom row, it will be lost when insert_line is called");
- VT.SET_POSITION( VT.XY_POSITION'(12, 25) ) ;
- VT.PUT("Strike a key to insert a line.") ;
- VT.SET_POSITION( VT.XY_POSITION'(14, 25) ) ;
- VT.PUT("The display will scroll down and the ") ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 25) ) ;
- VT.PUT("bottom line will be lost.") ;
-
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --wait for signal...
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 25) ) ;
-
- VT.INSERT_LINE ; --new blank bottom line
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 25) ) ;
- VT.PUT("Strike a key to move to a new page...") ;
-
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -- ----------------------------------------------------
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 20) ) ; --any coordinates will do
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1 , 1) ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 20) ) ;
- VT.PUT("Display now shows a new page, strike a key to continue.") ;
- VT.UPDATE_SCREEN( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- vt.erase_in_display( vt.all_positions ) ;
- --
- -- testing writing on the display and ringing
- -- the terminal's bell.
- --
- --
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for putting data on the display ") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("and ringing the bell for the page mode terminal,") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("refer to sections 3.3.3.14 and 3.3.3.16 of the") ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 15) ) ;
- VT.PUT("Test Procedures document.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- --VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --one position past the '.'
- VT.SET_POSITION( VT.XY_POSITION'(2, 25) ) ;
- VT.PUT("The cursor should be located one column past ");
- VT.SET_POSITION( VT.XY_POSITION'(3, 20) ) ;
- VT.PUT("the last character put on the display.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
- VT.PUT("Here I am.") ;
- vt.update_screen( 1, vt_content.height ) ;
-
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --one position past the '.'
-
- VT.SET_POSITION( VT.XY_POSITION'(6, 1) ) ;
- VT.PUT('x') ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 25) ) ;
- VT.PUT("Both strings and single characters can") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 20) ) ;
- VT.PUT("be written on the display.") ;
- VT.SET_POSITION( VT.XY_POSITION'(9, 30) ) ;
- VT.PUT("...strike a key to continue.") ;
- vt.update_screen( 6, 9 ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --put single character
-
- --VT.SET_POSITION( VT.XY_POSITION'(15, 60) ) ; --line too long for
- --VT.PUT("The end of this string will be lost.") ;--remainder of screen
- --VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -- --------------------------------------------
- VT.SET_POSITION( VT.XY_POSITION'(22, 10) ) ;
- VT.PUT("Press a key to ring the terminal's bell, and continue.") ;
-
- vt.update_screen( 22, 22 ) ;
-
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ; --wait for signal
-
- VT.BELL ; VT.BELL ; VT.BELL ; --ring bell 3 times
-
- VT.erase_in_display( vt.all_positions ) ;
- --
- -- testing delete character and delete line
- --
- --
- --
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for delete_character and delete_line for") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("the page_mode terminal, refer to sections 3.3.3.17") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("and 3.3.3.18 of the test document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 15) ) ;
- VT.PUT("Let's put some lines of data on the display so we can") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("illustrate delete_character and delete_line.") ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 45) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 1) ) ;
- VT.PUT("This is our first line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(11, 1) ) ;
- VT.PUT("This is our second line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(12, 1) ) ;
- VT.PUT("This is our third line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(13, 1) ) ;
- VT.PUT("This is our fourth line of data.") ;
- -------------
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("Let's delete the second and third lines.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("Strike a key to see results...") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 1) ) ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.DELETE_LINE(2) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("Hit any key to move on...") ;
- vt.update_screen( 10 , 17) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- -------------------
- VT.SET_POSITION( VT.XY_POSITION'(19, 30) ) ;
- VT.PUT("Now let's delete some characters.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 30) ) ;
- VT.PUT("We will position the cursor on the 'f' of fourth,") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(21, 30) ) ;
- VT.PUT("and delete six characters.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(23, 30) ) ;
- VT.PUT("Strike a key to see results...") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 13) ) ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.DELETE_CHARACTER(6) ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("'fourth' should be deleted from the display.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- --------------------
- VT.SET_POSITION( VT.XY_POSITION'(10, 25) ) ;
- VT.PUT("We will call the delete routines with a ") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 25) ) ;
- VT.PUT("parameter greater than the number of characters") ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 25) ) ;
- VT.PUT("(or lines) left on the line (or display).") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(14, 25) ) ;
- VT.PUT("Press a key to see the data...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(16, 25) ) ;
- VT.PUT("Let's first delete from the 'l' in 'line' ") ;
- VT.SET_POSITION( VT.XY_POSITION'(17, 25) ) ;
- VT.PUT("by calling DELETE_CHARACTER( 25 ).") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(22, 1) ) ;
- VT.PUT("This is our first line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(23, 1) ) ;
- VT.PUT("This is our second line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 1) ) ;
- VT.PUT("This is our last line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(19, 25) ) ;
- VT.PUT("Press a key to see the results...") ;
- VT.SET_POSITION( VT.XY_POSITION'(22, 19) ) ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(22, 19) ) ;
- VT.DELETE_CHARACTER(25) ;
- vt.update_screen( 22, 22 ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_START_TO_XY_POSITION ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 25) ) ;
- VT.PUT("The characters from the 'l' on should") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 25) ) ;
- VT.PUT("be deleted. Now we will call DELETE_LINE(5)") ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 25) ) ;
- VT.PUT("from the word 'second'. ") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(14, 25) ) ;
- VT.PUT("Strike a key to continue...") ;
-
- vt.update_screen( 1, vt_content.height ) ;
- VT.SET_POSITION( VT.XY_POSITION'(23, 13) ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(23, 13) ) ;
- VT.DELETE_LINE(5) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
-
- VT.erase_in_display( vt.all_positions ) ;
- --
- -- testing erase_in_line and inserting
- -- characters on the display
- --
- --
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for erase_in_line and inserting characters") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("on the display for the page mode terminal, refer") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("to sections 3.3.3.20 and 3.3.3.21 of the Test" ) ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 15) ) ;
- VT.PUT("Procedures document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 15) ) ;
- VT.PUT("Let's put some lines of data on the display so we can") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("illustrate erase_in_line and inserting characters.") ;
- VT.SET_POSITION( VT.XY_POSITION'(8, 45) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 1) ) ;
- VT.PUT("This is our first line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(11, 1) ) ;
- VT.PUT("This is our second line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(12, 1) ) ;
- VT.PUT("This is our third line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(13, 1) ) ;
- VT.PUT("This is our fourth line of data.") ;
- -------------
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("Let's erase from the start of the first line") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("to the cursor.") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 30) ) ;
- VT.PUT("Strike a key to see results...") ;
- VT.SET_POSITION( VT.XY_POSITION'(10, 17) ) ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.ERASE_IN_LINE( VT.FROM_START_TO_XY_POSITION ) ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike a key to continue.") ;
- vt.update_screen( 10, vt_content.height ) ;
- vt.get( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 1) ) ;
- VT.ERASE_IN_DISPLAY(VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("Now let's erase from the cursor to the end of") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("the line.") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 30) ) ;
- VT.PUT("Strike a key to see results...") ;
- VT.SET_POSITION( VT.XY_POSITION'(11, 12) ) ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_LINE( VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike a key to continue.") ;
- vt.update_screen( 1, vt_content.height ) ;
- vt.get( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 1) ) ;
- VT.ERASE_IN_DISPLAY(VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("Now let's try to insert some characters ") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("on the display. We will insert the string") ;
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("'THIS IS A TEST' starting in column 1 of") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 30) ) ;
- VT.PUT("our third line of data.") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(20, 30) ) ;
- VT.PUT("Strike a key to see the results...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.ENTER_INSERT_MODE ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 1) ) ;
- VT.PUT("THIS IS A TEST ") ;
- VT.EXIT_INSERT_MODE ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_XY_POSITION_TO_END ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("The characters to the right of the inserted") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("text should haved shifted to the right enough") ;
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("to make room for the new data.") ;
- VT.SET_POSITION( VT.XY_POSITION'(19, 30) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_XY_POSITION_TO_END ) ;
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("We are now out of insert_mode so any ") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("data written to the screen should replace") ;
- VT.SET_POSITION( VT.XY_POSITION'(17, 30) ) ;
- VT.PUT("whatever is presently in that position.") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 30) ) ;
- VT.PUT("Let's give it a try.") ;
- VT.SET_POSITION( VT.XY_POSITION'(20, 30) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS) ;
-
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 1) ) ;
- VT.ERASE_IN_DISPLAY( VT.FROM_XY_POSITION_TO_END ) ;
- VT.SET_POSITION( VT.XY_POSITION'(13, 13) ) ;
- VT.PUT("new ") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(15, 30) ) ;
- VT.PUT("The word 'fourth' should be replaced by 'new '.") ;
- VT.SET_POSITION( VT.XY_POSITION'(16, 30) ) ;
- VT.PUT("As you can see we are no longer in insert_mode.") ;
- VT.SET_POSITION( VT.XY_POSITION'(19, 30) ) ;
- VT.PUT("Strike a key to continue...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS) ;
-
-
- VT.erase_in_display( vt.all_positions ) ;
- --
- -- testing setting the graphic rendition
- -- on the page_mode terminal
- --
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Tests for setting the graphic rendition on") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("the page mode terminal, refer to section") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("3.3.3.23 of the Test Procedures document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- VT.SET_POSITION( VT.XY_POSITION'(1, 1) ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 5 ) ) ;
- VT.PUT("The following data should be highlited ===>>") ;
- VT.SELECT_GRAPHIC_RENDITION( VT.REVERSE_IMAGE ) ;
- VT.SET_POSITION( VT.XY_POSITION'(10, 49) ) ;
- VT.PUT("In otherwords, reverse image!") ;
- VT.SET_POSITION( VT.XY_POSITION'(18, 40) ) ;
- VT.PUT("Strike a key to get back to normal...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.SELECT_GRAPHIC_RENDITION( VT.PRIMARY_RENDITION ) ;
- VT.SET_POSITION( VT.XY_POSITION'(20, 35) ) ;
- VT.PUT("This should be in the primary rendition.") ;
- VT.SET_POSITION( VT.XY_POSITION'(22, 35) ) ;
- VT.PUT("Hit a key to move on...") ;
- vt.update_screen( 1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- VT.erase_in_display( vt.all_positions ) ;
- vt.update_screen( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(5, 20) ) ;
- VT.PUT("Test for reading characters from the keyboard for") ;
- VT.SET_POSITION( VT.XY_POSITION'(6, 15) ) ;
- VT.PUT("the page mode terminal, refer to section 3.3.3.15") ;
- VT.SET_POSITION( VT.XY_POSITION'(7, 15) ) ;
- VT.PUT("of the Test Procedures document.") ;
- VT.SET_POSITION( VT.XY_POSITION'(24, 45) ) ;
- VT.PUT("...strike any key to continue.") ;
- vt.update_screen( 5, vt_content.height ) ;
- vt.get( data, last, keys ) ;
- VT.ERASE_IN_DISPLAY( VT.ALL_POSITIONS ) ;
- vt.update_screen( 1, vt_content.height ) ;
-
- VT.SET_POSITION( VT.XY_POSITION'(9, 15) ) ;
- VT.PUT("Type some keys and function keys from the keyboard, this") ;
- VT.SET_POSITION( VT.XY_POSITION'(10,15) ) ;
- VT.PUT("test will redisplay the keys you strike to the display.") ;
- VT.SET_POSITION( VT.XY_POSITION'(12,15) ) ;
- VT.PUT("You must hit the '#' key to exit from this process....");
- VT.SET_POSITION( VT.XY_POSITION'(15,1 ) ) ;
- vt.update_screen( 9, 15 ) ;
-
- LOOP
- vt.get( data, last, keys ) ;
-
- num_function_keys := vt.function_count( keys ) ;
- IF last = 0
- THEN
- IF num_function_keys = 0
- THEN
- NULL ;
- ELSE
- FOR i IN 1..num_function_keys
- LOOP
- vt.function_key( keys, i, key_id2, prev_pos ) ;
- vt.function_key_name( key_id2, key_name, key_last ) ;
- vt.put( right_arrow ) ;
- vt.put( key_name(1..key_last) ) ;
- vt.put( left_arrow ) ;
- END LOOP ;
- END IF ;
- ELSE
- IF num_function_keys = 0
- THEN
- vt.put( data( 1..last ) ) ;
-
- ELSE
- last_position := 1 ;
- FOR i IN 1..num_function_keys
- LOOP
- vt.function_key(keys, i, key_id2, prev_pos ) ;
- IF prev_pos /= 0
- THEN
- vt.put( data(last_position..prev_pos) ) ;
- last_position := prev_pos + 1 ;
-
- END IF ;
- vt.function_key_name( key_id2, key_name, key_last ) ;
- vt.put(right_arrow);
- vt.put( key_name(1..key_last) ) ;
- vt.put(left_arrow);
- END LOOP ;
-
- IF last_position <= last
- THEN
- vt.put( data( last_position..last ) ) ;
- END IF ;
-
- END IF ;
- END IF ;
- vt.update_line( 15 ) ; -- It will be this thru out the test
-
- IF last /= 0
- THEN
- EXIT WHEN data(last) = '#' ;
- END IF ;
-
- END LOOP ;
-
- vt.erase_in_display( vt.all_positions ) ;
- vt.update_screen( 1, vt_content.height ) ;
- --
- --
- -- Abstract : The following section of this test file will fully test
- -- the functionalities as proposed in the Specification
- -- Document.
- --
- -- The person testing these requirements might follow along
- -- in the Specification document to verify each test performed.
- --
- --
- --
- --
- -- This Ada program produces the introduction for the scroll_mode
- -- testing to be done by the user.
- --
- VT.SET_POSITION( VT.XY_POSITION'(10, 18) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.REVERSE_IMAGE ) ;
-
- VT.PUT(" INTERACTIVE TEST FOR THE SCROLL MODE TERMINAL ") ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 29) ) ;
- VT.PUT(" OF THE VIRTUAL TERMINAL ") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 50) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.PRIMARY_RENDITION ) ;
-
- VT.PUT("...strike any key to continue." ) ;
- vt.update_screen( 10, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
- vt.erase_in_display( vt.all_positions ) ;
- vt.set_position( vt.xy_position'(24, 1) ) ;
- vt.update_screen( 1, vt_content.height ) ;
-
- VT.CLOSE ;
-
- st.open ;
-
- st.new_line ;
- st.put(" This test will cover the following functionalities of the") ;
- st.new_line ;
- st.put("scroll terminal(the section of the Test document is included).") ;
- st.new_line ;
- st.new_line ;
- st.put("writing data to the screen( 3.3.3.6 ),") ;
- st.new_line ;
- st.put("moving to a new_line( 3.3.3.4 )," ) ;
- st.new_line ;
- st.put("setting tab stops( 3.3.3.1 ),") ;
- st.new_line ;
- st.put("clearing tab stops( 3.3.3.2 ), and") ;
- st.new_line ;
- st.put("moving by tab stops on the display( 3.3.3.3 ).") ;
- st.new_line ;
- st.new_line ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
-
- st.new_line ;
- st.new_line ;
- st.put("Writing to the display and moving to a new line are used") ;
- st.new_line ;
- st.put("extensively throughout the testing of the scroll terminal,");
- st.new_line ;
- st.put("therefore they will not be 'explicitly' tested.") ;
- st.new_line ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line ;
- st.new_line ;
- st.set_position(1) ;
- st.put("my_prompt>") ;
-
- st.update_line ;
- st.set_position( 1 ) ;
- st.put("This is a test") ;
-
- st.new_line ;
- st.new_line ;
- st.put("Now let's test the set_tab and tab functionalities.") ;
- st.new_line ;
- st.put("Tabs have been set in columns 10 and 22, we will tab to those") ;
- st.new_line ;
- st.put("and write an 'X'.") ;
- st.new_line ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line ;
-
- st.set_position(10) ;
- st.set_tab ;
- st.set_position(22) ;
- st.set_tab ;
- st.new_line ;
- st.new_line ;
- st.tab ;
- st.put('X') ;
- st.tab ;
- st.put('X') ;
- st.update_line ;
-
- st.set_position(1) ;
- st.put(" The 'X's indicate where the tab stops are.") ;
-
- st.new_line ;
- st.new_line ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line ;
- st.new_line ;
- st.put("Now let's test the clear tab functionality.");
- st.new_line ;
- st.put("We will first tab over to the first tab stop then clear it.");
- st.new_line ;
- st.put("Strike a key to do this....") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
-
- st.new_line ;
- st.new_line ;
- st.put("The tab stop has been cleared, we will call tab once and") ;
- st.new_line ;
- st.put("print an 'X'. It should be below the second 'X' above.") ;
- st.new_line ;
- st.tab ;
- st.clear_tab ;
- st.new_line ;
- st.put("Strike a key to see the results...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line ;
- st.new_line ;
- st.tab ;
- st.put('X') ;
- st.new_line ;
- st.tab ;
- st.clear_tab;
- st.new_line;
- st.put("Strike a key to move on...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line(3) ;
- st.put(" This test will cover the following functionalities of the") ;
- st.new_line ;
- st.put("scroll terminal(the section of the Test document is included.)") ;
- st.new_line(2) ;
- st.put("writing data to the screen( 3.3.3.6 ),") ;
- st.new_line ;
- st.put("moving to a new_line( 3.3.3.4 )," ) ;
- st.new_line ;
- st.put("setting tab stops( 3.3.3.1 )," ) ;
- st.new_line ;
- st.put("moving by tab stops( 3.3.3.2 )," ) ;
- st.new_line ;
- st.put("moving to a new_page( 3.3.3.5 ),and ") ;
- st.new_line ;
- st.put("ringing the terminal's bell( 3.3.3.8 ).") ;
- st.new_line(2) ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
-
- st.new_line(2) ;
-
- st.put("Strike a key to move to a new page( if supported ).") ;
- st.new_line ;
-
- st.get( data, last, keys2 ) ;
- st.new_page ;
-
- st.put("Strike a key and the terminal's bell will ring.") ;
- st.update_line ;
-
- st.get( data, last, keys2 ) ;
- st.bell ; st.bell ; st.bell ;
-
- st.new_line(2) ;
- st.put("Let's set some tab stops on the line and call Tab(3)") ;
- st.new_line ;
- st.put("and see what happens.") ;
- st.new_line(2) ;
- st.put("Tabs will be set where the 'X's appear on the following line");
- st.new_line(2) ;
- st.set_position(5) ;
- st.set_tab ;
- st.put('X') ;
- st.set_position(15);
- st.set_tab ;
- st.put('X') ;
- st.set_position(25);
- st.set_tab ;
- st.put('X') ;
-
- st.new_line(2) ;
- st.put("Now a call on new_line(2) followed by tab(3) then put('X') ");
- st.new_line ;
- st.put("will produce an 'X' to be written on the display.");
- st.new_line(2) ;
-
- st.put("Strike a key to see the results...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
-
- st.new_line(2) ;
- st.tab(3) ;
- st.put('X') ;
- st.new_line(2) ;
- st.put("It should be under the third 'X' above.") ;
- st.new_line(2);
- st.put("Strike a key to continue...");
- st.update_line ;
- st.get( data, last, keys2 ) ;
-
- st.new_line(3) ;
- st.put(" This test will cover the following functionalities of the") ;
- st.new_line ;
- st.put("scroll terminal(the section of the Test document is included.)") ;
- st.new_line(2) ;
- st.put("writing data to the screen( 3.3.3.6 ),") ;
- st.new_line ;
- st.put("moving to a new_line( 3.3.3.4 ),and " ) ;
- st.new_line ;
- st.put("getting data from the keyboard( 3.3.3.7 )," ) ;
- st.new_line ;
- st.new_line ;
- st.put("Strike a key to continue...") ;
- st.update_line ;
- st.get( data, last, keys2 ) ;
- st.new_line ;
- st.put("Let's try putting a line past the end of the screen.") ;
- st.new_line ;
- st.put("Any data written past the width of the screen will be lost,and") ;
- st.new_line ;
- st.put("the cursor will be located in the rightmost column of the screen.");
- st.new_line ;
- st.new_line ;
- st.put("Strike a key to see the results then another key to move on...") ;
- st.new_line ;
- st.get( data, last, keys2 ) ;
-
- st.set_position( 50) ;
- st.put("This line should be chopped off and the rest is lost") ;
- st.update_line ;
-
- st.get( data, last, keys2 ) ;
-
- st.new_line( 2 ) ;
- st.put("Now let's test the reading from the keyboard functionality.");
- st.new_line(2) ;
- st.put("What you type at the keyboard will be read and put back on the ");
- st.new_line ;
- st.put("screen. Type a '#' to exit.") ;
- st.new_line ;
- st.put("Strike a key to read data...") ;
- st.new_line(2) ;
-
-
- LOOP
- st.get( data, last, keys2 ) ;
-
- num_function_keys := st.function_count( keys2 ) ;
- IF last = 0
- THEN
- IF num_function_keys = 0
- THEN
- NULL ;
- ELSE
- FOR i IN 1..num_function_keys
- LOOP
- st.function_key( keys2, i, key_id, prev_pos ) ;
- st.function_key_name( key_id, key_name, key_last ) ;
- st.put( right_arrow ) ;
- st.put( key_name(1..key_last) ) ;
- st.put( left_arrow ) ;
- END LOOP ;
- END IF ;
- ELSE
- IF num_function_keys = 0
- THEN
- st.put( data( 1..last ) ) ;
-
- ELSE
- last_position := 1 ;
- FOR i IN 1..num_function_keys
- LOOP
- st.function_key(keys2, i, key_id, prev_pos ) ;
- IF prev_pos /= 0
- THEN
- st.put( data(last_position..prev_pos) ) ;
- last_position := prev_pos + 1 ;
-
- END IF ;
- st.function_key_name( key_id, key_name, key_last ) ;
- st.put(right_arrow);
- st.put( key_name(1..key_last) ) ;
- st.put(left_arrow);
- END LOOP ;
-
- IF last_position <= last
- THEN
- st.put( data( last_position..last ) ) ;
- END IF ;
-
- END IF ;
- END IF ;
- st.update_line ;
-
- IF last /= 0
- THEN
- EXIT WHEN data(last) = '#' ;
- END IF ;
-
- END LOOP ;
-
- st.close ;
-
- --
- --
- -- Abstract : The following section of this test file will fully test
- -- the requirements as proposed by the Specification document.
- --
- -- The person performing the test might follow along in the
- -- Specification document to verify the correctness of each
- -- of the functionalities being tested.
- --
- --
- -- This Ada program produces the introduction for the form terminal
- -- testing to be done by the user.
- --
- VT.OPEN ;
-
- VT.SET_POSITION( VT.XY_POSITION'(10, 18) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.REVERSE_IMAGE ) ;
-
- VT.PUT(" INTERACTIVE TEST FOR THE FORM MODE TERMINAL ") ;
- VT.SET_POSITION( VT.XY_POSITION'(12, 29) ) ;
- VT.PUT(" OF THE VIRTUAL TERMINAL ") ;
-
- VT.SET_POSITION( VT.XY_POSITION'(24, 50) ) ;
- VT.SELECT_GRAPHIC_RENDITION( VT.PRIMARY_RENDITION ) ;
-
- VT.PUT("...strike any key to continue." ) ;
- vt.update_screen(1, vt_content.height ) ;
- VT.GET( IN_BUFFER, IN_BUFFER_LEN, KEYS ) ;
-
- vt.erase_in_display( vt.all_positions ) ;
- vt.update_screen(1, vt_content.height ) ;
-
- VT.CLOSE ;
-
- --
- -- testing define_qualified_area, writing data on the screen,
- -- and activating a form for user fill in
- --
- form.open ;
-
- form.set_position( form.xy_position'(5, 20) ) ;
- form.put("Tests for define_qualified_area, put, and activate_") ;
- form.set_position( form.xy_position'(6, 15) ) ;
- form.put("form for the form_terminal, refer to sections");
- form.set_position( form.xy_position'(7, 15) ) ;
- form.put("3.3.3.24, 3.3.3.29, and 3.3.3.30 of the Test ") ;
- form.set_position( form.xy_position'(8, 15) ) ;
- form.put("Procedures document.") ;
- form.set_position( form.xy_position'(20, 30) ) ;
- form.put("...strike a function key to continue") ;
- form.activate_form ;
- form.erase_display ;
-
- form.set_position( form.xy_position'(5,18) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected
- ) ;
- form.put("Enter name:"); -- act. pos. still at 5,17
-
- form.set_position( form.xy_position'(6,14) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected
- ) ;
- form.put("Enter password:") ;
-
- form.set_position( form.xy_position'(5,29) ) ;
- form.define_qualified_area( intensity => form.high ,
- protection => form.unprotected,
- input => form.graphic_characters);
-
- form.set_position( form.xy_position'(5,59) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected ) ;
-
- form.set_position( form.xy_position'(6,29) ) ;
- form.define_qualified_area( intensity => form.none ,
- protection => form.unprotected,
- input => form.graphic_characters);
-
- form.set_position( form.xy_position'(6,40) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected ) ;
-
- form.set_position( form.xy_position'(9,1) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected ) ;
-
- form.set_position( form.xy_position'(11,15) ) ;
- form.put("This form has five qualified areas defined on it,") ;
- form.set_position( form.xy_position'(12,10) ) ;
- form.put("two of which are unprotected, this means that once the");
- form.set_position( form.xy_position'(13,10) ) ;
- form.put("form is activated, only those two areas may accept input.");
-
- form.set_position( form.xy_position'(15,10)) ;
- form.put("The form is now active until a function key is pressed.");
- form.set_position( form.xy_position'(16,10)) ;
- form.put("Try entering values into the unprotected areas and other");
- form.set_position( form.xy_position'(17,10)) ;
- form.put("areas if you like. The first unprotected area accepts");
- form.set_position( form.xy_position'(18,10)) ;
- form.put("graphic characters and the second has no rendition.") ;
- form.set_position( form.xy_position'(19,10)) ;
- form.put("Type in a password of ten characters or less. We will use");
- form.set_position( form.xy_position'(20,10)) ;
- form.put("the 'reading from the form' functionality to extract ") ;
- form.set_position( form.xy_position'(21,10)) ;
- form.put("the password and display it to you.") ;
- form.set_position( form.xy_position'(23,10)) ;
- form.put("Strike a function key to show your password.") ;
- form.activate_form ;
-
- form.set_position( form.xy_position'(9, 1) ) ;
- form.erase_area ;
-
- form.set_position( form.xy_position'(16,10) ) ;
- form.put("Strike a function key to move on...and we'll retrieve ");
- form.set_position( form.xy_position'(17,10) ) ;
- form.put("the function key you hit and display it to you.") ;
-
- form.set_position( form.xy_position'(6,30) ) ;
- form.get( buffer ) ;
- form.set_position( form.xy_position'(13,10) ) ;
- form.put("Your password is =>> ") ;
- form.set_position( form.xy_position'(13,30) ) ;
- form.define_qualified_area( intensity => form.high ,
- protection => form.protected ) ;
-
- form.set_position( form.xy_position'(13,41) ) ;
- form.define_qualified_area( intensity => form.normal,
- protection => form.protected ) ;
-
- form.set_position( form.xy_position'(13, 31) ) ;
- form.put( buffer ) ;
-
- form.set_position( form.xy_position'(20,10) ) ;
- form.put("The function key you struck is =>> ") ;
-
- form.activate_form ;
-
- value := form.termination_key ;
- driver.interpret( ascii.esc & "[20;47H" ) ;
- int_io.put( value ) ;
-
-
- delay 3.0 ; -- wait a couple of seconds.....
-
- form.erase_display ;
- form.set_position( form.xy_position'(5, 20) ) ;
- form.put("Tests for define_qualified_area, put, moving by") ;
- form.set_position( form.xy_position'(6, 15 ) ) ;
- form.put("tab stops, erasing areas on the display, ") ;
- form.set_position( form.xy_position'(7, 15 ) ) ;
- form.put("reading characters from the display, clearing ") ;
- form.set_position( form.xy_position'(8, 15 ) ) ;
- form.put("qualified areas, and activating a form for user ") ;
- form.set_position( form.xy_position'(9, 15) ) ;
- form.put("fill in for the form_terminal, refer to sections");
- form.set_position( form.xy_position'(10, 15) ) ;
- form.put("3.3.3.24 thru 3.3.3.30 of the Test Procedures document.") ;
- form.set_position( form.xy_position'(20, 30) ) ;
- form.put("...strike a function key to continue") ;
- form.activate_form ;
- form.erase_display ;
-
- create_form1;
- form.activate_form;
-
- modify_form1 ;
- form.activate_form;
- create_form2 ;
- form.activate_form ;
-
- form.close;
-
- vt.open ;
- vt.erase_in_display( vt.all_positions ) ;
- vt.update_screen( 1, vt_content.height ) ;
- vt.close ;
-
- END vt_test ;
- PRAGMA main;
-