Imported Upstream version 0.10.0
[platform/upstream/augeas.git] / lenses / tests / test_passwd.aug
1 module Test_Passwd =
2
3 let conf = "root:x:0:0:root:/root:/bin/bash
4 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
5 free:x:1000:1000:Free Ekanayaka,,,:/home/free:/bin/bash
6 "
7
8 test Passwd.lns get conf =
9    { "root"
10      { "password" = "x" }
11      { "uid" = "0" }
12      { "gid" = "0" }
13      { "name" = "root" }
14      { "home" = "/root" }
15      { "shell" = "/bin/bash" } }
16    { "libuuid"
17      { "password" = "x" }
18      { "uid" = "100" }
19      { "gid" = "101" }
20      { "name" }
21      { "home" = "/var/lib/libuuid" }
22      { "shell" = "/bin/sh" } }
23    { "free"
24      { "password" = "x" }
25      { "uid" = "1000" }
26      { "gid" = "1000" }
27      { "name" = "Free Ekanayaka,,," }
28      { "home" = "/home/free" }
29      { "shell" = "/bin/bash" } }
30
31 (* Popular on Solaris *)
32 test Passwd.lns get "+@some-nis-group::::::\n" =
33   { "@nis" = "some-nis-group" }
34
35 test Passwd.lns get "+\n" =
36   { "@nisdefault" }
37
38 test Passwd.lns get "+::::::/sbin/nologin\n" =
39   { "@nisdefault"
40     { "password" = "" }
41     { "uid" = "" }
42     { "gid" = "" }
43     { "name" }
44     { "home" }
45     { "shell" = "/sbin/nologin" } }