DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦ba6699081⟧ TextFile

    Length: 2560 (0xa00)
    Types: TextFile
    Names: »TESTOPT.PAS«

Derivation

└─⟦80000367c⟧ Bits:30009789/_.ft.Ibm2.50007364.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »TESTOPT.PAS« 

TextFile

(*  Sample test output macro:

  BEGIN
   IF test_global and test( (..) ) THEN
     BEGIN
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
      writeln(test_out,'=== ===>');
     END
  END;

*)

(******************************************************************************)

(* This include file defines the constructs used for program testing. *)

TYPE
   test_option_base_type = (t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7
                      ,t_8, t_9, t_10,t_11,t_12,t_13,t_14,t_15
                      ,t_16,t_17,t_18,t_19,t_20,t_21,t_22,t_23
                      ,t_24,t_25,t_26,t_27,t_28,t_29,t_30,t_31
                      );
CONST
   max_test_option_number = t_15;
   test_global: boolean = true (* false *);
   default_test_out_name: string(.4.) = 'CON:';

TYPE
   test_option_type =t_0..max_test_option_number;
   test_option_set_type = SET OF test_option_type;

VAR
   test_options: test_option_set_type;
   test_out: text;
   test_out_name: string(.14.);

FUNCTION test(list: test_option_set_type): boolean;

  BEGIN
   test := test_global and (list * test_options <> (..) )
  END;

PROCEDURE test_init(VAR in_file,
                        out_file: text
                   );

   VAR i: test_option_type;
       ch: char;
       skip: boolean;

  BEGIN
   IF test_global THEN
     BEGIN
      test_out_name := default_test_out_name;
      write(out_file, 'Enter test output file (default = CON:): ');
      readln(in_file, test_out_name);
      writeln(out_file);
      assign(test_out, test_out_name);
      rewrite(test_out);
      writeln(out_file, '(* set      <CR> do not set      - skip rest)');
      skip := false;
      test_options := (..);
      FOR i:= t_0 TO max_test_option_number DO
         IF not skip THEN
           BEGIN
            write(out_file, 'set option ',ord(i),'? >');
            ch := '@';
            read(in_file,ch);
            IF ch in (.'*','-'.) THEN
               skip := (ch = '-')
            ELSE
               test_options := test_options + (.i.);
            writeln(out_file);
           END
     END
  END;


«eof»