File: ok_longcode_indentation.pas

package info (click to toggle)
pasdoc 0.16.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,572 kB
  • sloc: pascal: 28,894; javascript: 7,665; xml: 2,597; makefile: 523; sh: 417
file content (70 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
unit ok_longcode_indentation;

interface

{ Should cut nothing:

  @longCode(#one
  two
    three
      #) }
procedure Foo1;

{ Should cut 4 spaces:

  @longCode(#
    one
    two
    three
  #) }
procedure Foo2;

{ Should cut 2 spaces:

  @longCode(#
    one
  two
    three
  #) }
procedure Foo3;

{ Should cut nothing (there's a tab here):

  @longCode(#
    one
	two
    three
  #) }
procedure Foo4;

{ Should cut tab + 2 spaces:

  @longCode(#
	  one
	    two
	  three
  #) }
procedure Foo5;

{ Should cut 4 spaces (there's trailing whitespace in 1st lines here, that should be ignored):

  @longCode(#
                 
                  
    one                  
  #) }
procedure Foo6;

{ Should cut 4 spaces (empty line doesn't shorten IndentationPrefix):

  @longCode(#
    if something then
    begin
      // empty line below

    end;
  #) }
procedure Foo7;

implementation
end.