Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_group.aug
1 module Test_group =
2
3 let conf = "bin:x:2:
4 audio:x:29:joe
5 avahi-autoipd:!:113:bill,martha
6 "
7
8 test Group.lns get conf =
9    { "bin"
10      { "password" = "x" }
11      { "gid" = "2" } }
12    { "audio"
13      { "password" = "x" }
14      { "gid" = "29" }
15      { "user" = "joe" } }
16    { "avahi-autoipd"
17      { "password" = "!" }
18      { "gid" = "113" }
19      { "user" = "bill"}
20      { "user" = "martha"} }
21
22 (* Password field can be empty *)
23 test Group.lns get "root::0:root\n" =
24   { "root"
25     { "password" = "" }
26     { "gid" = "0" }
27     { "user" = "root" } }
28
29 (* Password field can be disabled by ! or * *)
30 test Group.lns get "testgrp:!:0:testusr\n" =
31   { "testgrp"
32     { "password" = "!" }
33     { "gid" = "0" }
34     { "user" = "testusr" } }
35
36 test Group.lns get "testgrp:*:0:testusr\n" =
37   { "testgrp"
38     { "password" = "*" }
39     { "gid" = "0" }
40     { "user" = "testusr" } }
41
42 (* NIS defaults *)
43 test Group.lns get "+\n" =
44   { "@nisdefault" }
45
46 test Group.lns get "+:::\n" =
47   { "@nisdefault"
48     { "password" = "" }
49     { "gid" = "" } }
50
51 test Group.lns get "+:*::\n" =
52   { "@nisdefault"
53     { "password" = "*" }
54     { "gid" = "" } }