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

« back to all changes in this revision

Viewing changes to parser/tst/simple_tests/conditional/else_if_5.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
  ^TRUE {
 
10
    if $FOO {
 
11
      /bin/true rix,
 
12
    } else if $FALSE {
 
13
      /bin/false rix,
 
14
    } else if $BAR {
 
15
      /dev/null r,
 
16
    } else if not $FALSE {
 
17
      /dev/null w,
 
18
    } else if defined @B1 {
 
19
      /tmp/1 rw,
 
20
    } else if defined @B2 {
 
21
      /tmp/2 rw,
 
22
    } else if defined @B3 {
 
23
      /tmp/3 rw,
 
24
    } else {
 
25
      /tmp/4 rw,
 
26
    }
 
27
  }
 
28
 
 
29
  ^FALSE {
 
30
    if not $FOO {
 
31
      /bin/false rix,
 
32
    } else if ${FALSE} {
 
33
      /bin/true rix,
 
34
    } else if $BAR {
 
35
      /dev/null r,
 
36
    } else if defined @B1 {
 
37
      /tmp/1 rw,
 
38
    } else if defined @B2 {
 
39
      /tmp/2 rw,
 
40
    } else if defined @B3 {
 
41
      /tmp/3 rw,
 
42
    } else {
 
43
      /tmp/4 rw,
 
44
    }
 
45
  }
 
46
}