Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_anaconda.aug
1 (*
2 Module: Test_Anaconda
3   Provides unit tests and examples for the <Anaconda> lens.
4
5   - 'exampleN' snippets are taken from the documentation:
6     https://anaconda-installer.readthedocs.io/en/latest/user-interaction-config-file-spec.html
7   - 'installedN' snippets are taken from the resulting files after
8     a successful installation
9 *)
10
11 module Test_Anaconda =
12
13 let example1 = "# comment example - before the section headers
14
15 [section_1]
16 # comment example - inside section 1
17 key_a_in_section1=some_value
18 key_b_in_section1=some_value
19
20 [section_2]
21 # comment example - inside section 2
22 key_a_in_section2=some_value
23 "
24
25 test Anaconda.lns get example1 =
26   { "#comment" = "comment example - before the section headers" }
27   { }
28   { "section_1"
29     { "#comment" = "comment example - inside section 1" }
30     { "key_a_in_section1" = "some_value" }
31     { "key_b_in_section1" = "some_value" }
32     { }
33   }
34   { "section_2"
35     { "#comment" = "comment example - inside section 2" }
36     { "key_a_in_section2" = "some_value" }
37   }
38
39 let example2 = "# this is the user interaction config file
40
41 [General]
42 post_install_tools_disabled=0
43
44 [DatetimeSpoke]
45 # the date and time spoke has been visited
46 visited=1
47 changed_timezone=1
48 changed_ntp=0
49 changed_timedate=1
50
51 [KeyboardSpoke]
52 # the keyboard spoke has not been visited
53 visited=0
54 "
55
56 test Anaconda.lns get example2 =
57   { "#comment" = "this is the user interaction config file" }
58   { }
59   { "General"
60     { "post_install_tools_disabled" = "0" }
61     { }
62   }
63   { "DatetimeSpoke"
64     { "#comment" = "the date and time spoke has been visited" }
65     { "visited" = "1" }
66     { "changed_timezone" = "1" }
67     { "changed_ntp" = "0" }
68     { "changed_timedate" = "1" }
69     { }
70   }
71   { "KeyboardSpoke"
72     { "#comment" = "the keyboard spoke has not been visited" }
73     { "visited" = "0" }
74   }
75
76 let installed1 = "# This file has been generated by the Anaconda Installer 21.48.22.134-1
77
78 [ProgressSpoke]
79 visited = 1
80
81 "
82
83 test Anaconda.lns get installed1 =
84   { "#comment" = "This file has been generated by the Anaconda Installer 21.48.22.134-1" }
85   { }
86   { "ProgressSpoke"
87     { "visited" = "1" }
88     { }
89   }