Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / tests / test_xorg.aug
1 (* Tests for the Xorg module *)
2
3 module Test_xorg =
4
5   let conf = "
6 # xorg.conf
7
8 Section \"ServerLayout\"
9         Identifier     \"single head configuration\"
10         Screen      0  \"Screen0\" 0 0
11         InputDevice    \"Generic Keyboard\" \"CoreKeyboard\"
12 EndSection
13
14 Section \"InputDevice\"
15         Identifier      \"Generic Keyboard\"
16         # that's a driver
17         Driver          \"kbd\"
18         Option          \"XkbOptions\"  \"lv3:ralt_switch\"
19 EndSection
20
21 Section \"Device\"
22         Identifier      \"Configured Video Device\"
23         Option          \"MonitorLayout\" \"LVDS,VGA\"
24         VideoRam        229376
25         Option          \"NoAccel\"
26         Screen          0
27 EndSection
28
29 Section \"Screen\"
30         Identifier \"Screen0\"
31         Device     \"Configured Video Device\"
32         DefaultDepth     24
33         SubSection \"Display\"
34                 Viewport   0 0
35                 Depth     24
36                 Modes    \"1280x1024\" \"1280x960\" \"1280x800\"
37         EndSubSection
38 EndSection
39
40 Section \"Module\"
41           SubSection \"extmod\"
42                    Option  \"omit XFree86-DGA\"
43           EndSubSection
44 EndSection
45 "
46
47   test Xorg.lns get conf =
48      { }
49      { "#comment" = "xorg.conf" }
50      { }
51      { "ServerLayout"
52         { "Identifier" = "single head configuration" }
53         { "Screen"     = "Screen0"
54            { "num"      = "0" }
55            { "position" = "0 0" } }
56         { "InputDevice" = "Generic Keyboard"
57            { "option"   = "CoreKeyboard" } } }
58      { }
59      { "InputDevice"
60         { "Identifier" = "Generic Keyboard" }
61         { "#comment"   = "that's a driver" }
62         { "Driver"     = "kbd" }
63         { "Option"     = "XkbOptions"
64              { "value"  = "lv3:ralt_switch" } } }
65      { }
66      { "Device"
67         { "Identifier" = "Configured Video Device" }
68         { "Option"     = "MonitorLayout"
69              { "value"  = "LVDS,VGA" } }
70         { "VideoRam"   = "229376" }
71         { "Option"     = "NoAccel" } 
72         { "Screen"
73           { "num" = "0" } } }
74      { }
75      { "Screen"
76         { "Identifier" = "Screen0" }
77         { "Device"     = "Configured Video Device" }
78         { "DefaultDepth" = "24" }
79         { "Display"
80            { "ViewPort"
81               { "x" = "0" }
82               { "y" = "0" } }
83            { "Depth"    = "24" }
84            { "Modes"
85               { "mode" = "1280x1024" }
86               { "mode" = "1280x960" }
87               { "mode" = "1280x800" } } } }
88      { }
89      { "Module"
90        { "extmod"
91            { "Option" = "omit XFree86-DGA" } } }