~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to fcl/tests/testapp.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
uses custapp,classes;
7
7
 
8
 
Const 
 
8
Const
9
9
  ShortOpts = 'abc:d:012';
10
10
  Longopts : Array[1..6] of String = (
11
11
    'add:','append','delete:','verbose','create:','file:');
14
14
  TTestApp = Class(TCustomApplication)
15
15
    Procedure DoRun ; Override;
16
16
  end;
17
 
  
 
17
 
18
18
Procedure TTestApp.DoRun;
19
19
 
20
20
Var
21
21
  I : Integer;
22
22
  S : String;
23
23
  Opts,FN,Args : TStrings;
24
 
  
 
24
 
25
25
begin
26
26
  Writeln('Exe name            : ',ExeName);
27
27
  Writeln('Help file           : ',HelpFile);
30
30
  Writeln('Console app         : ',ConsoleApplication);
31
31
  Writeln('Location            : ',Location);
32
32
  Writeln('ParamCount          : ',ParamCount);
33
 
  For I:=0 to ParamCount do 
 
33
  For I:=0 to ParamCount do
34
34
    Writeln('Params [',I:3,']        : ',Params[i]);
35
35
  Writeln('Option char         : ',OptionChar);
36
 
  Writeln('Case sensitive opts : ',CaseSensitiveOptions);  
 
36
  Writeln('Case sensitive opts : ',CaseSensitiveOptions);
37
37
  Writeln('StopOnException     : ',StopOnException);
38
38
  Writeln('----------------------------------------');
39
39
  Writeln('Simple options check');
45
45
  FN:=TStringList.Create;
46
46
  Args:=TStringList.Create;
47
47
  Try
48
 
    For I:=1 to 6 do 
 
48
    For I:=1 to 6 do
49
49
      Opts.Add(LongOpts[i]);
50
50
    S:=CheckOptions(ShortOpts,Opts,Args,FN);
51
51
    Writeln('Found ',Args.Count,' options and ',FN.Count,' non-options (filenames)');
76
76
 
77
77
Var
78
78
  App : TTestApp;
79
 
  
 
79
 
80
80
begin
81
81
  App:=TTestApp.Create(Nil);
82
82
  App.Initialize;
84
84
  App.Run;
85
85
  App.Free;
86
86
end.
87
 
  
88
 
  
 
 
b'\\ No newline at end of file'
 
87
 
 
88