Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_modules_conf.aug
1 module Test_modules_conf =
2
3 (* Based on 04config.sh from module-init-tools *)
4
5 let conf = "# Various aliases
6 alias alias_to_foo foo
7 alias alias_to_bar bar
8 alias alias_to_export_dep-$BITNESS export_dep-$BITNESS
9
10 # Various options, including options to aliases.
11 options alias_to_export_dep-$BITNESS I am alias to export_dep
12 options alias_to_noexport_nodep-$BITNESS_with_tabbed_options index=0 id=\"Thinkpad\" isapnp=0 \\
13 \tport=0x530 cport=0x538 fm_port=0x388 \\
14 \tmpu_port=-1 mpu_irq=-1 \\
15 \tirq=9 dma1=1 dma2=3 \\
16 \tenable=1 isapnp=0
17
18 # Install commands
19 install bar echo Installing bar
20 install foo echo Installing foo
21 install export_nodep-$BITNESS echo Installing export_nodep
22
23 # Pre- and post- install something
24 pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsi
25 post-install serial /etc/init.d/setserial modload > /dev/null 2> /dev/null
26
27 # Remove commands
28 remove bar echo Removing bar
29 remove foo echo Removing foo
30 remove export_nodep-$BITNESS echo Removing export_nodep
31
32 #Pre- and post- remove something
33 pre-remove serial /etc/init.d/setserial modsave  > /dev/null 2> /dev/null
34 post-remove bttv rmmod tuner
35
36 # Misc other directives
37 probeall /dev/cdroms
38 keep
39 path=/lib/modules/`uname -r`/alsa
40 "
41
42 test Modules_conf.lns get conf =
43   { "#comment" = "Various aliases" }
44   { "alias" = "alias_to_foo"
45     { "modulename" = "foo" }
46   }
47   { "alias" = "alias_to_bar"
48     { "modulename" = "bar" }
49   }
50   { "alias" = "alias_to_export_dep-$BITNESS"
51     { "modulename" = "export_dep-$BITNESS" }
52   }
53   {  }
54   { "#comment" = "Various options, including options to aliases." }
55   { "options" = "alias_to_export_dep-$BITNESS"
56     { "I" }
57     { "am" }
58     { "alias" }
59     { "to" }
60     { "export_dep" }
61   }
62   { "options" = "alias_to_noexport_nodep-$BITNESS_with_tabbed_options"
63     { "index" = "0" }
64     { "id" = "\"Thinkpad\"" }
65     { "isapnp" = "0" }
66     { "port" = "0x530" }
67     { "cport" = "0x538" }
68     { "fm_port" = "0x388" }
69     { "mpu_port" = "-1" }
70     { "mpu_irq" = "-1" }
71     { "irq" = "9" }
72     { "dma1" = "1" }
73     { "dma2" = "3" }
74     { "enable" = "1" }
75     { "isapnp" = "0" }
76   }
77   {  }
78   { "#comment" = "Install commands" }
79   { "install" = "bar"
80     { "command" = "echo Installing bar" }
81   }
82   { "install" = "foo"
83     { "command" = "echo Installing foo" }
84   }
85   { "install" = "export_nodep-$BITNESS"
86     { "command" = "echo Installing export_nodep" }
87   }
88   {  }
89   { "#comment" = "Pre- and post- install something" }
90   { "pre-install" = "ide-scsi"
91     { "command" = "modprobe ide-cd" }
92     { "#comment" = "load ide-cd before ide-scsi" }
93   }
94   { "post-install" = "serial"
95     { "command" = "/etc/init.d/setserial modload > /dev/null 2> /dev/null" }
96   }
97   {  }
98   { "#comment" = "Remove commands" }
99   { "remove" = "bar"
100     { "command" = "echo Removing bar" }
101   }
102   { "remove" = "foo"
103     { "command" = "echo Removing foo" }
104   }
105   { "remove" = "export_nodep-$BITNESS"
106     { "command" = "echo Removing export_nodep" }
107   }
108   {  }
109   { "#comment" = "Pre- and post- remove something" }
110   { "pre-remove" = "serial"
111     { "command" = "/etc/init.d/setserial modsave  > /dev/null 2> /dev/null" }
112   }
113   { "post-remove" = "bttv"
114     { "command" = "rmmod tuner" }
115   }
116   {  }
117   { "#comment" = "Misc other directives" }
118   { "probeall" = "/dev/cdroms" }
119   { "keep" }
120   { "path" = "/lib/modules/`uname -r`/alsa" }