Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_resolv.aug
1 module Test_resolv =
2
3    let conf = "# Sample resolv.conf
4 ; With multiple comment styles
5 nameserver 192.168.0.3  # and EOL comments
6 nameserver ff02::1
7 domain mynet.com  # and EOL comments
8 search mynet.com anotherorg.net
9
10 # A sortlist now
11 sortlist 130.155.160.0/255.255.240.0 130.155.0.0
12
13 options ndots:3 debug timeout:2
14 options no-ip6-dotint single-request-reopen # and EOL comments
15 options attempts:3 rotate no-check-names inet6 ip6-bytestring ip6-dotint edns0 single-request no-tld-query use-vc no-reload trust-ad
16
17 lookup file bind
18 family inet6 inet4
19 "
20
21 test Resolv.lns get conf =
22    { "#comment" = "Sample resolv.conf" }
23    { "#comment" = "With multiple comment styles" }
24    { "nameserver" = "192.168.0.3"
25         { "#comment" = "and EOL comments" } }
26    { "nameserver" = "ff02::1" }
27    { "domain" = "mynet.com"
28         { "#comment" = "and EOL comments" } }
29    { "search"
30         { "domain" = "mynet.com" }
31         { "domain" = "anotherorg.net" } }
32    {}
33    { "#comment" = "A sortlist now" }
34    { "sortlist"
35         { "ipaddr" = "130.155.160.0"
36            { "netmask" = "255.255.240.0" } }
37         { "ipaddr" = "130.155.0.0" } }
38    {}
39    { "options"
40         { "ndots" = "3" }
41         { "debug" }
42         { "timeout" = "2" } }
43    { "options"
44         { "ip6-dotint"
45              { "negate" } }
46         { "single-request-reopen" }
47         { "#comment" = "and EOL comments" } }
48    { "options"
49         { "attempts" = "3" }
50         { "rotate" }
51         { "no-check-names" }
52         { "inet6" }
53         { "ip6-bytestring" }
54         { "ip6-dotint" }
55         { "edns0" }
56         { "single-request" }
57         { "no-tld-query" }
58         { "use-vc" }
59         { "no-reload" }
60         { "trust-ad" } }
61    {}
62    { "lookup"
63         { "file" }
64         { "bind" } }
65    { "family"
66         { "inet6" }
67         { "inet4" } }
68
69 test Resolv.ip6_dotint
70    put "ip6-dotint"
71    after set "/ip6-dotint/negate" "" = "no-ip6-dotint"
72
73 test Resolv.lns get ";  \r\n; \t \n" = { } { }