~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to parser/tst/simple_tests/conditional/else_if_3.sd

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#=DESCRIPTION conditional else
 
2
#=EXRESULT PASS
 
3
 
 
4
$FOO=true
 
5
$BAR = false
 
6
$FALSE = false
 
7
 
 
8
/bin/true {
 
9
 
 
10
#empty clauses
 
11
  if $FOO {
 
12
  }
 
13
 
 
14
  if $BAR {
 
15
  }
 
16
 
 
17
  if $FOO {
 
18
  } else {
 
19
  }
 
20
 
 
21
  if $BAR {
 
22
  } else {
 
23
  }
 
24
 
 
25
  if $FOO {
 
26
    if $FALSE {
 
27
    }
 
28
    if not $FALSE {
 
29
    } else {
 
30
    }
 
31
  } else {
 
32
    if $BAR {
 
33
    } else {
 
34
    }
 
35
    if $BAR {
 
36
    } else if not $FALSE {
 
37
    }
 
38
  }
 
39
 
 
40
#unempty clauses
 
41
  if $FOO {
 
42
    /tmp/1 r,
 
43
  }
 
44
 
 
45
  if $BAR {
 
46
    /tmp/2 r,
 
47
  }
 
48
 
 
49
  if $FOO {
 
50
    /tmp/3 r,
 
51
  } else {
 
52
    /tmp/4 r,
 
53
  }
 
54
 
 
55
  if $BAR {
 
56
    /tmp/5 r,
 
57
  } else {
 
58
    /tmp/6 r,
 
59
  }
 
60
 
 
61
  if $FOO {
 
62
    /tmp/7 r,
 
63
    if $FALSE {
 
64
      /tmp/8 r,
 
65
    }
 
66
    if not $FALSE {
 
67
      /tmp/9 r,
 
68
    } else {
 
69
      /tmp/10 r,
 
70
    }
 
71
  } else {
 
72
    /tmp/11 r,
 
73
    if $BAR {
 
74
      /tmp/12 r,
 
75
    } else {
 
76
      /tmp/13 r,
 
77
    }
 
78
    if $BAR {
 
79
      /tmp/14 r,
 
80
    } else if not $FALSE {
 
81
      /tmp/15 r,
 
82
    }
 
83
  }
 
84
  if $BAR {
 
85
    /tmp/16 r,
 
86
    if $FALSE {
 
87
      /tmp/17 r,
 
88
    }
 
89
    if not $FALSE {
 
90
      /tmp/18 r,
 
91
    } else {
 
92
      /tmp/19 r,
 
93
    }
 
94
  } else {
 
95
    /tmp/20 r,
 
96
    if $BAR {
 
97
      /tmp/21 r,
 
98
    } else {
 
99
      /tmp/22 r,
 
100
    }
 
101
    if $BAR {
 
102
      /tmp/23 r,
 
103
    } else if not $FALSE {
 
104
      /tmp/24 r,
 
105
    }
 
106
  }
 
107
}