Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_mke2fs.aug
1 (* Test for keepalived lens *)
2
3 module Test_mke2fs =
4
5    let conf = "# This is a comment 
6 ; and another comment
7
8 [defaults]
9         base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
10         default_mntopts = acl,user_xattr
11         enable_periodic_fsck = 0
12         blocksize = 4096
13         inode_size = 256
14         ; here goes inode_ratio
15         inode_ratio = 16384
16
17 [fs_types]
18  ; here we have fs_types
19         ext4dev = {
20                 # this is ext4dev conf
21
22                 features = has_journal,^extent
23                 auto_64-bit_support = 1
24                 inode_size = 256
25                 options = test_fs=1
26         }
27         small = {
28                 blocksize = 1024
29                 inode_size = 128
30                 inode_ratio = 4096
31         }
32         largefile = {
33                 inode_ratio = 1048576
34                 blocksize = -1
35         }
36
37 [options]
38         proceed_delay = 1
39         sync_kludge = 1
40 "
41
42    test Mke2fs.lns get conf =
43      { "#comment" = "This is a comment" }
44      { "#comment" = "and another comment" }
45      {}
46      { "defaults"
47         { "base_features"
48              { "sparse_super" }
49              { "filetype" }
50              { "resize_inode" }
51              { "dir_index" }
52              { "ext_attr" } }
53         { "default_mntopts"
54              { "acl" }
55              { "user_xattr" } }
56         { "enable_periodic_fsck" = "0" }
57         { "blocksize" = "4096" }
58         { "inode_size" = "256" }
59         { "#comment" = "here goes inode_ratio" }
60         { "inode_ratio" = "16384" }
61         {} }
62      { "fs_types"
63         { "#comment" = "here we have fs_types" } 
64         { "filesystem" = "ext4dev"
65              { "#comment" = "this is ext4dev conf" }
66              {}
67              { "features"
68                 { "has_journal" }
69                 { "extent"
70                    { "disable" } } }
71              { "auto_64-bit_support" = "1" }
72              { "inode_size" = "256" }
73              { "options"
74                 { "test_fs" = "1" } } }
75         { "filesystem" = "small"
76              { "blocksize" = "1024" }
77              { "inode_size" = "128" }
78              { "inode_ratio" = "4096" } }
79         { "filesystem" = "largefile"
80              { "inode_ratio" = "1048576" }
81              { "blocksize" = "-1" } }
82         {} }
83      { "options"
84         { "proceed_delay" = "1" }
85         { "sync_kludge" = "1" } }
86
87
88    let quoted_conf = "[defaults]
89         base_features = \"sparse_super,filetype,resize_inode,dir_index,ext_attr\"
90
91 [fs_types]
92         ext4dev = {
93                 features = \"has_journal,^extent\"
94                 default_mntopts = \"user_xattr\"
95                 encoding = \"utf8\"
96                 encoding = \"\"
97         }
98 "
99
100    test Mke2fs.lns get quoted_conf =
101      { "defaults"
102         { "base_features"
103              { "sparse_super" }
104              { "filetype" }
105              { "resize_inode" }
106              { "dir_index" }
107              { "ext_attr" } }
108         {} }
109      { "fs_types"
110         { "filesystem" = "ext4dev"
111              { "features"
112                 { "has_journal" }
113                 { "extent"
114                    { "disable" } } }
115              { "default_mntopts"
116                 { "user_xattr" } }
117              { "encoding" = "utf8" }
118              { "encoding" }
119              } }
120
121
122 test Mke2fs.common_entry
123    put "features = has_journal,^extent\n"
124    after set "/features/has_journal/disable" "";
125    rm "/features/extent/disable" = "features = ^has_journal,extent\n"
126