Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / tests / test_samba.aug
1 module Test_samba =
2
3    let conf = "#
4 # Sample configuration file for the Samba suite for Debian GNU/Linux.
5 #
6 #
7 # This is the main Samba configuration file. You should read the
8 # smb.conf(5) manual page in order to understand the options listed
9 # here. Samba has a huge number of configurable options most of which
10 # are not shown in this example
11 #
12
13 #======================= Global Settings =======================
14
15 [global]
16
17 ## Browsing/Identification ###
18
19 # Change this to the workgroup/NT-domain name your Samba server will part of
20    workgroup = WORKGROUP
21
22 # server string is the equivalent of the NT Description field
23    server string = %h server (Samba, Ubuntu)
24
25 # Windows Internet Name Serving Support Section:
26 # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
27 ;   wins support = no
28
29 # Windows clients look for this share name as a source of downloadable
30 # printer drivers
31 [print$]
32    comment = All Printers
33    browseable = no
34    path = /tmp
35    printable = yes
36    public = yes
37    writable = no
38    create mode = 0700
39    printcap name = /etc/printcap
40    print command = /usr/bin/lpr -P%p -r %s
41    printing = cups
42 "
43
44    test Samba.lns get conf =
45       {}
46       { "#comment" = "Sample configuration file for the Samba suite for Debian GNU/Linux." }
47       {}
48       {}
49       { "#comment" = "This is the main Samba configuration file. You should read the" }
50       { "#comment" = "smb.conf(5) manual page in order to understand the options listed" }
51       { "#comment" = "here. Samba has a huge number of configurable options most of which" }
52       { "#comment" = "are not shown in this example" }
53       {}
54       {}
55       { "#comment" = "======================= Global Settings =======================" }
56       {}
57       { "target" = "global"
58          {}
59          { "#comment" = "# Browsing/Identification ###" }
60          {}
61          { "#comment" = "Change this to the workgroup/NT-domain name your Samba server will part of" }
62          { "workgroup"  = "WORKGROUP" }
63          {}
64          { "#comment" = "server string is the equivalent of the NT Description field" }
65          { "server string" = "%h server (Samba, Ubuntu)" }
66          {}
67          { "#comment" = "Windows Internet Name Serving Support Section:" }
68          { "#comment" = "WINS Support - Tells the NMBD component of Samba to enable its WINS Server" }
69          { "#comment" = "wins support = no" }
70          {}
71          { "#comment" = "Windows clients look for this share name as a source of downloadable" }
72          { "#comment" = "printer drivers" } }
73       { "target" = "print$"
74          { "comment" = "All Printers" }
75          { "browseable" = "no" }
76          { "path" = "/tmp" }
77          { "printable" = "yes" }
78          { "public" = "yes" }
79          { "writable" = "no" }
80          { "create mode" = "0700" }
81          { "printcap name" = "/etc/printcap" }
82          { "print command" = "/usr/bin/lpr -P%p -r %s" }
83          { "printing" = "cups" } }
84
85     test Samba.lns get "[test]\ncrazy:entry = foo\n" =
86          { "target" = "test"
87             {"crazy:entry" = "foo"}}
88
89     (* Test complex idmap commands with asterisk in key name, ticket #354 *)
90     test Samba.lns get "[test]
91   idmap backend = tdb
92   idmap uid = 1000000-1999999
93   idmap gid = 1000000-1999999
94
95   idmap config CORP : backend  = ad
96   idmap config * : range = 1000-999999\n" =
97       { "target" = "test"
98         { "idmap backend" = "tdb" }
99         { "idmap uid" = "1000000-1999999" }
100         { "idmap gid" = "1000000-1999999" }
101         {  }
102         { "idmap config CORP : backend" = "ad" }
103         { "idmap config * : range" = "1000-999999" } }